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