Improve applicationCache management
This commit is contained in:
parent
045cc25755
commit
da6aab0146
1 changed files with 10 additions and 5 deletions
15
inc/myco.js
15
inc/myco.js
|
@ -1082,10 +1082,15 @@ $( document ).ready( function() {
|
||||||
view_home();
|
view_home();
|
||||||
pleaseWaitHide();
|
pleaseWaitHide();
|
||||||
|
|
||||||
$('#update_app').bind('click',updateApp);
|
if (window.applicationCache.status==window.applicationCache.UNCACHED) {
|
||||||
window.applicationCache.addEventListener('updateready', onUpdateReady);
|
$('#update_app').parent().remove();
|
||||||
window.applicationCache.addEventListener('noupdate', onNoUpdate);
|
}
|
||||||
if(window.applicationCache.status === window.applicationCache.UPDATEREADY) {
|
else {
|
||||||
onUpdateReady();
|
$('#update_app').bind('click',updateApp);
|
||||||
|
window.applicationCache.addEventListener('updateready', onUpdateReady);
|
||||||
|
window.applicationCache.addEventListener('noupdate', onNoUpdate);
|
||||||
|
if(window.applicationCache.status === window.applicationCache.UPDATEREADY) {
|
||||||
|
onUpdateReady();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
Loading…
Reference in a new issue