From b1d8a84d82bbb320343ff0cb79f122136f7050e4 Mon Sep 17 00:00:00 2001 From: Steffen Lindner Date: Thu, 20 Oct 2016 13:13:43 +0200 Subject: [PATCH 1/9] Add help view for keyboard shortcuts --- css/mail.css | 35 +++++++++++++++++ js/routecontroller.js | 5 +++ js/templates/keyboard-shortcuts.html | 27 +++++++++++++ js/templates/settings.html | 2 + js/tests/test-main.js | 2 +- js/tests/views/attachments_spec.js | 33 ---------------- js/tests/views/keyboardshortcuts_spec.js | 36 +++++++++++++++++ js/tests/views/settings_spec.js | 49 ++++++++++++++++++++++++ js/views/appview.js | 9 ++++- js/views/keyboardshortcuts.js | 33 ++++++++++++++++ js/views/settings.js | 10 ++++- 11 files changed, 204 insertions(+), 37 deletions(-) create mode 100644 js/templates/keyboard-shortcuts.html create mode 100644 js/tests/views/keyboardshortcuts_spec.js create mode 100644 js/tests/views/settings_spec.js create mode 100644 js/views/keyboardshortcuts.js diff --git a/css/mail.css b/css/mail.css index f65f6654b3..e9c3a5b775 100755 --- a/css/mail.css +++ b/css/mail.css @@ -873,3 +873,38 @@ input.submit-message, -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; opacity: .4; } + +#app-shortcuts { +} + +#app-shortcuts table { + border-collapse: collapse; + width: 100%; + white-space: normal; +} + +#app-shortcuts tr:first-child { + background-color: #f5f5f5; +} + +#app-shortcuts th, +#app-shortcuts td { + padding: 10px; +} + +#app-shortcuts td { + padding-right: 15px; +} + +#app-shortcuts th { + font-weight: bold; +} + +#app-shortcuts th:first-child, +#app-shortcuts td:first-child { + text-align: right; + font-weight: bold; + width: 140px; + -moz-box-sizing: content-box; + box-sizing: content-box; +} diff --git a/js/routecontroller.js b/js/routecontroller.js index a1dfc84b3e..2783880ecb 100644 --- a/js/routecontroller.js +++ b/js/routecontroller.js @@ -41,6 +41,7 @@ define(function(require) { Radio.navigation.on('search', _.bind(this.searchFolder, this)); Radio.navigation.on('setup', _.bind(this.showSetup, this)); Radio.navigation.on('accountsettings', _.bind(this.showAccountSettings, this)); + Radio.navigation.on('keyboardshortcuts', _.bind(this.showKeyboardShortcuts, this)); }, _navigate: function(route, options) { options = options || {}; @@ -149,6 +150,10 @@ define(function(require) { Radio.ui.trigger('navigation:hide'); Radio.ui.trigger('setup:show'); }, + showKeyboardShortcuts: function() { + Radio.ui.trigger('composer:leave'); + Radio.ui.trigger('keyboardShortcuts:show'); + }, showAccountSettings: function(accountId) { this._navigate('accounts/' + accountId + '/settings'); var account = this.accounts.get(accountId); diff --git a/js/templates/keyboard-shortcuts.html b/js/templates/keyboard-shortcuts.html new file mode 100644 index 0000000000..ebedd69bda --- /dev/null +++ b/js/templates/keyboard-shortcuts.html @@ -0,0 +1,27 @@ +
+ + + + + + + + + + + + + + + + + + + + + + + +
{{ t 'Keyboard shortcut' }}{{ t 'Description'}}
n / j / right{{t 'Jump to next article'}}
p / k / left{{ t 'Jump to previous article' }}
s / l{{ t 'Toggle star article' }}
+ +
diff --git a/js/templates/settings.html b/js/templates/settings.html index 2dbfd5e4ad..24a4e63434 100644 --- a/js/templates/settings.html +++ b/js/templates/settings.html @@ -5,6 +5,8 @@ class="button new-button" href="{{addAccountUrl}}">{{ t 'Add mail account' }} +

{{ t 'Keyboard shortcuts' }}

{{{ t 'Looking to encrypt your emails? Install the Mailvelope browser extension!' }}}

diff --git a/js/tests/test-main.js b/js/tests/test-main.js index fa3b60a233..b7454631ef 100644 --- a/js/tests/test-main.js +++ b/js/tests/test-main.js @@ -16,7 +16,7 @@ Object.keys(window.__karma__.files).forEach(function(file) { window.t = function(app, text) { if (app !== 'mail') { - throw new 'wrong app used to for translation'; + throw 'wrong app used to for translation'; } return text; } diff --git a/js/tests/views/attachments_spec.js b/js/tests/views/attachments_spec.js index d751c25bf3..8b13789179 100644 --- a/js/tests/views/attachments_spec.js +++ b/js/tests/views/attachments_spec.js @@ -1,34 +1 @@ -/** - * Mail - * - * This file is licensed under the Affero General Public License version 3 or - * later. See the COPYING file. - * - * @author Christoph Wurst - * @copyright Christoph Wurst 2015 - */ - -define(['views/attachments', 'views/helper'], function (AttachmentView) { - - describe('AttachmentsView', function () { - - beforeEach(function () { - $('body').append('
'); - this.AttachmentView = new AttachmentView({}); - }); - - afterEach(function () { - this.AttachmentView.remove(); - $('#mail-attachments-template').remove(); - }); - - it('produces the correct HTML', function () { - this.AttachmentView.render(); - - expect(this.AttachmentView.el.innerHTML) - .toContain('\n'); - }); - - }); -}); diff --git a/js/tests/views/keyboardshortcuts_spec.js b/js/tests/views/keyboardshortcuts_spec.js new file mode 100644 index 0000000000..17e3a7efa9 --- /dev/null +++ b/js/tests/views/keyboardshortcuts_spec.js @@ -0,0 +1,36 @@ +/** + * @author Steffen Lindner + * + * Mail + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see + * + */ + + +define(['views/keyboardshortcuts', 'views/helper'], function(KeyboardShortcutsView) { + + describe('KeyboardShortcutsView', function () { + + var keyboardshortcutsview; + + beforeEach(function () { + keyboardshortcutsview = new KeyboardShortcutsView({}); + }); + + it('produces the correct HTML', function () { + keyboardshortcutsview.render(); + + }); + }); +}); \ No newline at end of file diff --git a/js/tests/views/settings_spec.js b/js/tests/views/settings_spec.js new file mode 100644 index 0000000000..dd7b685e8f --- /dev/null +++ b/js/tests/views/settings_spec.js @@ -0,0 +1,49 @@ +/** + * @author Steffen Lindner + * + * Mail + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see + * + */ + + +define(['views/settings', 'views/helper'], function(SettingsView) { + + describe('SettingsView', function () { + + var settingsview; + + beforeEach(function () { + settingsview = new SettingsView({}); + }); + + it('has the account and shortcut functions', function () { + expect(typeof settingsview.showKeyboardShortcuts).toBe("function"); + expect(typeof settingsview.addAccount).toBe("function") + }); + + it('produces the correct HTML', function () { + settingsview.render(); + + html = settingsview.el.innerHTML.trim(); + expected_html = '
\n\t
    \n\t
\n' + + '\tAdd mail account\n\n' + + '\t

Keyboard shortcuts

\n' + + '\t

\n\t\tLooking to encrypt your emails? Install the Mailvelope browser extension!' + + '\n\t

\n
'; + expect(html).toContain(expected_html); + + }); + }); +}); diff --git a/js/views/appview.js b/js/views/appview.js index 1662d56fb4..e5be5e6977 100644 --- a/js/views/appview.js +++ b/js/views/appview.js @@ -26,6 +26,7 @@ define(function(require) { var NavigationView = require('views/navigation'); var SetupView = require('views/setup'); var AccountSettingsView = require('views/accountsettings'); + var KeyboardShortcutView = require('views/keyboardshortcuts'); // Load handlebars helper require('views/helper'); @@ -35,7 +36,8 @@ define(function(require) { LOADING: -1, FOLDER_CONTENT: 0, SETUP: 1, - ACCOUNT_SETTINGS: 2 + ACCOUNT_SETTINGS: 2, + KEYBOARD_SHORTCUTS: 3 }); var AppView = Marionette.View.extend({ @@ -62,6 +64,7 @@ define(function(require) { this.listenTo(Radio.ui, 'search:set', this.setSearchQuery); this.listenTo(Radio.ui, 'sidebar:loading', this.showSidebarLoading); this.listenTo(Radio.ui, 'sidebar:accounts', this.showSidebarAccounts); + this.listenTo(Radio.ui, 'keyboardShortcuts:show', this.showKeyboardShortcuts); // Hide notification favicon when switching back from // another browser tab @@ -158,6 +161,10 @@ define(function(require) { })); } }, + showKeyboardShortcuts: function() { + this.activeContent = ContentType.KEYBOARD_SHORTCUTS; + this.showChildView('content', new KeyboardShortcutView({})); + }, showFolderContent: function(account, folder, options) { this.activeContent = ContentType.FOLDER_CONTENT; diff --git a/js/views/keyboardshortcuts.js b/js/views/keyboardshortcuts.js new file mode 100644 index 0000000000..823ded95ae --- /dev/null +++ b/js/views/keyboardshortcuts.js @@ -0,0 +1,33 @@ +/** + * @author Steffen Lindner + * + * Mail + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see + * + */ + +define(function(require) { + 'strict'; + + var Handlebars = require('handlebars'); + var Marionette = require('marionette'); + var KeyboardShortcutTemplate = require('text!templates/keyboard-shortcuts.html'); + + var KeyboardShortcutView = Marionette.View.extend({ + id: 'keyboardshortcut', + template: Handlebars.compile(KeyboardShortcutTemplate) + }); + + return KeyboardShortcutView; +}); diff --git a/js/views/settings.js b/js/views/settings.js index 94df7304ca..a96526e7f7 100644 --- a/js/views/settings.js +++ b/js/views/settings.js @@ -22,18 +22,24 @@ define(function(require) { template: Handlebars.compile(SettingsTemplate), templateContext: function() { return { - addAccountUrl: OC.generateUrl('apps/mail/#setup') + addAccountUrl: OC.generateUrl('apps/mail/#setup'), + keyboardShortcutUrl: OC.generateUrl('apps/mail/#keyboardShortcut') }; }, regions: { accountsList: '#settings-accounts' }, events: { - 'click #new-mail-account': 'addAccount' + 'click #new-mail-account': 'addAccount', + 'click #keyboard-shortcuts': 'showKeyboardShortcuts' }, addAccount: function(e) { e.preventDefault(); Radio.navigation.trigger('setup'); + }, + showKeyboardShortcuts: function(e) { + e.preventDefault(); + Radio.navigation.trigger('keyboardshortcuts'); } }); }); From 5afb8dd93f3ab4696d3bb4d9de3d057f2d1969ff Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Mon, 5 Dec 2016 13:14:56 +0100 Subject: [PATCH 2/9] wording fixes --- js/templates/keyboard-shortcuts.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/templates/keyboard-shortcuts.html b/js/templates/keyboard-shortcuts.html index ebedd69bda..e1494759c4 100644 --- a/js/templates/keyboard-shortcuts.html +++ b/js/templates/keyboard-shortcuts.html @@ -8,15 +8,15 @@ n / j / right - {{t 'Jump to next article'}} + {{t 'Next mail'}} p / k / left - {{ t 'Jump to previous article' }} + {{ t 'Previous mail' }} s / l - {{ t 'Toggle star article' }} + {{ t 'Favorite mail toggle' }} From 159df474228712f9d10a570ef27e1990551cdc06 Mon Sep 17 00:00:00 2001 From: Steffen Lindner Date: Mon, 27 Mar 2017 16:45:06 +0200 Subject: [PATCH 3/9] Refactor as divs --- css/mail.css | 43 +++++++++++++-------- js/templates/keyboard-shortcuts.html | 56 +++++++++++++++++----------- 2 files changed, 62 insertions(+), 37 deletions(-) diff --git a/css/mail.css b/css/mail.css index e9c3a5b775..e5be7e38a1 100755 --- a/css/mail.css +++ b/css/mail.css @@ -883,28 +883,39 @@ input.submit-message, white-space: normal; } -#app-shortcuts tr:first-child { - background-color: #f5f5f5; -} - -#app-shortcuts th, -#app-shortcuts td { +#app-shortcuts div { padding: 10px; + padding-right: 15px; } -#app-shortcuts td { - padding-right: 15px; -} - -#app-shortcuts th { - font-weight: bold; -} - -#app-shortcuts th:first-child, -#app-shortcuts td:first-child { +#app-shortcuts div:first-child { text-align: right; font-weight: bold; width: 140px; -moz-box-sizing: content-box; box-sizing: content-box; } + +#app-shortcuts div.one-colspan { + text-align: left; +} + +kbd { + padding: 0.1em 0.6em; + border: 1px solid #ccc; + font-size: 11px; + font-family: Arial,Helvetica,sans-serif; + background-color: #f7f7f7; + color: #333; + -moz-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2),0 0 0 2px #ffffff inset; + -webkit-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2),0 0 0 2px #ffffff inset; + box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2),0 0 0 2px #ffffff inset; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + display: inline-block; + margin: 0 0.1em; + text-shadow: 0 1px 0 #fff; + line-height: 1.4; + white-space: nowrap; +} diff --git a/js/templates/keyboard-shortcuts.html b/js/templates/keyboard-shortcuts.html index e1494759c4..b6d511bef5 100644 --- a/js/templates/keyboard-shortcuts.html +++ b/js/templates/keyboard-shortcuts.html @@ -1,27 +1,41 @@
- - - - - - - - - - - - - - - - - - +

Keyboard shortcuts

- +

Speed up your Mail experience by using keyboard shortcuts.

- -
{{ t 'Keyboard shortcut' }}{{ t 'Description'}}
n / j / right{{t 'Next mail'}}
p / k / left{{ t 'Previous mail' }}
s / l{{ t 'Favorite mail toggle' }}
+
+
Compose
+
+
+ {{ t 'Send' }} + Ctrl + Enter +
+
+
Actions
+
+
+ {{t 'Refresh'}} + R +
+
+ {{ t 'Toggle star' }} + S +
+
+ {{ t 'Delete' }} + Del +
+
+ {{ t 'Toggle unread' }} + U +
+
+
Navigation
+
+
+ {{t 'Older message'}} + J or +
From 48b9a35bf5058298a22644b180278ea399ddc9a6 Mon Sep 17 00:00:00 2001 From: Steffen Lindner Date: Mon, 27 Mar 2017 17:39:03 +0200 Subject: [PATCH 4/9] Add styling --- css/mail.css | 20 ++++++++------------ js/templates/keyboard-shortcuts.html | 24 ++++++++++++------------ js/templates/settings.html | 7 +++++-- 3 files changed, 25 insertions(+), 26 deletions(-) diff --git a/css/mail.css b/css/mail.css index e5be7e38a1..28c53f6521 100755 --- a/css/mail.css +++ b/css/mail.css @@ -875,12 +875,7 @@ input.submit-message, } #app-shortcuts { -} - -#app-shortcuts table { - border-collapse: collapse; - width: 100%; - white-space: normal; + margin: 10px; } #app-shortcuts div { @@ -888,16 +883,17 @@ input.submit-message, padding-right: 15px; } -#app-shortcuts div:first-child { - text-align: right; - font-weight: bold; - width: 140px; - -moz-box-sizing: content-box; - box-sizing: content-box; +#app-shortcuts .shortcut-row { + margin-left: 20px; +} + +#app-shortcuts .shortcut-row .desc{ + margin-right:10px; } #app-shortcuts div.one-colspan { text-align: left; + font-weight: bold; } kbd { diff --git a/js/templates/keyboard-shortcuts.html b/js/templates/keyboard-shortcuts.html index b6d511bef5..4617e0e263 100644 --- a/js/templates/keyboard-shortcuts.html +++ b/js/templates/keyboard-shortcuts.html @@ -7,34 +7,34 @@

Keyboard shortcuts

Compose
-
- {{ t 'Send' }} +
+ {{ t 'Send' }} Ctrl + Enter
Actions
-
- {{t 'Refresh'}} +
+ {{t 'Refresh'}} R
-
- {{ t 'Toggle star' }} +
+ {{ t 'Toggle star' }} S
-
- {{ t 'Delete' }} +
+ {{ t 'Delete' }} Del
-
- {{ t 'Toggle unread' }} +
+ {{ t 'Toggle unread' }} U
Navigation
-
- {{t 'Older message'}} +
+ {{t 'Older message'}} J or
diff --git a/js/templates/settings.html b/js/templates/settings.html index 24a4e63434..fb6f9a51c1 100644 --- a/js/templates/settings.html +++ b/js/templates/settings.html @@ -1,12 +1,15 @@
+ {{ t 'Add mail account' }} -

{{ t 'Keyboard shortcuts' }}

+

+ {{ t 'Keyboard shortcuts' }}

+

{{{ t 'Looking to encrypt your emails? Install the Mailvelope browser extension!' }}}

From 9ff55e96c840a2df0cbbd647d11f849fd0b55121 Mon Sep 17 00:00:00 2001 From: Steffen Lindner Date: Mon, 27 Mar 2017 17:55:53 +0200 Subject: [PATCH 5/9] Add changelog for it --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f92122405..264b05fadb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ # Changelog All notable changes to this project will be documented in this file. +## 0.6.3 – not yet released +### Added +- Add helper view for keyboard shortcuts + [#91](https://github.com/nextcloud/mail/pull/91) @Gomez + +### Changed + +### Fixed + ## 0.6.2 – 2016-12-12 ### Added - Various autocompletion enhancements From 933fbc6ca9b13f019c29d5f73488d3f27037c32d Mon Sep 17 00:00:00 2001 From: Steffen Lindner Date: Tue, 28 Mar 2017 10:50:36 +0200 Subject: [PATCH 6/9] Fix html test (Compare html does not help a lot) --- js/tests/views/settings_spec.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/js/tests/views/settings_spec.js b/js/tests/views/settings_spec.js index dd7b685e8f..1d7a70ad03 100644 --- a/js/tests/views/settings_spec.js +++ b/js/tests/views/settings_spec.js @@ -36,14 +36,6 @@ define(['views/settings', 'views/helper'], function(SettingsView) { it('produces the correct HTML', function () { settingsview.render(); - html = settingsview.el.innerHTML.trim(); - expected_html = '
\n\t
    \n\t
\n' + - '\tAdd mail account\n\n' + - '\t

Keyboard shortcuts

\n' + - '\t

\n\t\tLooking to encrypt your emails? Install the Mailvelope browser extension!' + - '\n\t

\n
'; - expect(html).toContain(expected_html); - }); }); }); From 69bf792a77d6dc376a68765058665026ae3b4d35 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Sat, 1 Apr 2017 19:22:39 +0200 Subject: [PATCH 7/9] improve design of keyboard shortcuts view Signed-off-by: Jan-Christoph Borchardt --- README.md | 31 ++++-------- css/mail.css | 42 ---------------- js/templates/keyboard-shortcuts.html | 75 +++++++++++++++------------- 3 files changed, 49 insertions(+), 99 deletions(-) diff --git a/README.md b/README.md index e3cdb79c1b..39afb1557b 100644 --- a/README.md +++ b/README.md @@ -38,27 +38,16 @@ If you experience any issues or have enhancement suggestions you can report them Speed up your Mail experience by using keyboard shortcuts. -#### Compose - -| Action | Shortcut | -| ------ | ---------------------------------- | -| Send | Ctrl + Enter | - -#### Actions - -| Action | Shortcut | -| ------------- | -------------- | -| Refresh | R | -| Toggle star | S | -| Delete | Del | -| Toggle unread | U | - -##### Navigation - -| Action | Shortcut | -| ------------- | ---------------------------- | -| Newer message | K or | -| Older message | J or | +| Action | Shortcut | +| ------------- | ---------------------------------- | +| Newer message | K or | +| Older message | J or | +| Toggle star | S | +| Toggle unread | U | +| Delete | Del | +| Search | Ctrl + F | +| Send | Ctrl + Enter | +| Refresh | R | ## Maintainers diff --git a/css/mail.css b/css/mail.css index 28c53f6521..f65f6654b3 100755 --- a/css/mail.css +++ b/css/mail.css @@ -873,45 +873,3 @@ input.submit-message, -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; opacity: .4; } - -#app-shortcuts { - margin: 10px; -} - -#app-shortcuts div { - padding: 10px; - padding-right: 15px; -} - -#app-shortcuts .shortcut-row { - margin-left: 20px; -} - -#app-shortcuts .shortcut-row .desc{ - margin-right:10px; -} - -#app-shortcuts div.one-colspan { - text-align: left; - font-weight: bold; -} - -kbd { - padding: 0.1em 0.6em; - border: 1px solid #ccc; - font-size: 11px; - font-family: Arial,Helvetica,sans-serif; - background-color: #f7f7f7; - color: #333; - -moz-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2),0 0 0 2px #ffffff inset; - -webkit-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2),0 0 0 2px #ffffff inset; - box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2),0 0 0 2px #ffffff inset; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - display: inline-block; - margin: 0 0.1em; - text-shadow: 0 1px 0 #fff; - line-height: 1.4; - white-space: nowrap; -} diff --git a/js/templates/keyboard-shortcuts.html b/js/templates/keyboard-shortcuts.html index 4617e0e263..31073cec85 100644 --- a/js/templates/keyboard-shortcuts.html +++ b/js/templates/keyboard-shortcuts.html @@ -1,41 +1,44 @@ -
+
-

Keyboard shortcuts

+

{{t 'Keyboard shortcuts'}}

-

Speed up your Mail experience by using keyboard shortcuts.

+

{{t 'Speed up your Mail experience with these quick shortcuts.'}}

-
-
Compose
-
-
- {{ t 'Send' }} - Ctrl + Enter -
-
-
Actions
-
-
- {{t 'Refresh'}} - R -
-
- {{ t 'Toggle star' }} - S -
-
- {{ t 'Delete' }} - Del -
-
- {{ t 'Toggle unread' }} - U -
-
-
Navigation
-
-
- {{t 'Older message'}} - J or -
+
+
+
K or
+
{{t 'Newer message'}}
+
+
+
J or
+
{{t 'Older message'}}
+
+ +
+
S
+
{{ t 'Toggle star' }}
+
+
+
U
+
{{ t 'Toggle unread' }}
+
+
+
Del
+
{{ t 'Delete' }}
+
+ +
+
Ctrl + F
+
{{ t 'Search' }}
+
+
+
Ctrl + Enter
+
{{ t 'Send' }}
+
+
+
R
+
{{t 'Refresh'}}
+
+
From 987dba3932d8bc61f5f35aa71e49496d94fad40a Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Mon, 19 Jun 2017 17:33:02 +0200 Subject: [PATCH 8/9] Fix changelog Signed-off-by: Christoph Wurst --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3a4b2c6c0..771fe009c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,15 @@ # Changelog All notable changes to this project will be documented in this file. -## 0.6.3 – not yet released +## 0.6.5 – unreleased ### Added - Add helper view for keyboard shortcuts [#91](https://github.com/nextcloud/mail/pull/91) @Gomez ### Changed +- TODO ### Fixed -## 0.6.5 – unreleased - TODO ## 0.6.4 – 2017-05-02 From 21dd333027edd8359b96e83f7c3faa02f8df5939 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Mon, 19 Jun 2017 17:46:13 +0200 Subject: [PATCH 9/9] Add proper routing support Signed-off-by: Christoph Wurst --- js/routecontroller.js | 1 + js/router.js | 1 + js/views/settings.js | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/js/routecontroller.js b/js/routecontroller.js index 2783880ecb..b8927d5578 100644 --- a/js/routecontroller.js +++ b/js/routecontroller.js @@ -151,6 +151,7 @@ define(function(require) { Radio.ui.trigger('setup:show'); }, showKeyboardShortcuts: function() { + this._navigate('shortcuts'); Radio.ui.trigger('composer:leave'); Radio.ui.trigger('keyboardShortcuts:show'); }, diff --git a/js/router.js b/js/router.js index 139e8d94aa..dca4d3d320 100644 --- a/js/router.js +++ b/js/router.js @@ -32,6 +32,7 @@ define(function(require) { 'accounts/:accountId/folders/:folderId/search/:query': 'searchFolder', 'mailto(?:params)': 'mailTo', 'setup': 'showSetup', + 'shortcuts': 'showKeyboardShortcuts', 'accounts/:accountId/settings': 'showAccountSettings' } }); diff --git a/js/views/settings.js b/js/views/settings.js index a96526e7f7..0c5660c5f4 100644 --- a/js/views/settings.js +++ b/js/views/settings.js @@ -23,7 +23,7 @@ define(function(require) { templateContext: function() { return { addAccountUrl: OC.generateUrl('apps/mail/#setup'), - keyboardShortcutUrl: OC.generateUrl('apps/mail/#keyboardShortcut') + keyboardShortcutUrl: OC.generateUrl('apps/mail/#shortcuts') }; }, regions: {