Fixes #849.
Unified · Split
| @@ -157,10 +157,17 @@ · 156 unmodified lines | ||
| 157 | 157 | new app.views.Updates() |
| 158 | 158 | @updateChecker = new app.UpdateChecker() |
| 159 | 159 | |
| 160 | + reboot: -> | |
| 161 | + if location.pathname isnt '/' | |
| 162 | + window.location = "/##{location.pathname}" | |
| 163 | + else | |
| 164 | + window.location = '/' | |
| 165 | + return | |
| 166 | + | |
| 160 | 167 | reload: -> |
| 161 | 168 | @docs.clearCache() |
| 162 | 169 | @disabledDocs.clearCache() |
| 163 | − if @appCache then @appCache.reload() else window.location = '/' | |
| 170 | + if @appCache then @appCache.reload() else @reboot() | |
| 164 | 171 | return |
| 165 | 172 | |
| 166 | 173 | reset: -> |
| @@ -27,7 +27,11 @@ class app.AppCache · 26 unmodified lines | ||
| 27 | 27 | return |
| 28 | 28 | |
| 29 | 29 | reload: -> |
| 30 | − $.on @cache, 'updateready noupdate error', -> window.location = '/' | |
| 30 | + $.on @cache, 'updateready noupdate error', -> | |
| 31 | + if location.pathname isnt '/' | |
| 32 | + window.location = "/##{location.pathname}" | |
| 33 | + else | |
| 34 | + window.location = '/' | |
| 31 | 35 | @notifyUpdate = false |
| 32 | 36 | @notifyProgress = true |
| 33 | 37 | try @cache.update() catch |
| @@ -77,7 +77,7 @@ class app.views.Document extends app.View · 76 unmodified lines | ||
| 77 | 77 | switch target.getAttribute('data-behavior') |
| 78 | 78 | when 'back' then history.back() |
| 79 | 79 | when 'reload' then window.location.reload() |
| 80 | − when 'reboot' then window.location = '/' | |
| 80 | + when 'reboot' then app.reboot() | |
| 81 | 81 | when 'hard-reload' then app.reload() |
| 82 | 82 | when 'reset' then app.reset() if confirm('Are you sure you want to reset DevDocs?') |
| 83 | 83 | return |