History

Press esc twice to reset to root page in single doc mode

Thibaut committed 12 years ago

Commit cf17f741 parent 7e09b442 files · +7 −2Browse files

Unified · Split

2 files
  1. assets/javascripts/templates/pages/help_tmpl.coffee +1 −1
  2. assets/javascripts/views/layout/document.coffee +6 −1
assets/javascripts/templates/pages/help_tmpl.coffee+1−1
@@ -88,7 +88,7 @@ app.templates.helpPage = """ · 87 unmodified lines
8888 <dd class="_shortcuts-dd">Search on Google
8989 <dt class="_shortcuts-dt">
9090 <code class="_shortcut-code">escape</code>
91− <dd class="_shortcuts-dd">Reset
91+ <dd class="_shortcuts-dd">Reset<br>(press twice in single doc mode)
9292 <dt class="_shortcuts-dt">
9393 <code class="_shortcut-code">?</code>
9494 <dd class="_shortcuts-dd">Show this page
assets/javascripts/views/layout/document.coffee+6−1
@@ -24,7 +24,12 @@ class app.views.Document extends app.View · 23 unmodified lines
2424 app.router.show '/help#shortcuts'
2525
2626 onEscape: ->
27− app.router.show if app.isSingleDoc() then app.doc.fullPath() else '/'
27+ path = if !app.isSingleDoc() or location.pathname is app.doc.fullPath()
28+ '/'
29+ else
30+ app.doc.fullPath()
31+
32+ app.router.show(path)
2833
2934 onBack: ->
3035 history.back()