@@ -639,24 +639,30 @@
}
// This next bit of code is to deal with the updated session issue
- window.addEventListener('load', function(e) {
- window.applicationCache.addEventListener('updateready', function(e) {
- if (window.applicationCache.status == window.applicationCache.UPDATEREADY) {
- // Browser downloaded a new app cache.
- // Swap it in and reload the page to get the new hotness.
- window.applicationCache.swapCache();
- if (confirm(_("A new version of this site is available. Load it?"))) {
- window.location.reload();
+ if( typeof window.applicationCache !== "undefined" ){
+ window.addEventListener('load', function(e) {
+ window.applicationCache.addEventListener('updateready', function(e) {
+ if (window.applicationCache.status == window.applicationCache.UPDATEREADY) {
+ // Browser downloaded a new app cache.
+ // Swap it in and reload the page to get the new hotness.
+ window.applicationCache.swapCache();
+ if (confirm(_("A new version of this site is available. Load it?"))) {
+ window.location.reload();
+ }
+ } else {
+ // Manifest didn't changed. Nothing new to server.
}
- } else {
- // Manifest didn't changed. Nothing new to server.
- }
+ }, false);
}, false);
- }, false);
+ }
$(document).ready(function () {
- kohadb.initialize();
+ if( typeof window.applicationCache === "undefined" ){
+ $("#offline-home div").html('
' + _("Offline circulation disabled") + '
' + _("Your browser is not compatible with the built-in offline circulation tool.") + '
');
+ } else {
+ kohadb.initialize();
+ }
$('#header_search #circ_search .tip').text(_("Enter patron card number:"));
$('ul[aria-labelledby="logged-in-menu"]').html('
' + _("You cannot change your branch or logout while using offline circulation") + '');
--