Sha256: b6bc009e4cf1613a46152620c25162c72e50d130926b84d0022505a3d3228dc5
Contents?: true
Size: 1.22 KB
Versions: 2
Compression:
Stored size: 1.22 KB
Contents
<%=javascript_tag do %> function handlePageEvent(event) { if (event.altKey && event.shiftKey && event.charCode == 110) { window.location = '<%=url_for(:controller => 'periods', :action => :new)%>'; } else if (event.altKey && event.ctrlKey && event.charCode == 110) { window.location = '<%=url_for(:controller => 'projects', :action => :new ) %>'; } else if (event.altKey && event.charCode == 110) { window.location = '<%=url_for(:controller => 'tasks', :action => :new, :task => {:project_id => (@project ? @project.id : nil), :period_id => (@period ? @period.id : nil)} ) %>'; } else if (event.altKey && event.ctrlKey && event.charCode == 103) { window.location = '<%=url_for(:controller => 'groups', :action => :new ) %>'; } else if (event.shiftKey && event.altKey && event.charCode == 100) { window.location = '<%=url_for(:controller => 'works', :action => :daily_work_sheet ) %>'; } else if (event.shiftKey && event.altKey && event.charCode == 119) { window.location = '<%=url_for(:controller => 'works', :action => :weekly_work_sheet ) %>'; } else { //alert("shift: " + event.shiftKey + ", alt: " + event.altKey + ", ctrl: " + event.ctrlKey + ", " + event.charCode + ", " + event.keyCode); } } <% end %>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
backlog-0.37.2 | app/views/layouts/_shortcuts_js.rhtml |
backlog-0.37.1 | app/views/layouts/_shortcuts_js.rhtml |