Save task/shot changes on ctrl+enter

This commit is contained in:
2016-10-20 15:33:44 +02:00
parent a31fec8917
commit 2ae9bc6d94
3 changed files with 11 additions and 2 deletions

View File

@@ -391,3 +391,12 @@ $(function() {
task_open(task_id, project_url);
});
});
$(document).on('keyup', function(e){
if (ProjectUtils.context() == 'shot' || ProjectUtils.context() == 'task'){
// Save on Ctrl + Enter
if ((e.keyCode == 10 || e.keyCode == 13) && e.ctrlKey){
$("#item-save").trigger( "click" );
};
}
});

View File

@@ -35,7 +35,7 @@
.input-transparent-group
| {% if 'PUT' in shot.allowed_methods %}
button.btn.btn-default.btn-block(type=submit)
button#item-save.btn.btn-default.btn-block(type=submit)
i.pi-check
| Save Shot
| {% endif %}

View File

@@ -82,7 +82,7 @@
.input-group-separator
.input-transparent-group
button.btn.btn-default.btn-block(type='submit')
button#item-save.btn.btn-default.btn-block(type='submit')
i.pi-check
| Save Task
| {% else %}