show currently running timer in window title, menu item

This commit is contained in:
Jens Kraemer committed 2020-04-25 17:09:38 +08:00
1 parent 797e40384a
commit 30bcd5ff8c
7 files changed
+146 -22

No files matched your search

+7 -1
View File
@@ -5,5 +5,11 @@
$('#ajax-modal').html('<%= j render partial: 'new' %>');
showModal('ajax-modal', '700px');
<% end %>
Stopwatch.highlightTimer('<%= @started_time_entry.id if @started_time_entry %>');
<% if @started_time_entry %>
window.stopwatch.timerStarted('<%= @started_time_entry.id %>',
'<%= j format_hours @started_time_entry.hours %>');
<% else %>
window.stopwatch.timerStopped();
<% end %>