Lines 73-81
Link Here
|
73 |
<div id="offline-sync" style="display: none;" class="offline-sync"> |
73 |
<div id="offline-sync" style="display: none;" class="offline-sync"> |
74 |
<div id="toolbar" class="btn-toolbar"> |
74 |
<div id="toolbar" class="btn-toolbar"> |
75 |
[% IF (AllowOfflineCirculation) %] |
75 |
[% IF (AllowOfflineCirculation) %] |
76 |
<a href="#" id="download-records" class="btn btn-default"><i class="fa fa-arrow-down"></i>Download records</a> |
76 |
<a href="#" id="download-records" class="btn btn-default"><i class="fa fa-arrow-down"></i> Download records</a> |
77 |
[% END %] |
77 |
[% END %] |
78 |
<a href="#" id="upload-transactions" class="btn btn-default"><i class="fa fa-arrow-up"></i>Upload transactions</a> |
78 |
<a href="#" id="upload-transactions" class="btn btn-default"><i class="fa fa-arrow-up"></i> Upload transactions</a> |
79 |
</div> |
79 |
</div> |
80 |
<h1>Offline circulation</h1> |
80 |
<h1>Offline circulation</h1> |
81 |
<div class="row"> |
81 |
<div class="row"> |
Lines 639-662
Link Here
|
639 |
} |
639 |
} |
640 |
|
640 |
|
641 |
// This next bit of code is to deal with the updated session issue |
641 |
// This next bit of code is to deal with the updated session issue |
642 |
window.addEventListener('load', function(e) { |
642 |
if( typeof window.applicationCache !== "undefined" ){ |
643 |
window.applicationCache.addEventListener('updateready', function(e) { |
643 |
window.addEventListener('load', function(e) { |
644 |
if (window.applicationCache.status == window.applicationCache.UPDATEREADY) { |
644 |
window.applicationCache.addEventListener('updateready', function(e) { |
645 |
// Browser downloaded a new app cache. |
645 |
if (window.applicationCache.status == window.applicationCache.UPDATEREADY) { |
646 |
// Swap it in and reload the page to get the new hotness. |
646 |
// Browser downloaded a new app cache. |
647 |
window.applicationCache.swapCache(); |
647 |
// Swap it in and reload the page to get the new hotness. |
648 |
if (confirm(_("A new version of this site is available. Load it?"))) { |
648 |
window.applicationCache.swapCache(); |
649 |
window.location.reload(); |
649 |
if (confirm(_("A new version of this site is available. Load it?"))) { |
|
|
650 |
window.location.reload(); |
651 |
} |
652 |
} else { |
653 |
// Manifest didn't changed. Nothing new to server. |
650 |
} |
654 |
} |
651 |
} else { |
655 |
}, false); |
652 |
// Manifest didn't changed. Nothing new to server. |
|
|
653 |
} |
654 |
}, false); |
656 |
}, false); |
655 |
}, false); |
657 |
} |
656 |
|
658 |
|
657 |
|
659 |
|
658 |
$(document).ready(function () { |
660 |
$(document).ready(function () { |
659 |
kohadb.initialize(); |
661 |
if( typeof window.applicationCache === "undefined" ){ |
|
|
662 |
$("#offline-home div").html('<div class="dialog alert"><h3>' + _("Offline circulation disabled") + '</h3><p>' + _("Your browser is not compatible with the built-in offline circulation tool.") + '</div>'); |
663 |
} else { |
664 |
kohadb.initialize(); |
665 |
} |
660 |
$('#header_search #circ_search .tip').text(_("Enter patron card number:")); |
666 |
$('#header_search #circ_search .tip').text(_("Enter patron card number:")); |
661 |
|
667 |
|
662 |
$('ul[aria-labelledby="logged-in-menu"]').html('<li><a class="toplinks">' + _("You cannot change your branch or logout while using offline circulation") + '</a></li>'); |
668 |
$('ul[aria-labelledby="logged-in-menu"]').html('<li><a class="toplinks">' + _("You cannot change your branch or logout while using offline circulation") + '</a></li>'); |
663 |
- |
|
|