Skip to content

Commit

Permalink
Add keyCapture to save documents
Browse files Browse the repository at this point in the history
  • Loading branch information
LFDM committed Jul 1, 2014
1 parent 400c3b4 commit 21a9226
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 10 additions & 1 deletion app/js/arethusa.core/saver.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
angular.module('arethusa.core').service('saver', [
'configurator',
'notifier',
function(configurator, notifier) {
'keyCapture',
function(configurator, notifier, keyCapture) {
var self = this;
var persisters;

Expand Down Expand Up @@ -34,6 +35,14 @@ angular.module('arethusa.core').service('saver', [
});
};

keyCapture.initCaptures(function(kC) {
return {
saver: [
kC.create('save', function() { self.save(); })
]
};
});

this.init = function(newPersisters) {
reset();
getPersisters();
Expand Down
3 changes: 3 additions & 0 deletions app/static/configs/staging2.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@
},
"tree" : {
"directionChange" : "c"
},
"saver" : {
"save" : "ctrl-S"
}
}
}

0 comments on commit 21a9226

Please sign in to comment.