diff options
author | B. Stack <bgstack15@gmail.com> | 2022-08-12 14:53:46 +0000 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-08-12 14:53:46 +0000 |
commit | 81431ce6cce507535d871020fcb4c9b3844ffd4a (patch) | |
tree | 70dcca6002aff90633df7b13e2a0b5789096ba1e /radicale_infcloud/web/cache_handler.js | |
parent | add my preferred contact display settings (diff) | |
download | radicaleinfcloud-81431ce6cce507535d871020fcb4c9b3844ffd4a.tar.gz radicaleinfcloud-81431ce6cce507535d871020fcb4c9b3844ffd4a.tar.bz2 radicaleinfcloud-81431ce6cce507535d871020fcb4c9b3844ffd4a.zip |
Add upload functionality
Diffstat (limited to 'radicale_infcloud/web/cache_handler.js')
-rw-r--r-- | radicale_infcloud/web/cache_handler.js | 60 |
1 files changed, 32 insertions, 28 deletions
diff --git a/radicale_infcloud/web/cache_handler.js b/radicale_infcloud/web/cache_handler.js index e21fb63..a285d09 100644 --- a/radicale_infcloud/web/cache_handler.js +++ b/radicale_infcloud/web/cache_handler.js @@ -43,37 +43,41 @@ window.applicationCache.addEventListener('updateready', function(){ // Check if a new cache is available on page load. window.addEventListener('load', function(e) { - window.applicationCache.addEventListener('cached', function(e) + // Suppress useless warning/errors about applicationCache not existing. + if(window.applicationCache) { - if(!isUserLogged) - window.location.reload(); - else - $('#cacheDialog').css('display','block'); - }, false); + window.applicationCache.addEventListener('cached', function(e) + { + if(!isUserLogged) + window.location.reload(); + else + $('#cacheDialog').css('display','block'); + }, false); - window.applicationCache.addEventListener('updateready', function(e) - { - if(!isUserLogged) - window.location.reload(); - else - $('#cacheDialog').css('display','block'); - }, false); + window.applicationCache.addEventListener('updateready', function(e) + { + if(!isUserLogged) + window.location.reload(); + else + $('#cacheDialog').css('display','block'); + }, false); - window.applicationCache.addEventListener('obsolete', function(e) - { - if(!isUserLogged) - window.location.reload(); - else - $('#cacheDialog').css('display','block'); - }, false); + window.applicationCache.addEventListener('obsolete', function(e) + { + if(!isUserLogged) + window.location.reload(); + else + $('#cacheDialog').css('display','block'); + }, false); - window.applicationCache.addEventListener('noupdate', function(e) - { - if(!isUserLogged) + window.applicationCache.addEventListener('noupdate', function(e) { - clearInterval(globalCacheUpdateInterval); - globalCacheUpdateInterval=setInterval(function(){window.applicationCache.update();}, 300000); - //$('#LoginPage .window').css('display', 'inline-block'); - } - }, false); + if(!isUserLogged) + { + clearInterval(globalCacheUpdateInterval); + globalCacheUpdateInterval=setInterval(function(){window.applicationCache.update();}, 300000); + //$('#LoginPage .window').css('display', 'inline-block'); + } + }, false); + }; }, false); |