diff --git a/Changelog.md b/Changelog.md index 6f9c7c479..3645f72c1 100644 --- a/Changelog.md +++ b/Changelog.md @@ -23,6 +23,7 @@ * Reference Salmon endpoint in Webfinger XRD to aid discovery by alternative implementations [#5062](https://github.com/diaspora/diaspora/pull/5062) * Change minimal birth year for the birthday field to 1910 [#5083](https://github.com/diaspora/diaspora/pull/5083) * Add scrolling thumbnail switcher in the lightbox [#5102](https://github.com/diaspora/diaspora/pull/5102) +* Add help section about keyboard shortcuts [#5100](https://github.com/diaspora/diaspora/pull/5100) # 0.4.0.1 diff --git a/app/assets/javascripts/app/views/help_view.js b/app/assets/javascripts/app/views/help_view.js index b46d2209f..16757f4c3 100644 --- a/app/assets/javascripts/app/views/help_view.js +++ b/app/assets/javascripts/app/views/help_view.js @@ -5,7 +5,8 @@ app.views.Help = app.views.StaticContentView.extend({ "click .faq-link" : "sectionClicked", "click .faq-link-getting-help" : "gettingHelp", "click .faq-link-sharing" : "sharing", - "click .faq-link-posts-and-posting" : "postsAndPosting" + "click .faq-link-posts-and-posting" : "postsAndPosting", + "click .faq-link-keyboard-shortcuts" : "keyboardShortcuts", }, initialize : function(options) { @@ -40,6 +41,7 @@ app.views.Help = app.views.StaticContentView.extend({ title_resharing_posts: Diaspora.I18n.t( 'resharing_posts.title' ), title_sharing: Diaspora.I18n.t( 'sharing.title' ), title_tags: Diaspora.I18n.t( 'tags.title' ), + title_keyboard_shortcuts: Diaspora.I18n.t( 'keyboard_shortcuts.title' ), title_miscellaneous: Diaspora.I18n.t( 'miscellaneous.title' ), } @@ -143,6 +145,13 @@ app.views.Help = app.views.StaticContentView.extend({ e.preventDefault(); }, + keyboardShortcuts: function(e) { + this.renderStaticSection("keyboard_shortcuts", "faq_keyboard_shortcuts", {}); + this.menuClicked(e); + + e.preventDefault(); + }, + linkHtml: function(url, text) { return "" + text + ""; }, diff --git a/app/assets/templates/faq_keyboard_shortcuts_tpl.jst.hbs b/app/assets/templates/faq_keyboard_shortcuts_tpl.jst.hbs new file mode 100644 index 000000000..1f3074bbd --- /dev/null +++ b/app/assets/templates/faq_keyboard_shortcuts_tpl.jst.hbs @@ -0,0 +1,15 @@ + +
diff --git a/app/assets/templates/help_tpl.jst.hbs b/app/assets/templates/help_tpl.jst.hbs index 5048b0d43..f54bdea16 100644 --- a/app/assets/templates/help_tpl.jst.hbs +++ b/app/assets/templates/help_tpl.jst.hbs @@ -63,6 +63,10 @@ {{ title_tags }} {{ title_tags }} +