Improve applicationCache management
Benjamin Renard

Benjamin Renard commited on 2016-09-12 21:18:27
Showing 1 changed files, with 5 additions and 0 deletions.

... ...
@@ -1082,10 +1082,15 @@ $( document ).ready( function() {
1082 1082
   view_home();
1083 1083
   pleaseWaitHide();
1084 1084
 
1085
+  if (window.applicationCache.status==window.applicationCache.UNCACHED) {
1086
+    $('#update_app').parent().remove();
1087
+  }
1088
+  else {
1085 1089
     $('#update_app').bind('click',updateApp);
1086 1090
     window.applicationCache.addEventListener('updateready', onUpdateReady);
1087 1091
     window.applicationCache.addEventListener('noupdate', onNoUpdate);
1088 1092
     if(window.applicationCache.status === window.applicationCache.UPDATEREADY) {
1089 1093
       onUpdateReady();
1090 1094
     }
1095
+  }
1091 1096
 } );
1092 1097