From 16e1fd1df0a834f3fac2f1610256a23cfe153421 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Wed, 9 Nov 2016 15:26:11 +0100 Subject: [PATCH] Also save assets on ctrl+enter --- src/scripts/tutti/10_tasks.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/tutti/10_tasks.js b/src/scripts/tutti/10_tasks.js index f8e76aa..e879200 100644 --- a/src/scripts/tutti/10_tasks.js +++ b/src/scripts/tutti/10_tasks.js @@ -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){