Remove application cache support (window.applicationCache is deprecated)
This commit is contained in:
parent
801af67433
commit
958598b07c
2 changed files with 0 additions and 48 deletions
|
@ -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
|
||||
********************/
|
||||
|
@ -993,17 +958,5 @@ $( document ).ready( function() {
|
|||
|
||||
$('#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();
|
||||
});
|
||||
|
|
|
@ -60,7 +60,6 @@
|
|||
<li><a id='clear_local_data'><span class='glyphicon glyphicon-trash'></span> Purger les données locales</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a id='update_app'><span class='glyphicon glyphicon-refresh'></span> Mise à jour de l'application</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue