diff options
author | Jefferson Stachelski <jstachel@thoughtworks.com> | 2015-12-31 16:52:49 -0200 |
---|---|---|
committer | Jefferson Stachelski <jstachel@thoughtworks.com> | 2015-12-31 16:52:49 -0200 |
commit | aa66beb0c74ebaa950a083ed991f6e5f50f9c9ac (patch) | |
tree | e0df762cef10651b025058fb75733f5e125b6e98 /web-ui/app/js/dispatchers/right_pane_dispatcher.js | |
parent | 111205c8cd74d553201b42db3041d870ae833165 (diff) |
Issue #25 - Implemented shortcuts on UI
Diffstat (limited to 'web-ui/app/js/dispatchers/right_pane_dispatcher.js')
-rw-r--r-- | web-ui/app/js/dispatchers/right_pane_dispatcher.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/web-ui/app/js/dispatchers/right_pane_dispatcher.js b/web-ui/app/js/dispatchers/right_pane_dispatcher.js index 870bcd92..4d28588a 100644 --- a/web-ui/app/js/dispatchers/right_pane_dispatcher.js +++ b/web-ui/app/js/dispatchers/right_pane_dispatcher.js @@ -100,12 +100,22 @@ define( this.attr.currentTag = data.tag; }; + this.shortcutOpenComposeBox = function() { + this.trigger(document, events.dispatchers.rightPane.openComposeBox); + }; + + this.shortcutCloseMail = function() { + this.trigger(document, events.dispatchers.rightPane.openNoMessageSelected); + }; + this.after('initialize', function () { this.on(document, events.dispatchers.rightPane.openComposeBox, this.openComposeBox); + this.on(document, events.shortcuts.openComposeBox, this.shortcutOpenComposeBox); this.on(document, events.dispatchers.rightPane.openDraft, this.openDraft); this.on(document, events.ui.mail.open, this.openMail); this.on(document, events.dispatchers.rightPane.openFeedbackBox, this.openFeedbackBox); this.on(document, events.dispatchers.rightPane.openNoMessageSelected, this.openNoMessageSelectedPane); + this.on(document, events.shortcuts.closeMail, this.shortcutCloseMail); this.on(document, events.dispatchers.rightPane.selectTag, this.selectTag); this.on(document, events.ui.tag.selected, this.saveTag); this.on(document, events.ui.tag.select, this.saveTag); |