Remove application cache support (window.applicationCache is deprecated)

This commit is contained in:
Benjamin Renard 2021-12-21 19:38:28 +01:00 committed by root
parent 801af67433
commit 958598b07c
2 changed files with 0 additions and 48 deletions

View file

@ -823,41 +823,6 @@ navbar_collapse_hide=function() {
} }
} }
/**************************
* Cache / Update
*************************/
_checkForUpgrade=false;
onUpdateReady=function() {
if (_checkForUpgrade) {
pleaseWaitHide();
}
myconfirm(
"Une nouvelle version de l'application est disponible. Voulez-vous lancer la mise à jour ?",
onConfirmUpdate,null,{}
);
}
onConfirmUpdate=function() {
window.applicationCache.swapCache();
location.reload();
}
updateApp = function() {
navbar_collapse_hide();
pleaseWaitShow();
_checkForUpgrade=true;
window.applicationCache.update();
}
onNoUpdate = function() {
if (_checkForUpgrade) {
pleaseWaitHide();
_checkForUpgrade=false;
alert('Aucune mise à jour disponible');
}
}
/******************** /********************
* Clear local data * Clear local data
********************/ ********************/
@ -993,17 +958,5 @@ $( document ).ready( function() {
$('#app-name').bind('click', show_scases); $('#app-name').bind('click', show_scases);
if (window.applicationCache.status==window.applicationCache.UNCACHED) {
$('#update_app').parent().remove();
}
else {
$('#update_app').bind('click',updateApp);
window.applicationCache.addEventListener('updateready', onUpdateReady);
window.applicationCache.addEventListener('noupdate', onNoUpdate);
if(window.applicationCache.status === window.applicationCache.UPDATEREADY) {
onUpdateReady();
}
}
pleaseWaitHide(); pleaseWaitHide();
}); });

View file

@ -60,7 +60,6 @@
<li><a id='clear_local_data'><span class='glyphicon glyphicon-trash'></span> Purger les données locales</a></li> <li><a id='clear_local_data'><span class='glyphicon glyphicon-trash'></span> Purger les données locales</a></li>
</ul> </ul>
</li> </li>
<li><a id='update_app'><span class='glyphicon glyphicon-refresh'></span> Mise à jour de l'application</a></li>
</ul> </ul>
</div> </div>
</div> </div>