diff --git a/circ/offline-mf.pl b/circ/offline-mf.pl index 010c86a0f8..87bc67f1cf 100755 --- a/circ/offline-mf.pl +++ b/circ/offline-mf.pl @@ -1,10 +1,11 @@ #!/usr/bin/perl +# Copyright 2013 C & P Bibliography Services # This file is part of Koha. # # Koha is free software; you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later +# Foundation; either version 3 of the License, or (at your option) any later # version. # # Koha is distributed in the hope that it will be useful, but WITHOUT ANY @@ -21,14 +22,16 @@ use CGI; use C4::Auth; my $query = new CGI; -my ($template, $loggedinuser, $cookie, $flags) -= get_template_and_user({template_name => "circ/offline-mf.tt", - query => $query, - type => "intranet", - authnotrequired => 0, - flagsrequired => {circulate => "circulate_remaining_permissions"}, - }); +my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( + { + template_name => "circ/offline-mf.tt", + query => $query, + type => "intranet", + authnotrequired => 0, + flagsrequired => { circulate => "circulate_remaining_permissions" }, + } +); $template->{'VARS'}->{'cookie'} = $cookie; -print $query->header(-type => 'text/cache-manifest', cookie => $cookie); +print $query->header( -type => 'text/cache-manifest', cookie => $cookie ); print $template->output; diff --git a/circ/offline.pl b/circ/offline.pl index b33dc5e453..ebc161be51 100755 --- a/circ/offline.pl +++ b/circ/offline.pl @@ -1,10 +1,11 @@ #!/usr/bin/perl +# Copyright 2013 C & P Bibliography Services # This file is part of Koha. # # Koha is free software; you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later +# Foundation; either version 3 of the License, or (at your option) any later # version. # # Koha is distributed in the hope that it will be useful, but WITHOUT ANY @@ -23,14 +24,18 @@ use C4::Output; use C4::Context; my $query = new CGI; -my ($template, $loggedinuser, $cookie, $flags) -= get_template_and_user({template_name => "circ/offline.tt", - query => $query, - type => "intranet", - authnotrequired => 0, - flagsrequired => {circulate => "circulate_remaining_permissions"}, - }); +my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( + { + template_name => "circ/offline.tt", + query => $query, + type => "intranet", + authnotrequired => 0, + flagsrequired => { circulate => "circulate_remaining_permissions" }, + } +); -$template->{'VARS'}->{'AllowOfflineCirculation'} = C4::Context->preference('AllowOfflineCirculation'); -$template->{'VARS'}->{'maxoutstanding'} = C4::Context->preference('maxoutstanding') || 0; +$template->{'VARS'}->{'AllowOfflineCirculation'} = + C4::Context->preference('AllowOfflineCirculation'); +$template->{'VARS'}->{'maxoutstanding'} = + C4::Context->preference('maxoutstanding') || 0; output_html_with_http_headers $query, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css index e262249c9b..b5e8f40efa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -451,6 +451,10 @@ div.patroninfo h5 { padding-bottom : .5em; } +div.patroninfo h5:empty { + border-right: none; +} + div.patroninfo ul { border : 0; border-right:1px solid #b9d8d9; diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/offlinecirc.js b/koha-tmpl/intranet-tmpl/prog/en/js/offlinecirc.js index 4645d17535..ae45c2ae45 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/offlinecirc.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/offlinecirc.js @@ -52,6 +52,9 @@ kohadb.loadSetting = function (key, callback) { $.indexedDB("koha").transaction(["offline_settings"]).then(function(){ }, function(err, e){ + if (typeof callback === 'function') { + callback(key, undefined); + } }, function(transaction){ var settings = transaction.objectStore("offline_settings"); settings.get(key).done(function (item, error) { @@ -80,9 +83,10 @@ }, function(dbtransaction) { var transactions = dbtransaction.objectStore("transactions"); transactions.put(newtrans); + kohadb.saveSetting('dirty', true); }); }; -}( window.kohadb = window.bndb || {}, jQuery )); +}( window.kohadb = window.kohadb || {}, jQuery )); if ( !Date.prototype.toMySQLString ) { ( function() { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline-mf.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline-mf.tt index 93a0259ccc..9d71f5a3a3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline-mf.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline-mf.tt @@ -4,40 +4,38 @@ CACHE MANIFEST # Explicitly cached 'master entries'. CACHE: /cgi-bin/koha/circ/offline.pl -/intranet-tmpl/lib/bootstrap/bootstrap.min.css -/intranet-tmpl/lib/bootstrap/bootstrap.min.js -/intranet-tmpl/lib/jquery/jquery-ui.css -/intranet-tmpl/lib/jquery/jquery-ui.js -/intranet-tmpl/lib/jquery/jquery.js -/intranet-tmpl/lib/jquery/plugins/jquery.cookie.min.js -/intranet-tmpl/lib/jquery/plugins/jquery.highlight-3.js -/intranet-tmpl/lib/jquery/plugins/jquery.hotkeys.min.js -/intranet-tmpl/lib/jquery/plugins/jquery.indexeddb.js -/intranet-tmpl/lib/jquery/plugins/jquery.validate.min.js -/intranet-tmpl/prog/en/css/print.css -/intranet-tmpl/prog/en/css/staff-global.css -/intranet-tmpl/prog/en/js/basket.js -/intranet-tmpl/prog/en/js/offlinecirc.js -/intranet-tmpl/prog/en/js/staff-global.js -/intranet-tmpl/prog/en/lib/jquery/plugins/jquery-ui-timepicker-addon.js -/intranet-tmpl/prog/en/lib/yui/button/button-min.js -/intranet-tmpl/prog/en/lib/yui/container/container_core-min.js -/intranet-tmpl/prog/en/lib/yui/menu/menu-min.js -/intranet-tmpl/prog/en/lib/yui/reset-fonts-grids.css -/intranet-tmpl/prog/en/lib/yui/skin.css -/intranet-tmpl/prog/en/lib/yui/utilities/utilities.js -/intranet-tmpl/prog/img/cart-small.gif -/intranet-tmpl/prog/img/glyphicons-halflings-koha.png -/intranet-tmpl/prog/img/koha-logo-medium.gif -/intranet-tmpl/prog/img/loading.gif -/intranet-tmpl/prog/sound/beep.ogg -/intranet-tmpl/prog/sound/critical.ogg +[% interface %]/lib/bootstrap/bootstrap.min.css +[% interface %]/lib/bootstrap/bootstrap.min.js +[% interface %]/lib/jquery/jquery-ui.css +[% interface %]/lib/jquery/jquery-ui.js +[% interface %]/lib/jquery/jquery.js +[% interface %]/lib/jquery/plugins/jquery.cookie.min.js +[% interface %]/lib/jquery/plugins/jquery.highlight-3.js +[% interface %]/lib/jquery/plugins/jquery.hotkeys.min.js +[% interface %]/lib/jquery/plugins/jquery.indexeddb.js +[% interface %]/lib/jquery/plugins/jquery.validate.min.js +[% themelang %]/css/print.css +[% themelang %]/css/staff-global.css +[% themelang %]/js/basket.js +[% themelang %]/js/offlinecirc.js +[% themelang %]/js/staff-global.js +[% themelang %]/lib/jquery/plugins/jquery-ui-timepicker-addon.js +[% themelang %]/lib/yui/button/button-min.js +[% themelang %]/lib/yui/container/container_core-min.js +[% themelang %]/lib/yui/menu/menu-min.js +[% themelang %]/lib/yui/reset-fonts-grids.css +[% themelang %]/lib/yui/skin.css +[% themelang %]/lib/yui/utilities/utilities.js +[% interface %]/prog/img/cart-small.gif +[% interface %]/prog/img/glyphicons-halflings-koha.png +[% interface %]/prog/img/koha-logo-medium.gif +[% interface %]/prog/img/loading.gif +[% interface %]/prog/sound/beep.ogg +[% interface %]/prog/sound/critical.ogg # Resources that require the user to be online. NETWORK: * -# static.html will be served if main.py is inaccessible -# offline.jpg will be served in place of all images in images/large/ -# offline.html will be served in place of all other .html files +# Resources that can be substituted if the user is offline FALLBACK: diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt index 772d9db3bc..f2e454408f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt @@ -2,22 +2,26 @@ [% IF (AllowOfflineCirculation) %] [% SET manifestattr = 'manifest="/cgi-bin/koha/circ/offline-mf.pl"' %] [% END %] -[% IF ( bidi ) %][% ELSE %][% END %] +[% IF ( bidi && AllowOfflineCirculation ) %] +[% ELSIF ( bidi ) %] +[% ELSIF ( AllowOfflineCirculation ) %] +[% ELSE %][% END %] Koha › Circulation [% INCLUDE 'doc-head-close.inc' %] - - + +