Display waiting modal during update checking
Benjamin Renard

Benjamin Renard commited on 2014-11-24 18:27:52
Showing 2 changed files, with 7 additions and 2 deletions.

... ...
@@ -1,5 +1,5 @@
1 1
 CACHE MANIFEST
2
-# Date : 2014/11/22 - Version : 11
2
+# Date : 2014/11/24 - Version : 1
3 3
 
4 4
 CACHE:
5 5
 index.html
... ...
@@ -954,7 +954,11 @@ pleaseWaitHide=function() {
954 954
  * Cache / Update
955 955
  *************************/
956 956
 
957
+_checkForUpgrade=false;
957 958
 onUpdateReady=function() {
959
+  if (_checkForUpgrade) {
960
+    pleaseWaitHide();
961
+  }
958 962
   myconfirm(
959 963
     "Une nouvelle version de l'application est disponible. Voulez-vous lancer la mise à jour ?",
960 964
     onConfirmUpdate,null,{} 
... ...
@@ -966,14 +970,15 @@ onConfirmUpdate=function() {
966 970
   location.reload();  
967 971
 }
968 972
 
969
-_checkForUpgrade=false;
970 973
 updateApp = function() {
974
+  pleaseWaitShow();
971 975
   _checkForUpgrade=true;
972 976
   window.applicationCache.update();
973 977
 }
974 978
 
975 979
 onNoUpdate = function() {
976 980
   if (_checkForUpgrade) {
981
+    pleaseWaitHide();
977 982
     _checkForUpgrade=false;
978 983
     alert('Aucune mise à jour disponible');
979 984
   }
980 985