Files
stopwatch/app/views/stopwatch_timers/start.js.erb

16 lines
420 B
Plaintext

<% if params[:context] %>
contextMenuHide();
<% else %>
hideModal();
$('#ajax-modal').html('<%= j render partial: 'new' %>');
showModal('ajax-modal', '700px');
<% end %>
<% if @started_time_entry %>
window.stopwatch.timerStarted('<%= @started_time_entry.id %>',
'<%= j format_hours @started_time_entry.hours %>');
<% else %>
window.stopwatch.timerStopped();
<% end %>