← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13352: minor fix

 

------------------------------------------------------------
revno: 13352
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-12-20 15:54:16 +0100
message:
  minor fix
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.appcache.js


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.appcache.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.appcache.js	2013-12-18 09:42:14 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.appcache.js	2013-12-20 14:54:16 +0000
@@ -29,7 +29,15 @@
 var dhis2 = dhis2 || {};
 dhis2['appcache'] = dhis2['appcache'] || {};
 
+function applicationCacheSupported() {
+    return typeof window.applicationCache !== 'undefined';
+}
+
 $(function() {
+    if(!applicationCacheSupported()) {
+        return;
+    }
+
     $(window.applicationCache).on('updateready', function( e ) {
         if( window.applicationCache.status == window.applicationCache.UPDATEREADY ) {
             // Browser downloaded a new app cache.