mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Merge pull request #4086 from novaugust/gmail-shortcuts
Add Gmail-style shortcuts
This commit is contained in:
commit
27fe725357
3 changed files with 8 additions and 4 deletions
|
@ -16,7 +16,7 @@
|
||||||
"jquery-file-upload": "9.5.6",
|
"jquery-file-upload": "9.5.6",
|
||||||
"jquery-hammerjs": "1.0.1",
|
"jquery-hammerjs": "1.0.1",
|
||||||
"jquery-ui": "1.10.4",
|
"jquery-ui": "1.10.4",
|
||||||
"keymaster": "git://github.com/madrobby/keymaster#0f09fc1b7e66c2b7e07afe89a419366dcf2d1cd8",
|
"keymaster": "git://github.com/madrobby/keymaster#564ea42e07de40da8113a571f17ceae8802672ff",
|
||||||
"loader.js": "git://github.com/stefanpenner/loader.js#1.0.0",
|
"loader.js": "git://github.com/stefanpenner/loader.js#1.0.0",
|
||||||
"lodash": "2.4.1",
|
"lodash": "2.4.1",
|
||||||
"moment": "2.4.0",
|
"moment": "2.4.0",
|
||||||
|
|
|
@ -56,10 +56,14 @@ var PostsRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, Shortcut
|
||||||
},
|
},
|
||||||
|
|
||||||
shortcuts: {
|
shortcuts: {
|
||||||
'up': 'moveUp',
|
'up, k': 'moveUp',
|
||||||
'down': 'moveDown'
|
'down, j': 'moveDown',
|
||||||
|
'c': 'newPost'
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
|
newPost: function () {
|
||||||
|
this.transitionTo('editor.new');
|
||||||
|
},
|
||||||
moveUp: function () {
|
moveUp: function () {
|
||||||
this.stepThroughPosts(-1);
|
this.stepThroughPosts(-1);
|
||||||
},
|
},
|
||||||
|
|
|
@ -55,7 +55,7 @@ var PostsPostRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, load
|
||||||
},
|
},
|
||||||
|
|
||||||
shortcuts: {
|
shortcuts: {
|
||||||
'enter': 'openEditor',
|
'enter, o': 'openEditor',
|
||||||
'command+backspace, ctrl+backspace': 'deletePost'
|
'command+backspace, ctrl+backspace': 'deletePost'
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
|
|
Loading…
Add table
Reference in a new issue