From 268851aa5db8d3e8e1157a84d525ddd10beb4ddb Mon Sep 17 00:00:00 2001 From: erickson Date: Thu, 31 Jul 2008 15:45:25 +0000 Subject: [PATCH] Merged revisions 10174,10177-10179,10188,10190-10191,10193-10195,10199,10201-10202,10205,10208,10211-10216 via svnmerge from svn://svn.open-ils.org/ILS/trunk ........ r10174 | dbs | 2008-07-29 14:05:23 -0400 (Tue, 29 Jul 2008) | 2 lines Add default conify configuration to eg_vhost.conf ........ r10177 | miker | 2008-07-29 14:40:11 -0400 (Tue, 29 Jul 2008) | 1 line removing unnecessary SetEnv[If] stuff ........ r10178 | miker | 2008-07-29 15:10:57 -0400 (Tue, 29 Jul 2008) | 1 line thinko ... use the responder, which has the session, not the method pointer ........ r10179 | miker | 2008-07-29 16:56:38 -0400 (Tue, 29 Jul 2008) | 1 line preferred language and date filter fixes ........ r10188 | erickson | 2008-07-30 13:07:19 -0400 (Wed, 30 Jul 2008) | 6 lines Basic web-based selfcheck interface. This interface implements a subset of http://open-ils.org/dokuwiki/doku.php?id=scratchpad:simple_self_check ........ r10190 | erickson | 2008-07-30 13:09:39 -0400 (Wed, 30 Jul 2008) | 1 line oops, forgot the aliasmatch locale extraction for selfcheck ........ r10191 | miker | 2008-07-30 13:37:44 -0400 (Wed, 30 Jul 2008) | 1 line add a reasonable prefix to autogenerated TCNs ........ r10193 | erickson | 2008-07-30 14:01:28 -0400 (Wed, 30 Jul 2008) | 1 line falling back to existing is_true method ........ r10194 | miker | 2008-07-30 14:17:19 -0400 (Wed, 30 Jul 2008) | 1 line adjustment to previous fix (create or replace ... so it it cut-n-paste friendly) ........ r10195 | miker | 2008-07-30 14:18:53 -0400 (Wed, 30 Jul 2008) | 1 line ... and a typo fix to the fix ........ r10199 | miker | 2008-07-30 22:51:44 -0400 (Wed, 30 Jul 2008) | 1 line dependency ordering of config functions ........ r10201 | miker | 2008-07-30 23:56:24 -0400 (Wed, 30 Jul 2008) | 1 line dojo-based locale switcher ........ r10202 | miker | 2008-07-31 00:08:39 -0400 (Thu, 31 Jul 2008) | 1 line replace does not, um, replace in place ........ r10205 | miker | 2008-07-31 00:57:07 -0400 (Thu, 31 Jul 2008) | 1 line moving the lang switcher to a more reasonable location ........ r10208 | phasefx | 2008-07-31 01:05:11 -0400 (Thu, 31 Jul 2008) | 1 line In Holdings Maintenance, we used to disable some render child behavior for the top of the org hierarchy, to prevent in the case of PINES, 200-odd libraries from being retrieved and rendered. Now we check the can_have_vols for that org as well, to allow the interface to work with a single-org hierarchy ........ r10211 | phasefx | 2008-07-31 01:13:12 -0400 (Thu, 31 Jul 2008) | 1 line we want to explicitly set net access level for new users or the db will provide a default ........ r10212 | miker | 2008-07-31 01:21:54 -0400 (Thu, 31 Jul 2008) | 1 line make locale names and descriptions translatable ........ r10213 | miker | 2008-07-31 01:22:51 -0400 (Thu, 31 Jul 2008) | 1 line more locale switch work ........ r10214 | miker | 2008-07-31 01:40:58 -0400 (Thu, 31 Jul 2008) | 1 line make log message conditional ........ r10215 | miker | 2008-07-31 01:46:01 -0400 (Thu, 31 Jul 2008) | 1 line use the correct field as the pkey ........ r10216 | dbs | 2008-07-31 09:10:18 -0400 (Thu, 31 Jul 2008) | 2 lines Hush schema build messages that obscure potential real problems ........ git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@10218 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Evergreen/xul/staff_client/server/patron/ue.js | 1 + Open-ILS/examples/apache/eg.conf | 1 + Open-ILS/examples/apache/eg_vhost.conf | 38 ++- Open-ILS/examples/fm_IDL.xml | 6 +- .../perlmods/OpenILS/Application/Circ/Circulate.pm | 10 +- .../Application/Storage/Publisher/metabib.pm | 3 +- .../src/perlmods/OpenILS/Utils/CStoreEditor.pm | 2 +- Open-ILS/src/sql/Pg/010.schema.biblio.sql | 4 +- Open-ILS/src/sql/Pg/300.schema.staged_search.sql | 2 +- Open-ILS/src/sql/Pg/build-db.sh | 10 +- Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js | 1 + Open-ILS/web/opac/extras/selfcheck/selfcheck.css | 86 ++++++ Open-ILS/web/opac/extras/selfcheck/selfcheck.js | 307 +++++++++++++++++++++ Open-ILS/web/opac/extras/selfcheck/selfcheck.xml | 171 ++++++++++++ .../web/opac/extras/selfcheck/selfcheck_print.css | 15 + Open-ILS/web/opac/locale/en-US/opac.dtd | 34 +++ Open-ILS/web/opac/skin/default/css/layout.css | 2 +- .../web/opac/skin/default/xml/common/fonts.xml | 17 +- .../web/opac/skin/default/xml/common/js_common.xml | 14 +- .../xul/staff_client/server/cat/copy_browser.js | 5 +- 20 files changed, 696 insertions(+), 33 deletions(-) create mode 100644 Open-ILS/web/opac/extras/selfcheck/selfcheck.css create mode 100644 Open-ILS/web/opac/extras/selfcheck/selfcheck.js create mode 100644 Open-ILS/web/opac/extras/selfcheck/selfcheck.xml create mode 100644 Open-ILS/web/opac/extras/selfcheck/selfcheck_print.css diff --git a/Evergreen/xul/staff_client/server/patron/ue.js b/Evergreen/xul/staff_client/server/patron/ue.js index cb5a3d415d..8ab42d2e8a 100644 --- a/Evergreen/xul/staff_client/server/patron/ue.js +++ b/Evergreen/xul/staff_client/server/patron/ue.js @@ -229,6 +229,7 @@ function uEditNewPatron() { card.isnew(1); patron.card(card); patron.cards([card]); + patron.net_access_level(defaultNetLevel); patron.stat_cat_entries([]); patron.survey_responses([]); patron.addresses([]); diff --git a/Open-ILS/examples/apache/eg.conf b/Open-ILS/examples/apache/eg.conf index 3bee68a243..2b654a5eb1 100644 --- a/Open-ILS/examples/apache/eg.conf +++ b/Open-ILS/examples/apache/eg.conf @@ -46,6 +46,7 @@ PerlChildInitHandler OpenILS::WWW::AddedContent::child_init; # ---------------------------------------------------------------------------------- AliasMatch ^/opac/.*/skin/(.*)/(.*)/(.*) /openils/var/web/opac/skin/$1/$2/$3 AliasMatch ^/opac/.*/extras/slimpac/(.*) /openils/var/web/opac/extras/slimpac/$1 +AliasMatch ^/opac/.*/extras/selfcheck/(.*) /openils/var/web/opac/extras/selfcheck/$1 diff --git a/Open-ILS/examples/apache/eg_vhost.conf b/Open-ILS/examples/apache/eg_vhost.conf index c1e523da33..38d0ce5a99 100644 --- a/Open-ILS/examples/apache/eg_vhost.conf +++ b/Open-ILS/examples/apache/eg_vhost.conf @@ -240,6 +240,21 @@ RewriteRule ^/opac/extras/ac/jacket/(small|medium|large)/$ \ # ---------------------------------------------------------------------------------- +# Selfcheck interface +# ---------------------------------------------------------------------------------- + + SetHandler perl-script + PerlSetVar OILSProxyTitle "Selfcheck Login" + PerlSetVar OILSProxyDescription "Please log in to activate the selfcheck interface" + PerlSetVar OILSProxyPermissions "STAFF_LOGIN" + PerlHandler OpenILS::WWW::Proxy + Options +ExecCGI + PerlSendHeader On + allow from all + + + +# ---------------------------------------------------------------------------------- # Reports GUI # ---------------------------------------------------------------------------------- @@ -258,10 +273,31 @@ RewriteRule ^/opac/extras/ac/jacket/(small|medium|large)/$ \ allow from all +# ---------------------------------------------------------------------------------- +# Conify - next-generation Evergreen administration interface +# ---------------------------------------------------------------------------------- +RewriteEngine on +RewriteRule ^/conify/.*/global/(.*)$ /conify/global/$1 + + XMLEntStripPI "yes" + XMLEntEscapeScript "no" + XMLEntStripComments "yes" + XMLEntContentType "text/html; charset=utf-8" + AddOutputFilter INCLUDES .html + + SetHandler perl-script + PerlSetVar OILSProxyTitle "Dojo Admin Login" + PerlSetVar OILSProxyDescription "Please log in to administer Evergreen" + PerlSetVar OILSProxyPermissions "STAFF_LOGIN" + PerlHandler OpenILS::WWW::Proxy + Options +ExecCGI + PerlSendHeader On + allow from all + + # OpenURL 0.1 searching based on OpenSearch RewriteEngine on RewriteMap openurl prg:/openils/bin/openurl_map.pl RewriteCond %{QUERY_STRING} (^.*$) RewriteRule ^/openurl$ ${openurl:%1} [NE,PT] - diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index d971535a70..3c50aa5044 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -3786,14 +3786,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - + - - + + diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm index d7b42a79b3..99f14e8c08 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm @@ -11,14 +11,6 @@ my $U = "OpenILS::Application::AppUtils"; my %scripts; my $script_libs; -sub isTrue { - my $v = shift; - return 1 if ($v == 1); - return 1 if ($v =~ /^t/io); - return 1 if ($v =~ /^y/io); - return 0; -} - sub initialize { my $self = shift; @@ -1072,7 +1064,7 @@ sub build_checkout_circ_object { # if is_percent is true then the max->amount is # use as a percentage of the copy price - if (isTrue($max->is_percent)) { + if ($U->is_true($max->is_percent)) { my $cn = $self->editor->retrieve_asset_call_number($copy->call_number); diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm index b89e1f54ea..9be3c6a83f 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm @@ -2384,8 +2384,9 @@ sub staged_fts { my (@between,@statuses,@locations,@types,@forms,@lang,@aud,@lit_form,@vformats,@bib_level); if (!defined($args{preferred_language})) { + my $ses_locale = $client->session ? $client->session->session_locale : $default_preferred_language; $args{preferred_language} = - $locale_map{ $self->session->session_locale || $default_preferred_language } || 'eng'; + $locale_map{ $ses_locale } || 'eng'; } if (!defined($args{preferred_language_weight})) { diff --git a/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm b/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm index 4e28ebc36f..e33e31e014 100644 --- a/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm @@ -766,7 +766,7 @@ sub json_query { return undef; } - $self->log(I, "json_query : returned ".scalar(@$obj). " result(s)"); + $self->log(I, "json_query : returned ".scalar(@$obj). " result(s)") if (ref($obj)); return $obj; } diff --git a/Open-ILS/src/sql/Pg/010.schema.biblio.sql b/Open-ILS/src/sql/Pg/010.schema.biblio.sql index 4a9794e8ad..a7d66ab1d0 100644 --- a/Open-ILS/src/sql/Pg/010.schema.biblio.sql +++ b/Open-ILS/src/sql/Pg/010.schema.biblio.sql @@ -21,8 +21,8 @@ BEGIN; CREATE SCHEMA biblio; CREATE SEQUENCE biblio.autogen_tcn_value_seq; -CREATE FUNCTION biblio.next_autogen_tcn_value () RETURNS TEXT AS $$ - BEGIN RETURN nextval('biblio.autogen_tcn_value_seq'::TEXT); END; +CREATE OR REPLACE FUNCTION biblio.next_autogen_tcn_value () RETURNS TEXT AS $$ + BEGIN RETURN 'AUTOGENERATED-' || nextval('biblio.autogen_tcn_value_seq'::TEXT); END; $$ LANGUAGE PLPGSQL; CREATE TABLE biblio.record_entry ( diff --git a/Open-ILS/src/sql/Pg/300.schema.staged_search.sql b/Open-ILS/src/sql/Pg/300.schema.staged_search.sql index 7506d792eb..8014426eec 100644 --- a/Open-ILS/src/sql/Pg/300.schema.staged_search.sql +++ b/Open-ILS/src/sql/Pg/300.schema.staged_search.sql @@ -344,7 +344,7 @@ BEGIN where_clause = where_clause || $$ AND $$ || quote_literal(param_during) || $$ BETWEEN mrd.date1 AND mrd.date2 $$; END IF; - IF param_between IS NOT NULL AND array_upper(param_between, 1) > 0 THEN + IF param_between IS NOT NULL AND array_upper(param_between, 1) > 1 THEN where_clause = where_clause || $$ AND mrd.date1 BETWEEN $$ || array_to_string(param_bib_level, $$' AND '$$) || ' '; END IF; diff --git a/Open-ILS/src/sql/Pg/build-db.sh b/Open-ILS/src/sql/Pg/build-db.sh index 954a1b3092..cac8c01677 100755 --- a/Open-ILS/src/sql/Pg/build-db.sh +++ b/Open-ILS/src/sql/Pg/build-db.sh @@ -2,13 +2,14 @@ # --------------------------------------------------------------------------- # Store command line args for later use -# args: {db-host} {db-port} {db-name} {db-user} {db-password} +# args: {db-host} {db-port} {db-name} {db-user} {db-password} {verbose} # --------------------------------------------------------------------------- PGHOST=$1 PGPORT=$2 PGDATABASE=$3 PGUSER=$4 PGPASSWORD=$5 +VERBOSE=$6 export PGHOST PGPORT PGDATABASE PGUSER PGPASSWORD # --------------------------------------------------------------------------- @@ -131,7 +132,12 @@ for sql_file in $ordered_file_list; do # export ON_ERROR_STOP=1 export PGHOST PGPORT PGDATABASE PGUSER PGPASSWORD - psql -f $sql_file + # Hide most of the harmless messages that obscure real problems + if [ -z "$VERBOSE" ]; then + psql -f $sql_file 2>&1 | grep -v NOTICE | grep -v "^INSERT" + else + psql -f $sql_file + fi if [ $? != 0 ]; then cat < +* +* This program 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 version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +* 02110-1301, USA +----------------------------------------------------------------- */ + +var STAFF_SES_PARAM = 'ses'; +var patron = null +var itemBarcode = null; +var itemsOutTemplate = null; +var isRenewal = false; +var pendingXact = false; +var patronTimeout = 120000; +var timerId = null; +var printWrapper; +var printTemplate; +var successfulItems = {}; + + +function selfckInit() { + var cgi = new CGI(); + var staff = grabUser(cookieManager.read(STAFF_SES_PARAM) || cgi.param(STAFF_SES_PARAM)); + + /* + XXX we need org information (from the proxy?) + var t = fetchOrgSettingDefault(1, 'circ.selfcheck.patron_login_timeout'); + patronTimeout = (t) ? parseInt(t) * 1000 : patronTimeout; + */ + + if(!staff) { + // should not happen when behind the proxy + return alert('Staff must login'); + } + + unHideMe($('selfck-patron-login-container')); + $('selfck-patron-login-input').focus(); + + $('selfck-patron-login-input').onkeypress = function(evt) { + if(userPressedEnter(evt)) + selfckPatronLogin(); + }; + + $('selfck-item-barcode-input').onkeypress = function(evt) { + if(userPressedEnter(evt)) + selfckCheckout(); + }; + + // for debugging, allow passing the user barcode via param + var urlbc = new CGI().param('patron'); + if(urlbc) + selfckPatronLogin(urlbc); + + selfckStartTimer(); + + printWrapper = $('selfck-print-items-list'); + printTemplate = printWrapper.removeChild($n(printWrapper, 'selfck-print-items-template')); + itemsOutTemplate = $('selfck-items-out-tbody').removeChild($('selfck-items-out-row')); + +// selfckMkDummyCirc(); // testing only +} + +/* + * Start the logout timer + */ +function selfckStartTimer() { + timerId = setTimeout( + function() { + selfckLogoutPatron(); + }, + patronTimeout + ); + +} + +/* + * Reset the logout timer + */ +function selfckResetTimer() { + clearTimeout(timerId); + selfckStartTimer(); +} + +/* + * Clears fields and "logs out" the patron by reloading the page + */ +function selfckLogoutPatron() { + $('selfck-item-barcode-input').value = ''; // prevent browser caching + $('selfck-patron-login-input').value = ''; + if(patron) // page reload resets everything + location.href = location.href; +} + +/* + * Fetches the user by barcode and displays the item barcode input + */ + +function selfckPatronLogin(barcode) { + barcode = barcode || $('selfck-patron-login-input').value; + if(!barcode) return; + + var bcReq = new Request( + 'open-ils.actor:open-ils.actor.user.fleshed.retrieve_by_barcode', + G.user.session, barcode); + + bcReq.request.alertEvent = false; + + bcReq.callback(function(r) { + patron = r.getResultObject(); + if(checkILSEvent(patron)) { + if(patron.textcode == 'ACTOR_USER_NOT_FOUND') { + unHideMe($('selfck-patron-not-found')); + $('selfck-patron-login-input').select(); + return; + } + return alert(patron.textcode); + } + $('selfck-patron-login-input').value = ''; // reset the input + hideMe($('selfck-patron-login-container')); + unHideMe($('selfck-patron-checkout-container')); + $('selfck-patron-name-span').appendChild(text(patron.usrname())); + $('selfck-item-barcode-input').focus(); + }); + + bcReq.send(); +} + +/** + * Sends the checkout request + */ +function selfckCheckout() { + if(pendingXact) return; + selfckResetTimer(); + pendingXact = true; + isRenewal = false; + + removeChildren($('selfck-event-time')); + removeChildren($('selfck-event-span')); + + itemBarcode = $('selfck-item-barcode-input').value; + if(!itemBarcode) return; + + if (itemBarcode in successfulItems) { + selfckShowMsgNode({textcode:'dupe-barcode'}); + $('selfck-item-barcode-input').select(); + pendingXact = false; + return; + } + + var coReq = new Request( + 'open-ils.circ:open-ils.circ.checkout.full', + G.user.session, {patron_id:patron.id(), copy_barcode:itemBarcode}); + + coReq.request.alertEvent = false; + coReq.callback(selfckHandleCoResult); + coReq.send(); +} + +/** + * Handles the resulting event. If the item is already checked out, + * attempts renewal. Any other events will display a message + */ +function selfckHandleCoResult(r) { + var evt = r.getResultObject(); + + if(evt.textcode == 'SUCCESS') { + selfckDislplayCheckout(evt); + selfckShowMsgNode(evt); + successfulItems[itemBarcode] = 1; + + } else if(evt.textcode == 'OPEN_CIRCULATION_EXISTS') { + selfckRenew(); + + } else { + pendingXact = false; + selfckShowMsgNode(evt); + $('selfck-item-barcode-input').select(); + } +} + +/** + * Display event text in the messages block + */ +function selfckShowMsgNode(evt) { + var code = evt.textcode; + var msgspan = $('selfck-event-span'); + + // if we're not explicitly handling the event, just say "copy cannot circ" + if(!$('selfck-event-' + code)) + code = 'COPY_CIRC_NOT_ALLOWED'; + + appendClear($('selfck-event-time'), text(new Date().toLocaleString())); + appendClear($('selfck-event-span'), text($('selfck-event-' + code).innerHTML)); +} + +/** + * Renders a row in the checkouts table for the current circulation + */ +function selfckDislplayCheckout(evt) { + unHideMe($('selfck-items-out-table')); + + var template = itemsOutTemplate.cloneNode(true); + var copy = evt.payload.copy; + var record = evt.payload.record; + var circ = evt.payload.circ; + + if(record.isbn()) { + var pic = $n(template, 'selfck.jacket'); + pic.setAttribute('src', '../ac/jacket/small/'+cleanISBN(record.isbn())); + } + $n(template, 'selfck.barcode').appendChild(text(copy.barcode())); + $n(template, 'selfck.title').appendChild(text(record.title())); + $n(template, 'selfck.author').appendChild(text(record.author())); + $n(template, 'selfck.due_date').appendChild(text(circ.due_date().replace(/T.*/,''))); + $n(template, 'selfck.remaining').appendChild(text(circ.renewal_remaining())); + if(isRenewal) { + hideMe($n(template, 'selfck.cotype_co')); + unHideMe($n(template, 'selfck.cotype_rn')); + } + + $('selfck-items-out-tbody').appendChild(template); + $('selfck-item-barcode-input').value = ''; + + + // flesh out the printable version of the page as well + var ptemplate = printTemplate.cloneNode(true); + $n(ptemplate, 'title').appendChild(text(record.title())); + $n(ptemplate, 'barcode').appendChild(text(copy.barcode())); + $n(ptemplate, 'due_date').appendChild(text(circ.due_date().replace(/T.*/,''))); + printWrapper.appendChild(ptemplate); + + pendingXact = false; +} + +/** + * Checks to see if this item is checked out to the current patron. If so, + * this sends the renewal request. + */ +function selfckRenew() { + + // first, make sure the item is checked out to this patron + var detailReq = new Request( + 'open-ils.circ:open-ils.circ.copy_details.retrieve.barcode', + G.user.session, itemBarcode); + + detailReq.callback( + function(r) { + var details = r.getResultObject(); + if(details.circ.usr() == patron.id()) { + // OK, this is our item, renew it + isRenewal = true; + var rnReq = new Request( + 'open-ils.circ:open-ils.circ.renew', + G.user.session, {copy_barcode:itemBarcode}); + rnReq.request.alertEvent = false; + rnReq.callback(selfckHandleCoResult); + rnReq.send(); + } + } + ); + + detailReq.send(); +} + +/** + * Sets the print date and prints the page + */ +function selfckPrint() { + appendClear($('selfck-print-date'), text(new Date().toLocaleString())); + window.print(); +} + + +/** + * Test method for generating dummy data in the checkout tables + */ +function selfckMkDummyCirc() { + unHideMe($('selfck-items-out-table')); + + var template = itemsOutTemplate.cloneNode(true); + $n(template, 'selfck.barcode').appendChild(text('123456789')); + $n(template, 'selfck.title').appendChild(text('Test Title')); + $n(template, 'selfck.author').appendChild(text('Test Author')); + $n(template, 'selfck.due_date').appendChild(text('2008-08-01')); + $n(template, 'selfck.remaining').appendChild(text('1')); + $('selfck-items-out-tbody').appendChild(template); + + // flesh out the printable version of the page as well + var ptemplate = printTemplate.cloneNode(true); + $n(ptemplate, 'title').appendChild(text('Test Title')); + $n(ptemplate, 'barcode').appendChild(text('123456789')); + $n(ptemplate, 'due_date').appendChild(text('2008-08-01')); + printWrapper.appendChild(ptemplate); +} diff --git a/Open-ILS/web/opac/extras/selfcheck/selfcheck.xml b/Open-ILS/web/opac/extras/selfcheck/selfcheck.xml new file mode 100644 index 0000000000..b2a98dc282 --- /dev/null +++ b/Open-ILS/web/opac/extras/selfcheck/selfcheck.xml @@ -0,0 +1,171 @@ + + + + +]> + + + + + + + + + + + + + + + + + +
+ + +
+ &selfck.patron_barcode_label; + + + &selfck.event.patron_not_found; +
+ + +
+ + +
+
+ + &selfck.welcome; ! +
+ +
+ + +
+ + + + &selfck.event.co_success; + &selfck.event.unknown; + &selfck.event.patron_not_found; + &selfck.event.item_nocirc; + &selfck.event.item_noncat; + &selfck.event.dupe_barcode; + +
+ + +
+
+ +
&selfck.item_barcode_label;
+
+ + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
&selfck.barcode;&selfck.title;&selfck.author;&selfck.due_date;&selfck.remaining;&selfck.cotype;
+ &selfck.cotype_co; + &selfck.cotype_rn; +
+
+
+ + +
+
+
+ You checked out the following items: +
    +
  1. +
    + Barcode: + Due Date: +
  2. +
+
+
+ + + diff --git a/Open-ILS/web/opac/extras/selfcheck/selfcheck_print.css b/Open-ILS/web/opac/extras/selfcheck/selfcheck_print.css new file mode 100644 index 0000000000..18cd1ee99d --- /dev/null +++ b/Open-ILS/web/opac/extras/selfcheck/selfcheck_print.css @@ -0,0 +1,15 @@ +.noprint { + display: none; + visibility: hidden; +} +.print { + display: block; + visibility: visible; + width: 100%; + font-size: 10pt; + color: black; + font-family: Arial; + background-color: white; +} + + diff --git a/Open-ILS/web/opac/locale/en-US/opac.dtd b/Open-ILS/web/opac/locale/en-US/opac.dtd index 7fed843742..c493fbbb05 100644 --- a/Open-ILS/web/opac/locale/en-US/opac.dtd +++ b/Open-ILS/web/opac/locale/en-US/opac.dtd @@ -6,6 +6,7 @@ + @@ -634,3 +635,36 @@ Ensure Caps-Lock is off and try again or contact your local library."> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Open-ILS/web/opac/skin/default/css/layout.css b/Open-ILS/web/opac/skin/default/css/layout.css index 0eae7a793f..e0f7971fc2 100644 --- a/Open-ILS/web/opac/skin/default/css/layout.css +++ b/Open-ILS/web/opac/skin/default/css/layout.css @@ -74,7 +74,7 @@ table { border-collapse: collapse; } /* ---------------------------------------------------------------------- */ -#searchbar { margin-top: 18px; width: 100%; } +#searchbar { margin-top: 22px; width: 100%; } #searchbar table tr td {font-weight: bold; font-size: 8pt; } #searchbar select, input { border-collapse: collapse; font-size: 9pt; } .searchbar_item { margin: 3px; font-size: 9pt; } diff --git a/Open-ILS/web/opac/skin/default/xml/common/fonts.xml b/Open-ILS/web/opac/skin/default/xml/common/fonts.xml index 5c19b0a526..73cab30f07 100644 --- a/Open-ILS/web/opac/skin/default/xml/common/fonts.xml +++ b/Open-ILS/web/opac/skin/default/xml/common/fonts.xml @@ -1,10 +1,19 @@
- &common.textsize.title; - &common.textsize.regular; - &common.textsize.separator; - &common.textsize.large; + &common.textsize.title; + &common.textsize.regular; + &common.textsize.separator; + &common.textsize.large; +  |  + &common.language; + + +
diff --git a/Open-ILS/web/opac/skin/default/xml/common/js_common.xml b/Open-ILS/web/opac/skin/default/xml/common/js_common.xml index b390e8d141..79e179c2b1 100644 --- a/Open-ILS/web/opac/skin/default/xml/common/js_common.xml +++ b/Open-ILS/web/opac/skin/default/xml/common/js_common.xml @@ -35,12 +35,14 @@ @@ -51,4 +53,6 @@ dojo.require("dojo.date.locale"); dojo.require("dojo.date.stamp"); dojo.require("dojo.parser"); + dojo.require("openils.I18N"); + dojo.require("dijit.form.FilteringSelect"); diff --git a/Open-ILS/xul/staff_client/server/cat/copy_browser.js b/Open-ILS/xul/staff_client/server/cat/copy_browser.js index e7e43ed0bb..6e307615c4 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_browser.js +++ b/Open-ILS/xul/staff_client/server/cat/copy_browser.js @@ -1220,8 +1220,7 @@ cat.copy_browser.prototype = { 'on_select_org' : function(org_id,twisty) { var obj = this; var org = obj.data.hash.aou[ org_id ]; - if (obj.data.hash.aout[ org.ou_type() ].depth() == 0) return; - /* otherwise, we'd show every system in the consortia */ + if (obj.data.hash.aout[ org.ou_type() ].depth() == 0 && ! get_bool( obj.data.hash.aout[ org.ou_type() ].can_have_vols() ) ) return; var funcs = []; funcs.push( function() { document.getElementById('cmd_refresh_list').setAttribute('disabled','true'); @@ -1340,7 +1339,7 @@ cat.copy_browser.prototype = { } if (document.getElementById('show_acns').checked) { - if ( obj.data.hash.aout[ org.ou_type() ].depth() != 0 ) { + if (! ( obj.data.hash.aout[ org.ou_type() ].depth() == 0 && ! get_bool( obj.data.hash.aout[ org.ou_type() ].can_have_vols() ) )) { node.setAttribute('open','true'); setTimeout( function() { obj.on_select_org( org.id() ); }, 0 ); } -- 2.11.0