Files
stopwatch/app/views/stopwatch_timers/start.js.erb
2021-10-05 11:26:51 +08:00

17 lines
367 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(
<%= raw Stopwatch::Timer.new(User.current).to_json %>
);
<% else %>
window.stopwatch.timerStopped();
<% end %>