mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 18:58:34 +08:00
19 lines
391 B
Plaintext
19 lines
391 B
Plaintext
|
/*global Mousetrap:true */
|
||
|
|
||
|
export default Ember.View.extend({
|
||
|
classNames: ['customize'],
|
||
|
|
||
|
_init: function() {
|
||
|
var controller = this.get('controller');
|
||
|
Mousetrap.bindGlobal('mod+s', function() {
|
||
|
controller.send("save");
|
||
|
return false;
|
||
|
});
|
||
|
}.on("didInsertElement"),
|
||
|
|
||
|
_cleanUp: function() {
|
||
|
Mousetrap.unbindGlobal('mod+s');
|
||
|
}.on("willDestroyElement")
|
||
|
|
||
|
});
|