소스 검색

Redirect to the index page when rebooting the app from the settings page

Thibaut Courouble 7 년 전
부모
커밋
66cba23d9c
2개의 변경된 파일2개의 추가작업 그리고 6개의 파일을 삭제
  1. 1 1
      assets/javascripts/app/app.coffee
  2. 1 5
      assets/javascripts/app/appcache.coffee

+ 1 - 1
assets/javascripts/app/app.coffee

@@ -158,7 +158,7 @@
     @updateChecker = new app.UpdateChecker()
 
   reboot: ->
-    if location.pathname isnt '/'
+    if location.pathname isnt '/' and location.pathname isnt '/settings'
       window.location = "/##{location.pathname}"
     else
       window.location = '/'

+ 1 - 5
assets/javascripts/app/appcache.coffee

@@ -27,11 +27,7 @@ class app.AppCache
     return
 
   reload: ->
-    $.on @cache, 'updateready noupdate error', ->
-      if location.pathname isnt '/'
-        window.location = "/##{location.pathname}"
-      else
-        window.location = '/'
+    $.on @cache, 'updateready noupdate error', -> app.reboot()
     @notifyUpdate = false
     @notifyProgress = true
     try @cache.update() catch