Unified · Split
| @@ -104,6 +104,9 @@ class app.Shortcuts · 103 unmodified lines | ||
| 104 | 104 | when 71 |
| 105 | 105 | @trigger 'altG' |
| 106 | 106 | false |
| 107 | + when 82 | |
| 108 | + @trigger 'altR' | |
| 109 | + false | |
| 107 | 110 | |
| 108 | 111 | handleKeypressEvent: (event) -> |
| 109 | 112 | if event.which is 63 and not event.target.value |
| @@ -77,6 +77,9 @@ app.templates.helpPage = """ · 76 unmodified lines | ||
| 77 | 77 | </dl> |
| 78 | 78 | <h3 class="_shortcuts-title">Misc</h3> |
| 79 | 79 | <dl class="_shortcuts-dl"> |
| 80 | + <dt class="_shortcuts-dt"> | |
| 81 | + <code class="_shortcut-code">Alt + r</code> | |
| 82 | + <dd class="_shortcuts-dd">Reveal current page in sidebar | |
| 80 | 83 | <dt class="_shortcuts-dt"> |
| 81 | 84 | <code class="_shortcut-code">Alt + g</code> |
| 82 | 85 | <dd class="_shortcuts-dd">Search on Google |
| @@ -25,7 +25,8 @@ newsItem = (date, news) -> · 24 unmodified lines | ||
| 25 | 25 | |
| 26 | 26 | app.news = [ |
| 27 | 27 | [ 1389484800000, # January 12, 2013 |
| 28 | − """ Added <code class="_label">Alt + g</code> shortcut for searching on Google. """ | |
| 28 | + """ Added <code class="_label">Alt + g</code> shortcut for searching on Google. """, | |
| 29 | + """ Added <code class="_label">Alt + r</code> shortcut for revealing the current page in the sidebar. """ | |
| 29 | 30 | ], [ |
| 30 | 31 | 1386979200000, # December 14, 2013 |
| 31 | 32 | """ New <a href="/postgresql/">PostgreSQL</a> documentation """ |
| @@ -6,6 +6,7 @@ class app.views.Sidebar extends app.View · 5 unmodified lines | ||
| 6 | 6 | click: 'onClick' |
| 7 | 7 | |
| 8 | 8 | @shortcuts: |
| 9 | + altR: 'onAltR' | |
| 9 | 10 | escape: 'onEscape' |
| 10 | 11 | |
| 11 | 12 | init: -> |
| @@ -85,6 +86,10 @@ class app.views.Sidebar extends app.View · 73 unmodified lines | ||
| 85 | 86 | @showDocList() unless $.hasChild @el, event.target |
| 86 | 87 | return |
| 87 | 88 | |
| 89 | + onAltR: => | |
| 90 | + @showDocList true | |
| 91 | + return | |
| 92 | + | |
| 88 | 93 | onEscape: => |
| 89 | 94 | @showDocList true |
| 90 | 95 | @scrollToTop() |