From a8b74abcade6dae846b1c50e70d53d1b2cffdea3 Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 23 Jul 2008 02:45:47 +0000 Subject: [PATCH] Merged revisions 10027-10033,10040,10048,10051-10052,10059,10067,10069,10071,10074,10076-10079,10081,10083,10085,10087-10088,10091-10092 via svnmerge from svn://svn.open-ils.org/ILS/trunk ........ r10027 | erickson | 2008-07-14 15:08:00 -0400 (Mon, 14 Jul 2008) | 1 line changing default router log level from INFO to WARN ........ r10028 | dbs | 2008-07-14 15:56:15 -0400 (Mon, 14 Jul 2008) | 2 lines Another monster i18n patch from Craig Ricciuto ........ r10029 | dbs | 2008-07-14 16:07:12 -0400 (Mon, 14 Jul 2008) | 2 lines Nail a forgotten text string ........ r10030 | dbs | 2008-07-14 16:55:28 -0400 (Mon, 14 Jul 2008) | 2 lines Bugfix that prevented us from properly checking for duplicate entities ........ r10031 | miker | 2008-07-14 17:06:48 -0400 (Mon, 14 Jul 2008) | 1 line correcting tranlation widget ........ r10032 | miker | 2008-07-14 17:07:27 -0400 (Mon, 14 Jul 2008) | 1 line fixing translation framework for perms and statuses; adding marc codes to admin page ........ r10033 | dbs | 2008-07-14 17:34:05 -0400 (Mon, 14 Jul 2008) | 3 lines Clean up some long-standing i18n problems (duplicate keys) Also avoid terminating comments prematurely with bogus -- within a comment ........ r10040 | dbs | 2008-07-14 21:34:26 -0400 (Mon, 14 Jul 2008) | 2 lines Add a basic default portal page to the staff client ........ r10048 | miker | 2008-07-14 23:56:01 -0400 (Mon, 14 Jul 2008) | 1 line adding upgrade script for the (hopefully) final version in the 1.2.2 stream ........ r10051 | dbs | 2008-07-15 00:34:00 -0400 (Tue, 15 Jul 2008) | 2 lines Initial stab at a PostgreSQL 8.3 full text search schema ........ r10052 | dbs | 2008-07-15 00:46:15 -0400 (Tue, 15 Jul 2008) | 7 lines More preparation for PostgreSQL 8.3 support: * quick_metarecord_map.sql - 8.3 no longer seems to support altering the table within a single transaction, so we break this into two transactions * 006.schema.permissions.sql and 020.schema.functions.sql - add explicit type casting where necessary ........ r10059 | miker | 2008-07-17 00:41:39 -0400 (Thu, 17 Jul 2008) | 1 line adding labels for new ops ........ r10067 | erickson | 2008-07-17 23:06:12 -0400 (Thu, 17 Jul 2008) | 1 line added support for configurable search page sizes and max pages ........ r10069 | erickson | 2008-07-18 09:28:59 -0400 (Fri, 18 Jul 2008) | 1 line modified form clearing to work regardless of propogated search terms ........ r10071 | erickson | 2008-07-18 10:43:22 -0400 (Fri, 18 Jul 2008) | 1 line added core limit search setting, summary info in return object, and changed defaults to 500/20 ........ r10074 | miker | 2008-07-18 11:00:41 -0400 (Fri, 18 Jul 2008) | 1 line protect against "no bump for type" ........ r10076 | erickson | 2008-07-18 13:20:48 -0400 (Fri, 18 Jul 2008) | 1 line focus first search box on clear ........ r10077 | dbs | 2008-07-18 20:36:24 -0400 (Fri, 18 Jul 2008) | 2 lines Use more consistent strings and enable label/accesskey concordance ........ r10078 | miker | 2008-07-18 20:58:02 -0400 (Fri, 18 Jul 2008) | 1 line allow circ.reshelving_complete.interval ou setting to override the default reshelving delay ........ r10079 | miker | 2008-07-19 20:39:44 -0400 (Sat, 19 Jul 2008) | 1 line adding in-database supported locale, um, support ........ r10081 | erickson | 2008-07-20 23:11:38 -0400 (Sun, 20 Jul 2008) | 1 line typo on element name ........ r10083 | erickson | 2008-07-20 23:22:23 -0400 (Sun, 20 Jul 2008) | 1 line displaying report columns vertically to prevent unnecessary scrolling ........ r10085 | erickson | 2008-07-21 08:49:49 -0400 (Mon, 21 Jul 2008) | 1 line need to clear out the colums so they don't accumulate ........ r10087 | miker | 2008-07-22 16:41:29 -0400 (Tue, 22 Jul 2008) | 1 line translator head port ........ r10088 | miker | 2008-07-22 16:42:00 -0400 (Tue, 22 Jul 2008) | 1 line configuration interfaces ........ r10091 | miker | 2008-07-22 21:44:00 -0400 (Tue, 22 Jul 2008) | 1 line marc code editor works (sans vr format map) ........ r10092 | miker | 2008-07-22 21:44:39 -0400 (Tue, 22 Jul 2008) | 1 line be careful with identity values ........ git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@10093 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../src/extras/import/quick_metarecord_map.sql | 4 + Evergreen/xul/staff_client/server/patron/ue.js | 8 +- Evergreen/xul/staff_client/server/patron/ue.xhtml | 378 ++++++-------- Open-ILS/examples/apache/eg.conf | 2 +- Open-ILS/examples/opensrf.xml.example | 2 + Open-ILS/examples/opensrf_core.xml.example | 2 +- .../perlmods/OpenILS/Application/Search/Biblio.pm | 34 +- .../Application/Storage/Publisher/action.pm | 40 +- .../src/sql/Pg/000.english.pg83.fts-config.sql | 42 ++ Open-ILS/src/sql/Pg/002.schema.config.sql | 27 +- Open-ILS/src/sql/Pg/006.schema.permissions.sql | 4 +- Open-ILS/src/sql/Pg/020.schema.functions.sql | 16 +- Open-ILS/src/sql/Pg/1.2.2.2-1.2.2.3-upgrade-db.sql | 64 +++ Open-ILS/src/sql/Pg/300.schema.staged_search.sql | 6 +- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 15 + .../web/conify/global/config/marc_code_maps.html | 226 ++++---- .../web/conify/global/config/marc_code_maps.js | 2 +- Open-ILS/web/js/dojo/openils/I18N.js | 10 +- .../web/js/dojo/openils/widget/TranslatorPopup.js | 8 +- Open-ILS/web/opac/locale/en-US/lang.dtd | 579 +++++++++++++++------ Open-ILS/web/opac/locale/en-US/opac.dtd | 2 - Open-ILS/web/opac/skin/default/js/adv_global.js | 23 +- .../skin/default/xml/advanced/advanced_global.xml | 4 +- Open-ILS/web/reports/oils_rpt_editor.xhtml | 2 +- Open-ILS/web/reports/oils_rpt_filters.js | 8 + Open-ILS/web/reports/oils_rpt_report_editor.js | 7 +- .../xul/staff_client/chrome/content/main/main.xul | 2 +- .../staff_client/server/admin/hold_pull_list.xhtml | 2 +- .../server/cat/record_buckets_overlay.xul | 4 +- .../xul/staff_client/server/cat/spine_labels.xul | 42 +- Open-ILS/xul/staff_client/server/cat/z3950.xul | 2 +- .../staff_client/server/circ/checkin_overlay.xul | 12 +- .../staff_client/server/circ/checkout_overlay.xul | 22 +- .../server/circ/copy_status_overlay.xul | 4 +- .../xul/staff_client/server/circ/in_house_use.xul | 2 +- Open-ILS/xul/staff_client/server/index.xhtml | 18 + .../server/locale/en-US/patron.properties | 4 + .../xul/staff_client/server/patron/bill_wizard.xul | 2 +- Open-ILS/xul/staff_client/server/patron/bills.js | 6 +- .../staff_client/server/patron/bills_overlay.xul | 8 +- .../staff_client/server/patron/hold_notices.xul | 2 +- .../staff_client/server/patron/items_overlay.xul | 122 +++-- Open-ILS/xul/staff_client/server/patron/ue.xhtml | 365 ++++++------- .../xul/staff_client/server/patron/user_edit.xhtml | 20 +- build/i18n/tests/check_entities.py | 4 +- 45 files changed, 1293 insertions(+), 865 deletions(-) create mode 100644 Open-ILS/src/sql/Pg/000.english.pg83.fts-config.sql create mode 100644 Open-ILS/src/sql/Pg/1.2.2.2-1.2.2.3-upgrade-db.sql create mode 100644 Open-ILS/xul/staff_client/server/index.xhtml diff --git a/Evergreen/src/extras/import/quick_metarecord_map.sql b/Evergreen/src/extras/import/quick_metarecord_map.sql index 01075b5199..f058a4dee4 100644 --- a/Evergreen/src/extras/import/quick_metarecord_map.sql +++ b/Evergreen/src/extras/import/quick_metarecord_map.sql @@ -18,6 +18,10 @@ INSERT INTO metabib.metarecord_source_map (metarecord,source) FROM biblio.record_entry b JOIN metabib.metarecord m ON (m.fingerprint = b.fingerprint); +COMMIT; + +BEGIN; + ALTER TABLE metabib.metarecord_source_map ADD CONSTRAINT metabib_metarecord_source_map_metarecord_fkey FOREIGN KEY (metarecord) REFERENCES metabib.metarecord (id) DEFERRABLE INITIALLY DEFERRED; COMMIT; diff --git a/Evergreen/xul/staff_client/server/patron/ue.js b/Evergreen/xul/staff_client/server/patron/ue.js index df2d11da17..cb5a3d415d 100644 --- a/Evergreen/xul/staff_client/server/patron/ue.js +++ b/Evergreen/xul/staff_client/server/patron/ue.js @@ -10,7 +10,9 @@ var surveyAnswersCache = {}; var userCache = {}; var groupsCache = {}; var netLevelsCache = {}; -//var guardianNote = null; +//var guardianNote = null; + +function $(id) { return document.getElementById(id); } /* fetch the necessary data to start off */ function uEditInit() { @@ -24,7 +26,7 @@ function uEditInit() { clone = cgi.param('clone'); if (xulG) if (xulG.clone) clone = xulG.clone; if (xulG) if (xulG.params) if (xulG.params.clone) clone = xulG.params.clone; - if(!session) throw "User session is not defined"; + if(!session) throw $("patronStrings").getString('web.staff.patron.ue.session_no_defined'); fetchUser(session); $('uedit_user').appendChild(text(USER.usrname())); @@ -710,7 +712,7 @@ function uEditShowSearch(link,type) { if(!type) type = link.getAttribute('type'); if(window.xulG) window.xulG.spawn_search(uEditDupHashes[type]); - else alert('Search would be:\n' + js2JSON(uEditDupHashes[type])); + else alert($("patronStrings").getString('web.staff.patron.ue.uedit_show_search.search_would_be', js2JSON(uEditDupHashes[type]))); } function uEditMarkCardLost() { diff --git a/Evergreen/xul/staff_client/server/patron/ue.xhtml b/Evergreen/xul/staff_client/server/patron/ue.xhtml index a82da8830c..727d4ad4e7 100644 --- a/Evergreen/xul/staff_client/server/patron/ue.xhtml +++ b/Evergreen/xul/staff_client/server/patron/ue.xhtml @@ -1,16 +1,16 @@ - + ]> - - Evergreen: User Editor + &ev.staff.patron.ue_xhtml.ev_user_editor.label; @@ -84,15 +84,17 @@ + +
-

Evergreen User Editor

+

&ev.staff.patron.ue_xhtml.ev_user_editor.label;

- Welcome + &ev.staff.patron.ue_xhtml.welcome.label;


@@ -104,14 +106,13 @@ - Note: required or invalid fields are - marked with color + &staff.patron.ue.interface_note.label; - View Errors + &ev.staff.patron.ue_xhtml.view_errors.label; @@ -129,37 +130,37 @@ - 1. User Identification + &ev.staff.patron.ue_xhtml.user_id.label; - 2. Contact Info + &ev.staff.patron.ue_xhtml.contact_info.label; - 3. Addresses + &ev.staff.patron.ue_xhtml.addresses.label; - 4. Groups and Permissions + &ev.staff.patron.ue_xhtml.groups_permissions.label; - 5. Statistical Categories + &ev.staff.patron.ue_xhtml.statistical_categories.label; - 6. Surveys + &ev.staff.patron.ue_xhtml.surveys.label; - 7. Finish + &ev.staff.patron.ue_xhtml.finish.label; @@ -169,7 +170,7 @@
- Loading data... + &ev.staff.patron.ue_xhtml.loading_data.label;
@@ -180,7 +181,7 @@ @@ -194,7 +195,7 @@ - + - + - + - + - + - + - + - + - + - + - + --> - +
Barcode
&ev.staff.patron.ue_xhtml.barcode.label;
@@ -207,51 +208,51 @@ }' /> --> + onclick='uEditMarkCardLost();'>&ev.staff.patron.ue_xhtml.mark_lost.label;
Username
&ev.staff.patron.ue_xhtml.username.label;
Password
&ev.staff.patron.ue_xhtml.password.label;
- + - Password: + &ev.staff.patron.ue_xhtml.re_password.label;
Verify Password
&ev.staff.patron.ue_xhtml.verify_password.label;
First Name
&ev.staff.patron.ue_xhtml.first_name.label;
Middle Name
&ev.staff.patron.ue_xhtml.middle_name.label;
Last Name
&ev.staff.patron.ue_xhtml.last_name.label;
Suffix
&ev.staff.patron.ue_xhtml.suffix.label;
Date of Birth
&ev.staff.patron.ue_xhtml.dob.label;
@@ -324,16 +325,16 @@
Primary Identification Type
&ev.staff.patron.ue_xhtml.primary_id_type.label;
Primary Identification
&ev.staff.patron.ue_xhtml.primary_id.label;
@@ -360,7 +361,7 @@
Parent / Guardian
&ev.staff.patron.ue_xhtml.parent_guardian.label;
@@ -389,11 +390,11 @@ - + - + - + - + - +
Email Address
&ev.staff.patron.ue_xhtml.email_address.label;
Daytime Phone
&ev.staff.patron.ue_xhtml.daytime_phone.label;
@@ -402,7 +403,7 @@
Evening Phone
&ev.staff.patron.ue_xhtml.evening_phone.label;
@@ -410,7 +411,7 @@
Other/Cell Phone
&ev.staff.patron.ue_xhtml.other_phone.label;
@@ -418,7 +419,7 @@
Home Library
&ev.staff.patron.ue_xhtml.home_library.label;
- - - - - + + + + + @@ -452,7 +453,7 @@ - + - + - + - + - + - + - + --> - +
AddressWithin City LimitsValidMailing AddressPhysical Address&ev.staff.patron.ue_xhtml.address.label;&ev.staff.patron.ue_xhtml.in_city_limits.label;&ev.staff.patron.ue_xhtml.valid.label;&ev.staff.patron.ue_xhtml.mailing_address.label;&ev.staff.patron.ue_xhtml.physical_address.label;
* - Address is owned by + &ev.staff.patron.ue_xhtml.address_owned_by.label; (Edit) @@ -461,13 +462,13 @@
Label
&ev.staff.patron.ue_xhtml.label.label;
Zip
&ev.staff.patron.ue_xhtml.zip.label;
@@ -475,7 +476,7 @@
Street 1
&ev.staff.patron.ue_xhtml.street1.label;
@@ -483,7 +484,7 @@
Street 2
&ev.staff.patron.ue_xhtml.street2.label;
@@ -491,13 +492,13 @@
City
&ev.staff.patron.ue_xhtml.city.label;
County
&ev.staff.patron.ue_xhtml.conuty.label;
@@ -505,7 +506,7 @@
State
&ev.staff.patron.ue_xhtml.state.label;
@@ -519,7 +520,7 @@
Country
&ev.staff.patron.ue_xhtml.country.label;
@@ -564,7 +565,7 @@ - +
@@ -575,17 +576,17 @@ - + - + - + - + - + - + - + - - - + + + @@ -700,7 +701,7 @@
Profile Group
&ev.staff.patron.ue_xhtml.profile_group.label;
Account Expiration Date
&ev.staff.patron.ue_xhtml.account_expiration_date.label;
@@ -593,7 +594,7 @@ @@ -612,7 +613,7 @@
Internet Access Level
&ev.staff.patron.ue_xhtml.net_access_level.label;
Active
&ev.staff.patron.ue_xhtml.active.label;
@@ -629,7 +630,7 @@
Barred
&ev.staff.patron.ue_xhtml.barred.label;
@@ -637,7 +638,7 @@
Set as Family/Group Lead Account
&ev.staff.patron.ue_xhtml.set_family_group_lead_account.label;
@@ -645,7 +646,7 @@
Claims Returned Count
&ev.staff.patron.ue_xhtml.claims_returned_count.label;
@@ -653,7 +654,7 @@ $('ue_claims_returned').value = 0; $('ue_claims_returned').disabled = true; -
Stat Cat NameOwnerValue&ev.staff.patron.ue_xhtml.stat_cat_name.label;&ev.staff.patron.ue_xhtml.owner.label;&ev.staff.patron.ue_xhtml.value.label;
or @@ -717,7 +718,7 @@
- No surveys have been created for this location. + &ev.staff.patron.ue_xhtml.no_surveys_for_location.label;
@@ -735,7 +736,7 @@ style='width: 60%; text-align: left; padding-left: 40px;'/> @@ -749,9 +750,7 @@
- You are now ready to save the user to the database.
- To view or print a summary of the changes, click on the "View Summary" link.
- To save the user, click on the 'Save User' button. + &ev.staff.patron.ue_xhtml.finishing_message.label;

@@ -759,11 +758,11 @@ href='javascript:uEditShowSummary();'>View Summary
+ type='submit' value='&ev.staff.patron.ue_xhtml.save_user.value;' onclick='uEditSaveUser();'/> + type='submit' value='&ev.staff.patron.ue_xhtml.save_clone_user.value;' onclick='uEditSaveUser(true);'/> + onclick='if(confirm($("ue_cancel_confirm").innerHTML)) uEditCancel();'>&ev.staff.patron.ue_xhtml.cancel.value;
@@ -772,7 +771,7 @@ - - - - - - - + + + + + + +
- + @@ -780,11 +779,11 @@ @@ -805,8 +804,7 @@ @@ -815,34 +813,34 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + +
<<Back + href='javascript:uEditPrev()'><<&ev.staff.patron.ue_xhtml.back.label; Forward>> + href='javascript:uEditNext()'>&ev.staff.patron.ue_xhtml.forward.label;>>
- User Summary Information (Deleted items are marked in - color) + &staff.patron.ue.user_summary.label;
- - +
Barcode
Username
First Name
Middle Name
Last Name
Suffix
Date of Birth
Primary Identification Type
Primary Identification
Secondary Identification Type
Secondary Identification
Email Address
Day Phone
Evening Phone
Other Phone
Home Library
&ev.staff.patron.ue_xhtml.barcode.label;
&ev.staff.patron.ue_xhtml.username.label;
&ev.staff.patron.ue_xhtml.first_name.label;
&ev.staff.patron.ue_xhtml.middle_name.label;
&ev.staff.patron.ue_xhtml.last_name.label;
&ev.staff.patron.ue_xhtml.suffix.label;
&ev.staff.patron.ue_xhtml.dob.label;
&ev.staff.patron.ue_xhtml.primary_id_type.label;
&ev.staff.patron.ue_xhtml.primary_id.label;
&ev.staff.patron.ue_xhtml.secondary_id_type.label;
&ev.staff.patron.ue_xhtml.secondary_id.label;
&ev.staff.patron.ue_xhtml.email_address.label;
&ev.staff.patron.ue_xhtml.day_phone.label;
&ev.staff.patron.ue_xhtml.evening_phone.label;
&ev.staff.patron.ue_xhtml.other_phone.label;
&ev.staff.patron.ue_xhtml.home_library.label;
- + - - - - - -
Addresses
&ev.staff.patron.ue_xhtml.addresses.label;
@@ -850,28 +848,28 @@
Address Label - Zip Code + &ev.staff.patron.ue_xhtml.address_label.label; + &ev.staff.patron.ue_xhtml.zip.label;
Street1 - Country + &ev.staff.patron.ue_xhtml.street1.label; + &ev.staff.patron.ue_xhtml.country.label;
Street2 - Mailing + &ev.staff.patron.ue_xhtml.street2.label; + &ev.staff.patron.ue_xhtml.mailing.label;
City - Billing + &ev.staff.patron.ue_xhtml.city.label; + &ev.staff.patron.ue_xhtml.billing.label;
County - Valid + &ev.staff.patron.ue_xhtml.county.label; + &ev.staff.patron.ue_xhtml.valid.label;
State - Within City Limits + &ev.staff.patron.ue_xhtml.state.label; + &ev.staff.patron.ue_xhtml.in_city_limits.label;
@@ -881,17 +879,17 @@
Profile
Active
Barred
Expire Date
Family Lead Account
Claims Returned Count
Alert Message
&ev.staff.patron.ue_xhtml.profile.label;
&ev.staff.patron.ue_xhtml.active.label;
&ev.staff.patron.ue_xhtml.barred.label;
&ev.staff.patron.ue_xhtml.expire_date.label;
&ev.staff.patron.ue_xhtml.family_lead_account.label;
&ev.staff.patron.ue_xhtml.claims_returned_count.label;
&ev.staff.patron.ue_xhtml.alert_message.label;
- +
Statistical Categories
&ev.staff.patron.ue_xhtml.stat_categories.label;
@@ -903,7 +901,13 @@
- + + + + + + + @@ -932,88 +936,48 @@
- The date of birth field is not formatted correctly. We're expecting YYYY-MM-DD - Username is invalid - Passwords do not match or are invalid - First name is invalid - Middle name is invalid - Last name is invalid - Barcode is invalid - The selected barcode already exists in the database - - This will de-activate the existing barcode for this user! If you wish to continue, - enter the new barcode below. Otherwise, click the Cancel button. - - You must select at least one type of identification - Invalid drivers license. Should be STATE-NUMBER - Invalid social security number. Format should be 111-22-3333 - The email addresses is not valid - An invalid phone number was entered - A profile group must be selected - The user expiration date is invalid. We're expecting YYYY-MM-DD - The claims returned count is invalid - A profile group must be selected - An unknown formatting error occurred - Address label is invalid - Address street is invalid - Address city is invalid - Address county is invalid - Address state is invalid - Address country is invalid - Address zip is invalid - Required survey is unanswered - - This will remove this address from the user. - Are you sure you wish to continue? - - Yes - No - Patron Summary - User update succeeded - - A user already exists with the primary identification provided. - Do you wish to view the duplicate record now? - - - The selected username is in use by another user. - Please choose a different username. - - - The selected barcode is in use by another user. - Please choose a different barcode. - - - Are you sure you wish to cancel this editing session? - Canceling will destroy any unsaved changes you have made thus far to the user. - - - This patron is under 18 years of age. Please enter the name - of the parent or guardian for this patron. - - - The date provided is either in the future or invalid. We're expecting YYYY-MM-DD - - - Please add a note to the patron's alert message explaining why the patron is barred. - - - - This will reset the claims returned count for this user. - Are you sure you wish to perform this action? - - - - You have unsaved changes. - - - - It appears that someone else was also editing this user. Saving the user - now will destroy their changes. Click "OK" to refresh the user and continue - editing. Click "Cancel" to do nothing. - - Note that you will not be able to save the user until this page has been refreshed. - - + &staff.patron.ue.bad_dob.label; + &staff.patron.ue.bad_username.label; + &staff.patron.ue.bad_passwords.label; + &staff.patron.ue.bad_firstname.label; + &staff.patron.ue.bad_middlename.label; + &staff.patron.ue.bad_lastname.label; + &staff.patron.ue.bad_barcode.label; + &staff.patron.ue.duplicate_barcode.label; + &staff.patron.ue.new_barcode_warn.label; + &staff.patron.ue.no_ident.label; + &staff.patron.ue.bad_ident_dl.label; + &staff.patron.ue.bad_ident_ssn.label; + &staff.patron.ue.bad_email.label; + &staff.patron.ue.bad_phone.label; + &staff.patron.ue.no_profile.label; + &staff.patron.ue.bad_expire.label; + &staff.patron.ue.bad_claims_returned.label; + &ev.staff.patron.ue_xhtml.no_profile.label; + &staff.patron.ue.unknown_error.label; + &staff.patron.ue.bad_addr_label.label; + &staff.patron.ue.bad_addr_street.label; + &staff.patron.ue.bad_addr_city.label; + &staff.patron.ue.bad_addr_county.label; + &staff.patron.ue.bad_addr_state.label; + &staff.patron.ue.bad_addr_country.label; + &staff.patron.ue.bad_addr_zip.label; + &staff.patron.ue.bad_survey.label; + &staff.patron.ue.delete_addr_warn.label; + &staff.patron.ue.yes.label; + &staff.patron.ue.no.label; + &staff.patron.ue.summary_window.label; + &staff.patron.ue.success.label; + &staff.patron.ue.dup_ident1.label; + &staff.patron.ue.dup_username.label; + &staff.patron.ue.dup_barcode.label; + &staff.patron.ue.cancel_confirm.label; + &staff.patron.ue.juv_guardian.label; + &staff.patron.ue.bad_date.label; + &staff.patron.ue.made_barred.label; + &ev.staff.patron.ue_xhtml.claims_return_confirm.label; + &ev.staff.patron.ue_xhtml.unsaved_changes.label; + &ev.staff.patron.ue_xhtml.xact_collision.label;
diff --git a/Open-ILS/examples/apache/eg.conf b/Open-ILS/examples/apache/eg.conf index 894aa55356..3bee68a243 100644 --- a/Open-ILS/examples/apache/eg.conf +++ b/Open-ILS/examples/apache/eg.conf @@ -86,7 +86,7 @@ NameVirtualHost *:80 ServerName localhost:80 ServerAlias 127.0.0.1:80 DocumentRoot /openils/var/web/ - DirectoryIndex index.xml index.html + DirectoryIndex index.xml index.html index.xhtml # - absorb the shared virtual host settings Include eg_vhost.conf diff --git a/Open-ILS/examples/opensrf.xml.example b/Open-ILS/examples/opensrf.xml.example index f940f9f1ef..94eb200110 100644 --- a/Open-ILS/examples/opensrf.xml.example +++ b/Open-ILS/examples/opensrf.xml.example @@ -275,6 +275,8 @@ vim:et:ts=4:sw=4: oilsMARC21slim2HTML.xsltrue + 500 + 20 diff --git a/Open-ILS/examples/opensrf_core.xml.example b/Open-ILS/examples/opensrf_core.xml.example index 8d91d99fcf..c3aca94ddb 100644 --- a/Open-ILS/examples/opensrf_core.xml.example +++ b/Open-ILS/examples/opensrf_core.xml.example @@ -127,7 +127,7 @@ vim:et:ts=2:sw=2: /openils/var/log/router.log - 3 + 2 diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm index 367e3cdc25..3056109f20 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm @@ -36,13 +36,23 @@ my $pfx = "open-ils.search_"; my $cache; my $cache_timeout; +my $superpage_size; +my $max_superpages; sub initialize { $cache = OpenSRF::Utils::Cache->new('global'); my $sclient = OpenSRF::Utils::SettingsClient->new(); $cache_timeout = $sclient->config_value( "apps", "open-ils.search", "app_settings", "cache_timeout" ) || 300; - $logger->info("Search cache timeout is $cache_timeout"); + + $superpage_size = $sclient->config_value( + "apps", "open-ils.search", "app_settings", "superpage_size" ) || 500; + + $max_superpages = $sclient->config_value( + "apps", "open-ils.search", "app_settings", "max_superpages" ) || 20; + + $logger->info("Search cache timeout is $cache_timeout, ". + " superpage_size is $superpage_size, max_superpages is $max_superpages"); } @@ -744,8 +754,6 @@ __PACKAGE__->register_method( api_name => 'open-ils.search.metabib.multiclass.staged.staff', signature => q/@see open-ils.search.biblio.multiclass.staged/); -my $PAGE_SIZE = 1000; -my $SEARCH_PAGES = 25; sub staged_search { my($self, $conn, $search_hash, $docache) = @_; @@ -765,8 +773,12 @@ sub staged_search { # we're grabbing results on a per-superpage basis, which means the # limit and offset should coincide with superpage boundaries $search_hash->{offset} = 0; - $search_hash->{limit} = $PAGE_SIZE; - $search_hash->{check_limit} = $PAGE_SIZE; # force a well-known check_limit + $search_hash->{limit} = $superpage_size; + + # force a well-known check_limit + $search_hash->{check_limit} = $superpage_size; + # restrict total tested to superpage size * number of superpages + $search_hash->{core_limit} = $superpage_size * $max_superpages; # pull any existing results from the cache my $key = search_cache_key($method, $search_hash); @@ -777,8 +789,9 @@ sub staged_search { my $all_results = []; my $page; # current superpage my $est_hit_count = 0; + my $current_page_summary = {}; - for($page = 0; $page < $SEARCH_PAGES; $page++) { + for($page = 0; $page < $max_superpages; $page++) { my $data = $cache_data->{$page}; my $results; @@ -795,7 +808,7 @@ sub staged_search { } else { # retrieve the window of results from the database $logger->debug("staged search: fetching results from the database"); - $search_hash->{skip_check} = $page * $PAGE_SIZE; + $search_hash->{skip_check} = $page * $superpage_size; my $start = time; $results = $U->storagereq($method, %$search_hash); $logger->info("staged search: DB call took ".(time - $start)." seconds"); @@ -812,6 +825,8 @@ sub staged_search { cache_staged_search_page($key, $page, $summary, $results) if $docache; } + $current_page_summary = $summary; + # add the new set of results to the set under construction push(@$all_results, @$results); @@ -831,13 +846,16 @@ sub staged_search { last if $current_count >= ($user_limit + $user_offset); # we've scanned all possible hits - last if $summary->{checked} < $PAGE_SIZE; + last if $summary->{checked} < $superpage_size; } my @results = grep {defined $_} @$all_results[$user_offset..($user_offset + $user_limit - 1)]; return { count => $est_hit_count, + core_limit => $search_hash->{core_limit}, + superpage_size => $search_hash->{check_limit}, + superpage_summary => $current_page_summary, ids => \@results }; } diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm index 015d4bc9f5..8b0199f888 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm @@ -121,30 +121,34 @@ sub complete_reshelving { throw OpenSRF::EX::InvalidArg ("I need an interval of more than 0 seconds!") unless (interval_to_seconds( $window )); + my $setting = actor::org_unit_setting->table; my $circ = action::circulation->table; my $cp = asset::copy->table; my $sql = <<" SQL"; UPDATE $cp SET status = 0 - WHERE id IN - ( SELECT id FROM ( - SELECT cp.id, MAX(circ.checkin_time) - FROM $cp cp - JOIN $circ circ ON (circ.target_copy = cp.id) - WHERE circ.checkin_time IS NOT NULL - AND cp.status = 7 - GROUP BY 1 - HAVING MAX(circ.checkin_time) < NOW() - CAST(? AS INTERVAL) - ) AS foo - ) - OR id IN - ( SELECT cp.id - FROM $cp cp - LEFT JOIN $circ circ ON (circ.target_copy = cp.id AND circ.id IS NULL) - WHERE cp.status = 7 - AND cp.create_date < NOW() - CAST(? AS INTERVAL) - ) + WHERE id IN ( + SELECT id + FROM (SELECT cp.id, MAX(circ.checkin_time) + FROM $cp cp + JOIN $circ circ ON (circ.target_copy = cp.id) + LEFT JOIN $setting setting + ON (cp.circ_lib = setting.org_unit AND setting.name = 'circ.reshelving_complete.interval') + WHERE circ.checkin_time IS NOT NULL + AND cp.status = 7 + GROUP BY 1 + HAVING MAX(circ.checkin_time) < NOW() - CAST( COALESCE( BTRIM( setting.value,'"' ), ? ) AS INTERVAL) + ) AS foo + UNION ALL + SELECT cp.id + FROM $cp cp + LEFT JOIN $setting setting + ON (cp.circ_lib = setting.org_unit AND setting.name = 'circ.reshelving_complete.interval') + LEFT JOIN $circ circ ON (circ.target_copy = cp.id AND circ.id IS NULL) + WHERE cp.status = 7 + AND cp.create_date < NOW() - CAST( COALESCE( BTRIM( setting.value,'"' ), ? ) AS INTERVAL) + ) SQL my $sth = action::circulation->db_Main->prepare_cached($sql); diff --git a/Open-ILS/src/sql/Pg/000.english.pg83.fts-config.sql b/Open-ILS/src/sql/Pg/000.english.pg83.fts-config.sql new file mode 100644 index 0000000000..b089f7794b --- /dev/null +++ b/Open-ILS/src/sql/Pg/000.english.pg83.fts-config.sql @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2004-2008 Georgia Public Library Service + * Copyright (C) 2008 Equinox Software, Inc., Laurentian University + * Mike Rylander + * Dan Scott + * + * 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. + * + */ + +BEGIN; + +CREATE OR REPLACE FUNCTION oils_tsearch2 () RETURNS TRIGGER AS $$ +BEGIN + NEW.index_vector = to_tsvector((TG_ARGV[0])::regconfig, NEW.value); + RETURN NEW; +END; +$$ LANGUAGE PLPGSQL; + +DROP TEXT SEARCH DICTIONARY IF EXISTS english_nostop CASCADE; + +CREATE TEXT SEARCH DICTIONARY english_nostop (TEMPLATE=pg_catalog.snowball, language='english'); +COMMENT ON TEXT SEARCH DICTIONARY english_nostop IS 'English snowball stemmer with no stopwords for ASCII words only.'; + +CREATE TEXT SEARCH CONFIGURATION title ( COPY = pg_catalog.english ); +ALTER TEXT SEARCH CONFIGURATION title ALTER MAPPING FOR word, hword, hword_part WITH pg_catalog.simple; +ALTER TEXT SEARCH CONFIGURATION title ALTER MAPPING FOR asciiword, asciihword, hword_asciipart WITH public.english_nostop; +CREATE TEXT SEARCH CONFIGURATION author ( COPY = title ); +CREATE TEXT SEARCH CONFIGURATION subject ( COPY = title ); +CREATE TEXT SEARCH CONFIGURATION keyword ( COPY = title ); +CREATE TEXT SEARCH CONFIGURATION series ( COPY = title ); +CREATE TEXT SEARCH CONFIGURATION "default" ( COPY = title ); + +COMMIT; diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 6a652977ed..e70fb92639 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -46,16 +46,6 @@ COMMENT ON SCHEMA config IS $$ */ $$; -CREATE TABLE config.i18n_core ( - id BIGSERIAL PRIMARY KEY, - fq_field TEXT NOT NULL, - identity_value TEXT NOT NULL, - translation TEXT NOT NULL, - string TEXT NOT NULL -); - -CREATE UNIQUE INDEX i18n_identity ON config.i18n_core (fq_field,identity_value,translation); - CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, quality INT CHECK ( quality BETWEEN 0 AND 100 ), @@ -496,5 +486,22 @@ INSERT INTO config.z3950_attr (source,name,label,code,format) VALUES ('oclc','pu INSERT INTO config.z3950_attr (source,name,label,code,format) VALUES ('oclc','item_type','Item Type',1001,1); +CREATE TABLE config.i18n_locale ( + code TEXT PRIMARY KEY, + marc_code TEXT NOT NULL REFERENCES config.language_map (code), + name TEXT UNIQUE NOT NULL, + description TEXT +); + +CREATE TABLE config.i18n_core ( + id BIGSERIAL PRIMARY KEY, + fq_field TEXT NOT NULL, + identity_value TEXT NOT NULL, + translation TEXT NOT NULL REFERENCES config.i18n_locale (code), + string TEXT NOT NULL +); + +CREATE UNIQUE INDEX i18n_identity ON config.i18n_core (fq_field,identity_value,translation); + COMMIT; diff --git a/Open-ILS/src/sql/Pg/006.schema.permissions.sql b/Open-ILS/src/sql/Pg/006.schema.permissions.sql index bc41328f26..775588c5c9 100644 --- a/Open-ILS/src/sql/Pg/006.schema.permissions.sql +++ b/Open-ILS/src/sql/Pg/006.schema.permissions.sql @@ -78,9 +78,9 @@ CREATE TABLE permission.usr_grp_map ( CREATE OR REPLACE FUNCTION permission.grp_ancestors ( INT ) RETURNS SETOF permission.grp_tree AS $$ SELECT a.* - FROM connectby('permission.grp_tree','parent','id','name',$1,'100','.') + FROM connectby('permission.grp_tree'::text,'parent'::text,'id'::text,'name'::text,$1::text,100,'.'::text) AS t(keyid text, parent_keyid text, level int, branch text,pos int) - JOIN permission.grp_tree a ON a.id = t.keyid + JOIN permission.grp_tree a ON a.id::text = t.keyid::text ORDER BY CASE WHEN a.parent IS NULL THEN 0 diff --git a/Open-ILS/src/sql/Pg/020.schema.functions.sql b/Open-ILS/src/sql/Pg/020.schema.functions.sql index efc253d7b6..9528e1de17 100644 --- a/Open-ILS/src/sql/Pg/020.schema.functions.sql +++ b/Open-ILS/src/sql/Pg/020.schema.functions.sql @@ -134,30 +134,30 @@ $$ language 'plpgsql'; CREATE OR REPLACE FUNCTION actor.org_unit_descendants ( INT ) RETURNS SETOF actor.org_unit AS $$ SELECT a.* - FROM connectby('actor.org_unit','id','parent_ou','name',$1,'100','.') + FROM connectby('actor.org_unit'::text,'id'::text,'parent_ou'::text,'name'::text,$1::text,100,'.'::text) AS t(keyid text, parent_keyid text, level int, branch text,pos int) - JOIN actor.org_unit a ON a.id = t.keyid + JOIN actor.org_unit a ON a.id::text = t.keyid::text ORDER BY CASE WHEN a.parent_ou IS NULL THEN 0 ELSE 1 END, a.name; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION actor.org_unit_ancestors ( INT ) RETURNS SETOF actor.org_unit AS $$ SELECT a.* - FROM connectby('actor.org_unit','parent_ou','id','name',$1,'100','.') + FROM connectby('actor.org_unit'::text,'parent_ou'::text,'id'::text,'name'::text,$1::text,100,'.'::text) AS t(keyid text, parent_keyid text, level int, branch text,pos int) - JOIN actor.org_unit a ON a.id = t.keyid + JOIN actor.org_unit a ON a.id::text = t.keyid::text ORDER BY CASE WHEN a.parent_ou IS NULL THEN 0 ELSE 1 END, a.name; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION actor.org_unit_descendants ( INT,INT ) RETURNS SETOF actor.org_unit AS $$ SELECT a.* - FROM connectby('actor.org_unit','id','parent_ou','name', + FROM connectby('actor.org_unit'::text,'id'::text,'parent_ou'::text,'name'::text, (SELECT x.id FROM actor.org_unit_ancestors($1) x JOIN actor.org_unit_type y ON x.ou_type = y.id - WHERE y.depth = $2) - ,'100','.') + WHERE y.depth = $2)::text + ,100,'.'::text) AS t(keyid text, parent_keyid text, level int, branch text,pos int) - JOIN actor.org_unit a ON a.id = t.keyid + JOIN actor.org_unit a ON a.id::text = t.keyid::text ORDER BY CASE WHEN a.parent_ou IS NULL THEN 0 ELSE 1 END, a.name; $$ LANGUAGE SQL STABLE; diff --git a/Open-ILS/src/sql/Pg/1.2.2.2-1.2.2.3-upgrade-db.sql b/Open-ILS/src/sql/Pg/1.2.2.2-1.2.2.3-upgrade-db.sql new file mode 100644 index 0000000000..062cf706be --- /dev/null +++ b/Open-ILS/src/sql/Pg/1.2.2.2-1.2.2.3-upgrade-db.sql @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2008 Equinox Software, Inc. + * Mike Rylander + * + * 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. + * + */ + + +-- It's OK if any of the following, before the transaction, fails ... + +CREATE SCHEMA extend_reporter; + +CREATE TABLE extend_reporter.legacy_circ_count ( + id BIGSERIAL PRIMARY KEY REFERENCES asset.copy (id), + circ_count INT NOT NULL DEFAULT 0 +); + +INSERT INTO permission.perm_list (code, description) VALUES ('DELETE_RECORD', 'Allow a staff member to directly remove a bibliographic record'); +SELECT SETVAL('permission.perm_list_id_seq'::TEXT, (SELECT MAX(id) FROM permission.perm_list)); + +BEGIN; + +CREATE OR REPLACE VIEW extend_reporter.full_circ_count AS + SELECT cp.id, COALESCE(sum(c.circ_count), 0::bigint) + COALESCE(count(circ.id), 0::bigint) AS circ_count + FROM asset."copy" cp + LEFT JOIN extend_reporter.legacy_circ_count c USING (id) + LEFT JOIN "action".circulation circ ON circ.target_copy = c.id + GROUP BY cp.id; + +UPDATE metabib.title_field_entry + SET value = REGEXP_REPLACE(value, E'(\\d{4})-(\\d{4})', E'\\1 \\2','g') + WHERE value ~ E'(\\d{4})-(\\d{4})'; + +UPDATE metabib.author_field_entry + SET value = REGEXP_REPLACE(value, E'(\\d{4})-(\\d{4})', E'\\1 \\2','g') + WHERE value ~ E'(\\d{4})-(\\d{4})'; + +UPDATE metabib.keyword_field_entry + SET value = REGEXP_REPLACE(value, E'(\\d{4})-(\\d{4})', E'\\1 \\2','g') + WHERE value ~ E'(\\d{4})-(\\d{4})'; + +UPDATE metabib.subject_field_entry + SET value = REGEXP_REPLACE(value, E'(\\d{4})-(\\d{4})', E'\\1 \\2','g') + WHERE value ~ E'(\\d{4})-(\\d{4})'; + +UPDATE metabib.series_field_entry + SET value = REGEXP_REPLACE(value, E'(\\d{4})-(\\d{4})', E'\\1 \\2','g') + WHERE value ~ E'(\\d{4})-(\\d{4})'; + +UPDATE metabib.full_rec + SET value = REGEXP_REPLACE(value, E'(\\d{4})-(\\d{4})', E'\\1 \\2','g') + WHERE value ~ E'(\\d{4})-(\\d{4})'; + +COMMIT; + 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 8c91ba61b2..b8498d873f 100644 --- a/Open-ILS/src/sql/Pg/300.schema.staged_search.sql +++ b/Open-ILS/src/sql/Pg/300.schema.staged_search.sql @@ -191,8 +191,10 @@ BEGIN END IF; - current_rank := current_rank || ' * ( CASE WHEN ' || tmp_text || - ' THEN ' || rank_adjust.multiplier || '::REAL ELSE 1.0 END )'; + IF tmp_text IS NOT NULL THEN + current_rank := current_rank || ' * ( CASE WHEN ' || tmp_text || + ' THEN ' || rank_adjust.multiplier || '::REAL ELSE 1.0 END )'; + END IF; used_ranks := array_append( used_ranks, rank_adjust.bump_type ); diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index e1aa61f0ea..f96dbf49f4 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -173,6 +173,7 @@ INSERT INTO config.lit_form_map (code, value, description) VALUES ('u', oils_i18n_gettext('Unknown'), oils_i18n_gettext('The literary form of the item is unknown.')); -- TO-DO: Auto-generate these values from CLDR +-- XXX These are the values used in MARC records ... does that match CLDR, including deprecated languages? INSERT INTO config.language_map (code, value) VALUES ('aar', oils_i18n_gettext('Afar')); INSERT INTO config.language_map (code, value) VALUES ('abk', oils_i18n_gettext('Abkhaz')); INSERT INTO config.language_map (code, value) VALUES ('ace', oils_i18n_gettext('Achinese')); @@ -691,6 +692,20 @@ INSERT INTO config.bib_level_map (code, value) VALUES ('i', oils_i18n_gettext('I INSERT INTO config.bib_level_map (code, value) VALUES ('m', oils_i18n_gettext('Monograph/Item')); INSERT INTO config.bib_level_map (code, value) VALUES ('s', oils_i18n_gettext('Serial')); + +-- available locales +INSERT INTO config.i18n_locale (code,marc_code,name,description) + VALUES ('en_us','eng',oils_i18n_gettext('American English'),oils_i18n_gettext('American English')); +INSERT INTO config.i18n_locale (code,marc_code,name,description) + VALUES ('en_ca','eng',oils_i18n_gettext('Canadian English'),oils_i18n_gettext('Canadian English')); +INSERT INTO config.i18n_locale (code,marc_code,name,description) + VALUES ('fr_ca','fre',oils_i18n_gettext('Canadian Fench'),oils_i18n_gettext('Canadian French')); +INSERT INTO config.i18n_locale (code,marc_code,name,description) + VALUES ('es_us','spa',oils_i18n_gettext('American Spanish'),oils_i18n_gettext('American Spanish')); +INSERT INTO config.i18n_locale (code,marc_code,name,description) + VALUES ('es_mx','spa',oils_i18n_gettext('Mexican Spanish'),oils_i18n_gettext('Mexican Spanish')); + + --005.schema.actors.sql: -- The PINES levels diff --git a/Open-ILS/web/conify/global/config/marc_code_maps.html b/Open-ILS/web/conify/global/config/marc_code_maps.html index 549c22a254..ea7d1dd52f 100644 --- a/Open-ILS/web/conify/global/config/marc_code_maps.html +++ b/Open-ILS/web/conify/global/config/marc_code_maps.html @@ -83,8 +83,7 @@ 'instantiate('+ 'openils.widget.TranslatorPopup,{field:"value",'+ 'targetObject:"grid_row_object_cache.cam['+row+']"}'+ - ');'+ - 'cam_grid.rowHeightChanged('+row+');', + ');cam_grid.rowHeightChanged('+row+');', 0 ); var oldnode = dojo.byId('value_translation_cam_' + row); @@ -107,8 +106,7 @@ 'instantiate('+ 'openils.widget.TranslatorPopup,{field:"description",'+ 'targetObject:"grid_row_object_cache.cam['+row+']"}'+ - ');'+ - 'cam_grid.rowHeightChanged('+row+');', + ');cam_grid.rowHeightChanged('+row+');', 0 ); var oldnode = dojo.byId('description_translation_cam_' + row); @@ -123,71 +121,75 @@ } ]; - var codelist = ['cam','cblvl','cifm','citm','clm','clfm'];//,'cvrfm']; + var codelist = ['cam','cblvl','cifm','citm','clm','clfm','cvrfm']; var hashes = {}; var objects = {}; - var models = {}; + var stores = {}; console.log('about to loop over codelist: ' + codelist); for (var i in codelist) { - var classname = codelist[i]; - - hashes[classname] = fieldmapper.standardRequest( - [ 'open-ils.fielder', 'open-ils.fielder.' + classname + '.atomic'], - [ { query : { code : { '!=' : null } } } ] - ); - - console.log('created hashes for ' + classname); - - if (!hashes[classname]) continue; - - objects[classname] = dojo.map( - hashes[classname].concat(), - new Function('x', 'return new fieldmapper.' + classname + '().fromHash( x );') - ); - - console.log('created objects for ' + classname); - - stores[classname] = new dojo.data.ItemFileWriteStore( - { data : fieldmapper[classname].toStoreData( objects[classname], 'value' ) } - ); - - console.log('create store for ' + classname); - - if (classname != 'cam') { - layouts[classname] = [ - { cells : [ - [ - { name : "Code", field : "code", width : "5em", editor : dojox.grid.editors.Dijit, rowSpan : "2" }, - { name : "Value", field : "value", width : "auto", editor : dojox.grid.editors.Editor, style : "minHeight:1em;" }, - { name : "Translation", - width : "10em", - height : "2em", - get : function (row) { - if (!grid_row_object_cache[classname]) grid_row_object_cache[classname] = []; - var r = this.grid.model.getRow(row); - if (r) { - grid_row_object_cache[classname][row] = new fieldmapper[classname]().fromHash(this.grid.model.getRow(row)); - setTimeout( - 'dojo.query(".'+classname+'_value_' + row + '").'+ - 'instantiate('+ - 'openils.widget.TranslatorPopup,{field:"value",'+ - 'targetObject:"grid_row_object_cache.'+classname+'['+row+']"}'+ - ');'+ - classname+'_grid.rowHeightChanged('+row+');', - 0 - ); - return ''; - } - return ''; - } - } - ] - ] - } - ]; - } + + (function (classname) { + + hashes[classname] = fieldmapper.standardRequest( + [ 'open-ils.fielder', 'open-ils.fielder.' + classname + '.atomic'], + [ { query : { code : { '!=' : null } } } ] + ); + + console.log('created hashes for ' + classname); + + if (!hashes[classname]) return; + + objects[classname] = dojo.map( + hashes[classname].concat(), + new Function('x', 'return new fieldmapper.' + classname + '().fromHash( x );') + ); + + console.log('created objects for ' + classname); + + stores[classname] = new dojo.data.ItemFileWriteStore( + { data : fieldmapper[classname].toStoreData( objects[classname], 'value' ) } + ); + + console.log('create store for ' + classname); + + if (classname != 'cam') { + layouts[classname] = [ + { cells : [ + [ + { name : "Code", field : "code", width : "5em", editor : dojox.grid.editors.Dijit }, + { name : "Value", field : "value", width : "auto", editor : dojox.grid.editors.Editor, style : "minHeight:1em;" }, + { name : "Translation", + width : "10em", + height : "2em", + get : function (row) { + if (!grid_row_object_cache[classname]) grid_row_object_cache[classname] = []; + var r = this.grid.model.getRow(row); + if (r) { + grid_row_object_cache[classname][row] = new fieldmapper[classname]().fromHash(r); + setTimeout( + 'dojo.query(".'+classname+'_value_' + row + '").'+ + 'instantiate('+ + 'openils.widget.TranslatorPopup,{field:"value",'+ + 'targetObject:"grid_row_object_cache.'+classname+'['+row+']"}'+ + ');'+classname+'_grid.rowHeightChanged('+row+');', + 0 + ); + var oldnode = dojo.byId('value_translation_' + classname + '_' + row); + if (oldnode) dijit.byNode(oldnode).destroyRecursive(); + return ''; + } + return ''; + } + } + ] + ] + } + ]; + } + })(codelist[i]) + } @@ -199,11 +201,6 @@
- -
@@ -216,20 +213,26 @@
- +
-
-
+
+
+ +
+
-
+
@@ -245,19 +248,24 @@
-
-
+
+ +
+
+
-
@@ -272,7 +280,13 @@
-
+
+ +
+
@@ -281,8 +295,8 @@
@@ -299,7 +313,13 @@
-
+
+ +
+
@@ -308,8 +328,8 @@
@@ -326,7 +346,13 @@
-
+
+ +
+
@@ -335,8 +361,8 @@
@@ -353,7 +379,13 @@
-
+
+ +
+
@@ -362,8 +394,8 @@
@@ -380,14 +412,20 @@
-
+
+ +
+
-
+
- + diff --git a/Open-ILS/web/conify/global/config/marc_code_maps.js b/Open-ILS/web/conify/global/config/marc_code_maps.js index 4eed81b1d3..4c32ddddf5 100644 --- a/Open-ILS/web/conify/global/config/marc_code_maps.js +++ b/Open-ILS/web/conify/global/config/marc_code_maps.js @@ -105,7 +105,7 @@ function save_them_all (event) { store.fetch({ query : { ischanged : 1 }, onItem : function (item, req) { try { if (this.isItem( item )) window.dirtyStore.push( item ); } catch (e) { /* meh */ } }, - scope : perm_store + scope : store }); var confirmation = true; diff --git a/Open-ILS/web/js/dojo/openils/I18N.js b/Open-ILS/web/js/dojo/openils/I18N.js index 029ea78b3c..215a530400 100644 --- a/Open-ILS/web/js/dojo/openils/I18N.js +++ b/Open-ILS/web/js/dojo/openils/I18N.js @@ -22,14 +22,6 @@ if(!dojo._hasResource["openils.I18N"]) { dojo.require("fieldmapper.dojoData"); dojo.require("DojoSRF"); dojo.require("dojo.data.ItemFileWriteStore"); - dojo.require("dijit._Widget"); - dojo.require("dijit._Templated"); - dojo.require("dijit.layout.ContentPane"); - dojo.require("dijit.Dialog"); - dojo.require("dijit.form.Button"); - dojo.require("dijit.form.TextBox"); - dojo.require("dijit.form.ComboBox"); - dojo.declare('openils.I18N', null, {}); @@ -53,7 +45,7 @@ if(!dojo._hasResource["openils.I18N"]) { var classname = obj.classname; // XXX need to derive identity field from IDL... - var ident_field = fieldmapper[classname].Identifier || 'id'; + var ident_field = fieldmapper[classname].Identifier; var ident_value = obj[ident_field](); var fielder_args = { query : { fq_field : classname + '.' + field, identity_value : ident_value } }; diff --git a/Open-ILS/web/js/dojo/openils/widget/TranslatorPopup.js b/Open-ILS/web/js/dojo/openils/widget/TranslatorPopup.js index fe7f74d1ee..76a4666a4a 100644 --- a/Open-ILS/web/js/dojo/openils/widget/TranslatorPopup.js +++ b/Open-ILS/web/js/dojo/openils/widget/TranslatorPopup.js @@ -67,7 +67,9 @@ if(!dojo._hasResource["openils.widget.TranslatorPopup"]) { }, renderTranslatorPopup : function () { - + + var _trans_dijit = this; + var _trans_dijit = this; this._targetObject = dojox.jsonPath.query(window, '$.' + this.targetObject, {evalType:"RESULT"}); @@ -183,7 +185,7 @@ if(!dojo._hasResource["openils.widget.TranslatorPopup"]) { isdeleted : method == 'delete' ? 1 : 0, id : trans_id, fq_field : this._targetObject.classname + '.' + this.field, - identity_value : this._targetObject.id(), + identity_value : this._targetObject[fieldmapper[this._targetObject.classname].Identifier](), translation : dijit.byId('locale_' + trans_id).getValue(), string : dijit.byId('translation_' + trans_id).getValue() }); @@ -197,7 +199,7 @@ if(!dojo._hasResource["openils.widget.TranslatorPopup"]) { var trans_obj = new i18n().fromHash({ isnew : 1, fq_field : this._targetObject.classname + '.' + this.field, - identity_value : this._targetObject.id(), + identity_value : this._targetObject[fieldmapper[this._targetObject.classname].Identifier](), translation : dijit.byId('i18n_new_locale_' + this._targetObject.classname + '.' + this.field + this.unique).getValue(), string : dijit.byId('i18n_new_translation_' + this._targetObject.classname + '.' + this.field + this.unique).getValue() }); diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index e33aaba61a..8ba6519715 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -55,8 +55,6 @@ - - @@ -64,9 +62,9 @@ - - - + + + @@ -83,46 +81,47 @@ - - - - + + + + - - + + - + - + - + - - - - - - - - - + + + + + + + + + + @@ -130,25 +129,26 @@ - + + - + - + - + - - + + @@ -160,8 +160,8 @@ - - + + @@ -177,15 +177,15 @@ - + - + - + @@ -198,7 +198,7 @@ - + @@ -277,7 +277,7 @@ - + @@ -308,24 +308,24 @@ - + - - + + - + - + @@ -362,7 +362,7 @@ - + @@ -380,10 +380,10 @@ - - - - + + + + @@ -397,11 +397,11 @@ - + - - - + + + @@ -507,23 +507,23 @@ - - - + + + - - - - - - - - + + + + + + + + - + @@ -531,15 +531,15 @@ - - - - - + + + + + - + @@ -563,9 +563,9 @@ - + - + @@ -617,7 +617,7 @@ - + @@ -750,19 +750,19 @@ - + - + - + - + - + - + @@ -1013,7 +1013,7 @@ - + @@ -1038,7 +1038,7 @@ - + @@ -1057,7 +1057,7 @@ - + @@ -1066,31 +1066,31 @@ - + - + - + - - - - - - + + + + + + - - - - + + + + - + @@ -1101,8 +1101,8 @@ - - + + @@ -1123,9 +1123,9 @@ - - - + + + @@ -1138,12 +1138,12 @@ - + - + @@ -1171,11 +1171,11 @@ - - + + - + @@ -1189,21 +1189,21 @@ - + - + - + @@ -1218,7 +1218,7 @@ - + @@ -1248,22 +1248,35 @@ + + + + + + + + + + + + + + - @@ -1302,7 +1315,7 @@ - + @@ -1341,7 +1354,6 @@ - @@ -1360,7 +1372,7 @@ - + @@ -1391,7 +1403,6 @@ - @@ -1503,7 +1514,7 @@ - + @@ -1522,7 +1533,7 @@ - + @@ -1592,10 +1603,10 @@ - - - - + + + + @@ -1634,8 +1645,8 @@ - - + + @@ -1650,7 +1661,7 @@ - + @@ -1685,6 +1696,7 @@ + @@ -1884,7 +1896,7 @@ - + @@ -1902,8 +1914,6 @@ - - @@ -1929,8 +1939,8 @@ - - + + @@ -1985,17 +1995,17 @@ - - - - - - - - - + + + + + + + + + - + @@ -2005,8 +2015,8 @@ - - + + @@ -2018,6 +2028,7 @@ + @@ -2026,9 +2037,8 @@ - - + @@ -2047,8 +2057,8 @@ - - + + @@ -2060,7 +2070,7 @@ - + @@ -2070,13 +2080,15 @@ - - + + + + - + @@ -2106,7 +2118,6 @@ - @@ -2142,6 +2153,7 @@ + @@ -2161,11 +2173,11 @@ - - + + - + @@ -2173,10 +2185,15 @@ + + + + + @@ -2194,9 +2211,9 @@ - + - + @@ -2207,7 +2224,7 @@ - + @@ -2224,9 +2241,259 @@ - - + + + + + + + + + + + + + + +marked with color"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +color)"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +To view or print a summary of the changes, click on the 'View Summary' link.
To save the user, click on the 'Save User' button."> + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Open-ILS/web/opac/locale/en-US/opac.dtd b/Open-ILS/web/opac/locale/en-US/opac.dtd index 8be327b693..ece075b977 100644 --- a/Open-ILS/web/opac/locale/en-US/opac.dtd +++ b/Open-ILS/web/opac/locale/en-US/opac.dtd @@ -132,7 +132,6 @@ Are you sure you wish to continue?"> - @@ -205,7 +204,6 @@ avoid using bookbags all together. Thank you."> - diff --git a/Open-ILS/web/opac/skin/default/js/adv_global.js b/Open-ILS/web/opac/skin/default/js/adv_global.js index 11beca3506..21c5d23962 100644 --- a/Open-ILS/web/opac/skin/default/js/adv_global.js +++ b/Open-ILS/web/opac/skin/default/js/adv_global.js @@ -69,7 +69,20 @@ function advSyncCopyLocLink(org) { } -function initSearchBoxes(clean) { +function clearSearchBoxes() { + var rows = $('adv_global_tbody').getElementsByTagName('tr'); + for(var t = 0; t < rows.length; t++) { + if($n(rows[t], 'term')) { + $n(rows[t], 'term').value = ''; + setSelector($n(rows[t], 'contains'), 'contains'); + setSelector($n(rows[t], 'type'), 'keyword'); + } + } + $n(rows[0], 'term').focus(); +} + + +function initSearchBoxes() { /* loads the compiled search from the search cookie and sets the widgets accordingly */ @@ -88,14 +101,6 @@ function initSearchBoxes(clean) { var rows = $('adv_global_tbody').getElementsByTagName('tr'); - if(clean) { - for(var t = 0; t < rows.length; t++) { - var input = $n(rows[t], 'term'); - if(input) input.value = ''; - } - return; - } - for(var t = 0; t < types.length; t++) { var row = rows[t]; setSelector($n(row, 'type'), types[t]); diff --git a/Open-ILS/web/opac/skin/default/xml/advanced/advanced_global.xml b/Open-ILS/web/opac/skin/default/xml/advanced/advanced_global.xml index 33c589da65..437f3213d8 100644 --- a/Open-ILS/web/opac/skin/default/xml/advanced/advanced_global.xml +++ b/Open-ILS/web/opac/skin/default/xml/advanced/advanced_global.xml @@ -33,8 +33,8 @@
- + diff --git a/Open-ILS/web/reports/oils_rpt_filters.js b/Open-ILS/web/reports/oils_rpt_filters.js index 13f4ae9919..07bdce31fe 100644 --- a/Open-ILS/web/reports/oils_rpt_filters.js +++ b/Open-ILS/web/reports/oils_rpt_filters.js @@ -54,6 +54,14 @@ var OILS_RPT_FILTERS = { 'is not' : { label : 'Is not NULL' + }, + + 'is blank' : { + label : 'Is NULL or Blank' + }, + + 'is not blank' : { + label : 'Is not NULL or Blank' } } diff --git a/Open-ILS/web/reports/oils_rpt_report_editor.js b/Open-ILS/web/reports/oils_rpt_report_editor.js index 8f3001862f..f51348dddb 100644 --- a/Open-ILS/web/reports/oils_rpt_report_editor.js +++ b/Open-ILS/web/reports/oils_rpt_report_editor.js @@ -12,12 +12,13 @@ function oilsRptReportEditor(rptObject, folderWindow) { appendClear(DOM.oils_rpt_report_editor_template_name, tmpl.name()); appendClear(DOM.oils_rpt_report_editor_template_creator, tmpl.owner().usrname()); appendClear(DOM.oils_rpt_report_editor_template_description, tmpl.description()); - - appendClear(DOM.oils_rpt_report_editor_cols,' | '); + + appendClear(DOM.oils_rpt_report_editor_cols,''); iterate(rptObject.def.select, function(i) { if(i) - DOM.oils_rpt_report_editor_cols.appendChild(text(i.alias +' | ')); + DOM.oils_rpt_report_editor_cols.appendChild(text(i.alias)); + DOM.oils_rpt_report_editor_cols.appendChild(document.createElement('br')); } ); diff --git a/Open-ILS/xul/staff_client/chrome/content/main/main.xul b/Open-ILS/xul/staff_client/chrome/content/main/main.xul index 13fe535afc..de6297e9b8 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/main.xul +++ b/Open-ILS/xul/staff_client/chrome/content/main/main.xul @@ -128,7 +128,7 @@ -
SurveyQuestionAnswer
&ev.staff.patron.ue_xhtml.survey.label;&ev.staff.patron.ue_xhtml.question.label;&ev.staff.patron.ue_xhtml.answer.label;
@@ -916,8 +920,8 @@
- - +
- - + + diff --git a/Open-ILS/web/reports/oils_rpt_editor.xhtml b/Open-ILS/web/reports/oils_rpt_editor.xhtml index 007ced5782..c277bd5fe9 100644 --- a/Open-ILS/web/reports/oils_rpt_editor.xhtml +++ b/Open-ILS/web/reports/oils_rpt_editor.xhtml @@ -34,7 +34,7 @@
Report Columns:
Pivot Label Column:
+ diff --git a/Open-ILS/xul/staff_client/server/admin/hold_pull_list.xhtml b/Open-ILS/xul/staff_client/server/admin/hold_pull_list.xhtml index d8d5323200..540e44d84e 100644 --- a/Open-ILS/xul/staff_client/server/admin/hold_pull_list.xhtml +++ b/Open-ILS/xul/staff_client/server/admin/hold_pull_list.xhtml @@ -52,7 +52,7 @@ - + diff --git a/Open-ILS/xul/staff_client/server/cat/record_buckets_overlay.xul b/Open-ILS/xul/staff_client/server/cat/record_buckets_overlay.xul index e81a0d4538..46bf52ec81 100644 --- a/Open-ILS/xul/staff_client/server/cat/record_buckets_overlay.xul +++ b/Open-ILS/xul/staff_client/server/cat/record_buckets_overlay.xul @@ -73,8 +73,8 @@ - @@ -128,37 +129,37 @@ @@ -168,7 +169,7 @@ @@ -179,7 +180,7 @@ @@ -206,51 +207,51 @@ }' /> --> + onclick='uEditMarkCardLost();'>&staff.patron.ue.mark_lost.label; - + - + - + - + - + - + - + - + - + - + - + - + - +
&staff.server.admin.hold_pull.title;&staff.server.admin.hold_pull.title.label; &staff.server.admin.hold_pull.author; &staff.server.admin.hold_pull.copy_location; &staff.server.admin.hold_pull.call_number;
-
- Note: required or invalid fields are - marked with color + &staff.patron.ue.interface_note.label; - View Errors + &staff.patron.ue.view_errors.label;
- Loading data... + &staff.patron.ue.loading_data.label;
Username
&staff.patron.ue.username.label;
Password
&staff.patron.ue.password.label;
- + - Password: + &staff.patron.ue.re_password.label;
Verify Password
&staff.patron.ue.verify_password.label;
First Name
&staff.patron.ue.first_name.label;
Middle Name
&staff.patron.ue.middle_name.label;
Last Name
&staff.patron.ue.last_name.label;
Suffix
&staff.patron.ue.suffix.label;
Date of Birth
&staff.patron.ue.dob.label;
@@ -323,16 +324,16 @@
Primary Identification Type
&staff.patron.ue.primary_id_type.label;
Primary Identification
&staff.patron.ue.primary_id.label;
@@ -348,16 +349,16 @@
Secondary Identification Type
&staff.patron.ue.secondary_id_type.label;
Secondary Identification
&staff.patron.ue.secondary_id.label;
@@ -365,7 +366,7 @@
Parent / Guardian
&staff.patron.ue.parent_guardian.label;
@@ -384,11 +385,11 @@ - + - + - + - + - +
Email Address
&staff.patron.ue.email_address.label;
Daytime Phone
&staff.patron.ue.day_phone.label;
@@ -397,7 +398,7 @@
Evening Phone
&staff.patron.ue.evening_phone.label;
@@ -405,7 +406,7 @@
Other/Cell Phone
&staff.patron.ue.other_phone.label;
@@ -413,7 +414,7 @@
Home Library
&staff.patron.ue.home_library.label;
- - - - - + + + + + @@ -447,22 +448,22 @@ - + - + - + - + - + - + - + --> - + @@ -559,7 +560,7 @@ - + @@ -570,17 +571,17 @@
AddressWithin City LimitsValidMailing AddressPhysical Address&staff.patron.ue.address.label;&staff.patron.ue.in_city_limits.label;&staff.patron.ue.valid.label;&staff.patron.ue.mailing_address.label;&staff.patron.ue.physical_address.label;
* - Address is owned by + &staff.patron.ue.owned_address.label; - (Edit) + (&staff.patron.ue.edit.label;)
Label
&staff.patron.ue.label.label;
Zip
&staff.patron.ue.zip_code.label;
@@ -470,7 +471,7 @@
Street 1
&staff.patron.ue.street_1.label;
@@ -478,7 +479,7 @@
Street 2
&staff.patron.ue.street_2.label;
@@ -486,13 +487,13 @@
City
&staff.patron.ue.city.label;
County
&staff.patron.ue.county.label;
@@ -500,7 +501,7 @@
State
&staff.patron.ue.state.label;
@@ -514,7 +515,7 @@
Country
&staff.patron.ue.country.label;
@@ -525,10 +526,10 @@
+ value='&staff.patron.ue.delete_this_address.label;'/> + value='&staff.patron.ue.detach_this_address.label;' class='hide_me'/>
- + - + - + - + - + - + - + - +
Profile Group
&staff.patron.ue.profile_group.label;
Account Expiration Date
&staff.patron.ue.accoutn_expire_date.label;
@@ -588,7 +589,7 @@ @@ -607,17 +608,17 @@
Internet Access Level
&staff.patron.ue.internet_access_level.label;
Active
&staff.patron.ue.active.label;
@@ -625,7 +626,7 @@
Barred
&staff.patron.ue.barred.label;
@@ -633,7 +634,7 @@
Set as Family/Group Lead Account
&staff.patron.ue.set_lead_account.label;
@@ -641,7 +642,7 @@
Claims Returned Count
&staff.patron.ue.claims_returned_count.label;
@@ -649,17 +650,17 @@ $('ue_claims_returned').value = 0; $('ue_claims_returned').disabled = true; - +
Alert Message
&staff.patron.ue.alert_message.label;