Also save assets on ctrl+enter

This commit is contained in:
2016-11-09 15:26:11 +01:00
parent 3a57baf34e
commit 16e1fd1df0

View File

@@ -440,9 +440,9 @@ $(function() {
});
});
var save_on_ctrl_enter = ['shot', 'asset', 'task'];
$(document).on('keyup', function(e){
if (ProjectUtils.context() == 'shot' || ProjectUtils.context() == 'task'){
if ($.inArray(ProjectUtils.context(), save_on_ctrl_enter)) {
// Save on Ctrl + Enter anytime except when comments is on focus
if ($('#comment_field') && $('#comment_field').not(':focus')){
if ((e.keyCode == 10 || e.keyCode == 13) && e.ctrlKey){