From cbef8a85229de3b329934e9467eef9b14cca86b8 Mon Sep 17 00:00:00 2001 From: erickson Date: Thu, 16 Oct 2008 22:04:54 +0000 Subject: [PATCH] Merged revisions 10837-10838,10841-10853 via svnmerge from svn://svn.open-ils.org/ILS/trunk ........ r10837 | erickson | 2008-10-15 21:09:18 -0400 (Wed, 15 Oct 2008) | 1 line by default, wait less time for added content data to return (to prevent apache process exhaustion), but be more forgiving of errors ........ r10838 | dbs | 2008-10-15 23:54:49 -0400 (Wed, 15 Oct 2008) | 3 lines Add a quick Dojo resource bundle <-> POT roundtripping script Ensure Dojo resource bundles adhere to JSON formatting specs ........ r10841 | erickson | 2008-10-16 11:36:04 -0400 (Thu, 16 Oct 2008) | 1 line removed import of non-public packages. testing showed they were not required and they change with dojo 1.2 ........ r10842 | erickson | 2008-10-16 12:06:41 -0400 (Thu, 16 Oct 2008) | 1 line added vandelay menu label and copy-location editor hold verify labels ........ r10843 | dbs | 2008-10-16 12:19:56 -0400 (Thu, 16 Oct 2008) | 1 line Enable localization of Conify ........ r10844 | phasefx | 2008-10-16 12:35:31 -0400 (Thu, 16 Oct 2008) | 1 line change the titlebar for the login window to indicate the target server version ........ r10845 | phasefx | 2008-10-16 12:46:39 -0400 (Thu, 16 Oct 2008) | 1 line exercise the No Propogate Search option when staff opens a new catalog search tab ........ r10846 | phasefx | 2008-10-16 12:54:06 -0400 (Thu, 16 Oct 2008) | 56 lines Patch to better handle migration of settings on the filesystem. Thanks Jeff! === Greetings- I found that when using open-ils.write_in_user_chrome_directory set to true, the staff client would store local settings in the application chrome directory, but the next time the client was run, it would inappropriately attempt to migrate the settings from the application chrome directory to the user chrome directory. If you allowed the settings to be migrated, on the third run, things would get even more confused. The attached patch causes the migration check in main_init() to respect the open-ils.write_in_user_chrome_directory preference, and not migrate the local settings out of the application chrome directory if the preference dictates that they should remain there. DCO inline below, patch is attached. Feedback welcome! -jeff Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: Jeff Godin -- Jeff Godin Traverse Area District Library ........ r10847 | erickson | 2008-10-16 13:53:55 -0400 (Thu, 16 Oct 2008) | 1 line dummied up a native catalog z-source config blob ........ r10848 | dbs | 2008-10-16 14:10:40 -0400 (Thu, 16 Oct 2008) | 1 line Add Conify i18n build rules and POT files ........ r10849 | phasefx | 2008-10-16 14:37:18 -0400 (Thu, 16 Oct 2008) | 1 line use the xul service row for native-evergreen-catalog since it's I18N'ized ........ r10850 | phasefx | 2008-10-16 15:03:06 -0400 (Thu, 16 Oct 2008) | 1 line we're going to let the middle layer completely handle the limit for past circ retrieval ........ r10851 | erickson | 2008-10-16 15:04:09 -0400 (Thu, 16 Oct 2008) | 1 line if no max is configured and no valid count from the SC, default to 4, which was the previous default ........ r10852 | phasefx | 2008-10-16 15:57:47 -0400 (Thu, 16 Oct 2008) | 1 line rough cut of Checkout interface using checkout.full method. Appears to work, but at least one rough spot with redundant override dialogs ........ r10853 | erickson | 2008-10-16 16:27:04 -0400 (Thu, 16 Oct 2008) | 1 line during precats, assume override on checkout.full ........ git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@10856 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/examples/apache/eg_vhost.conf | 4 +- Open-ILS/examples/opensrf.xml.example | 4 +- Open-ILS/src/perlmods/OpenILS/Application/Circ.pm | 8 +- .../perlmods/OpenILS/Application/Circ/Circulate.pm | 3 + .../perlmods/OpenILS/Application/Search/Z3950.pm | 18 +++ Open-ILS/web/conify/global/config/copy_status.js | 2 - .../web/conify/global/config/marc_code_maps.js | 2 - Open-ILS/web/conify/global/permission/grp_tree.js | 2 - Open-ILS/web/conify/global/permission/perm_list.js | 2 - Open-ILS/web/js/dojo/openils/conify/nls/aou.js | 58 +++++----- Open-ILS/web/js/dojo/openils/conify/nls/aout.js | 29 +++-- Open-ILS/web/opac/locale/en-US/lang.dtd | 3 + .../staff_client/chrome/content/main/constants.js | 4 +- .../xul/staff_client/chrome/content/main/main.js | 8 +- .../chrome/locale/en-US/auth.properties | 1 + Open-ILS/xul/staff_client/server/cat/z3950.js | 3 +- Open-ILS/xul/staff_client/server/circ/checkout.js | 26 +++-- .../xul/staff_client/server/circ/circ_summary.xul | 3 +- Open-ILS/xul/staff_client/server/circ/util.js | 6 +- build/i18n/Makefile.in | 17 ++- build/i18n/po/en-US/conify.aou.pot | 128 +++++++++++++++++++++ build/i18n/po/en-US/conify.aout.pot | 68 +++++++++++ build/i18n/scripts/dojo_resource.py | 121 +++++++++++++++++++ 23 files changed, 440 insertions(+), 80 deletions(-) create mode 100644 build/i18n/po/en-US/conify.aou.pot create mode 100644 build/i18n/po/en-US/conify.aout.pot create mode 100755 build/i18n/scripts/dojo_resource.py diff --git a/Open-ILS/examples/apache/eg_vhost.conf b/Open-ILS/examples/apache/eg_vhost.conf index fbef4bc49c..b2b2f390a4 100644 --- a/Open-ILS/examples/apache/eg_vhost.conf +++ b/Open-ILS/examples/apache/eg_vhost.conf @@ -295,13 +295,13 @@ RewriteRule ^/opac/[^/]+/extras/slimpac/(.*)$ /opac/%1/extras/slimpac/$1? [redir # Conify - next-generation Evergreen administration interface # ---------------------------------------------------------------------------------- RewriteEngine on -RewriteRule ^/conify/.*/global/(.*)$ /conify/global/$1 +RewriteRule ^/conify/(.*)/global/(.*)$ /conify/global/$2 [E=locale:$1] XMLEntStripPI "yes" XMLEntEscapeScript "no" XMLEntStripComments "no" XMLEntContentType "text/html; charset=utf-8" - AddOutputFilter INCLUDES .html + AddOutputFilter INCLUDES;XMLENT .html SetHandler perl-script PerlSetVar OILSProxyTitle "Dojo Admin Login" diff --git a/Open-ILS/examples/opensrf.xml.example b/Open-ILS/examples/opensrf.xml.example index 0d60ad887b..09e7a8a8b0 100644 --- a/Open-ILS/examples/opensrf.xml.example +++ b/Open-ILS/examples/opensrf.xml.example @@ -208,7 +208,7 @@ vim:et:ts=4:sw=4: return data. Data not returned within the timeout is considered a failure --> - 4 + 1 - 4 + 15 MY_USER_ID diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm index 6881081ad5..3fe64b46e0 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm @@ -606,9 +606,11 @@ sub view_circs { my $max_history = $U->ou_ancestor_setting_value( $e->requestor->ws_ou, 'circ.item_checkout_history.max', $e); - $count = $max_history if $max_history and (!$count or $count > $max_history); - - return [] unless $count; + if(defined $max_history) { + $count = $max_history unless defined $count and $count < $max_history; + } else { + $count = 4 unless defined $count; + } return $e->search_action_circulation([ {target_copy => $copyid}, diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm index 5aaadd28c8..e5522c2eda 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm @@ -194,6 +194,9 @@ sub run_method { } elsif( $api =~ /checkout.full/ ) { + # requesting a precat checkout implies that any required + # overrides have been performed. Go ahead and re-override. + $circulator->override(1) if $circulator->request_precat; $circulator->do_permit(); unless( $circulator->bail_out ) { $circulator->events([]); diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm b/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm index 6cc8efba84..b40a866425 100755 --- a/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm @@ -121,6 +121,24 @@ sub query_services { } } + # Define the set of native catalog services + # XXX There are i18n problems here, but let's get the staff client working first + # XXX Move into the DB? + $hash->{'native-evergreen-catalog'} = { + attrs => { + title => {code => 'title', label => 'Title'}, + author => {code => 'author', label => 'Author'}, + subject => {code => 'subject', label => 'Subject'}, + keyword => {code => 'keyword', label => 'Keyword'}, + tcn => {code => 'tcn', label => 'TCN'}, + isbn => {code => 'isbn', label => 'ISBN'}, + issn => {code => 'issn', label => 'ISSN'}, + publisher => {code => 'publisher', label => 'Publisher'}, + pubdate => {code => 'pubdate', label => 'Pub Date'}, + item_type => {code => 'item_type', label => 'Item Type'}, + } + }; + return $hash; } diff --git a/Open-ILS/web/conify/global/config/copy_status.js b/Open-ILS/web/conify/global/config/copy_status.js index 5161fa8c25..758dbc4588 100644 --- a/Open-ILS/web/conify/global/config/copy_status.js +++ b/Open-ILS/web/conify/global/config/copy_status.js @@ -29,8 +29,6 @@ dojo.require('dijit.layout.BorderContainer'); dojo.require('dojox.widget.Toaster'); dojo.require('dojox.fx'); dojo.require('dojox.grid.Grid'); -dojo.require('dojox.grid.compat._data.model'); -dojo.require("dojox.grid.compat._data.editors"); // some handy globals var cgi = new CGI(); 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 484b0e4e9e..a1bdd3b5e3 100644 --- a/Open-ILS/web/conify/global/config/marc_code_maps.js +++ b/Open-ILS/web/conify/global/config/marc_code_maps.js @@ -31,8 +31,6 @@ dojo.require('dijit.layout.BorderContainer'); dojo.require('dojox.widget.Toaster'); dojo.require('dojox.fx'); dojo.require('dojox.grid.Grid'); -dojo.require('dojox.grid.compat._data.model'); -dojo.require("dojox.grid.compat._data.editors"); diff --git a/Open-ILS/web/conify/global/permission/grp_tree.js b/Open-ILS/web/conify/global/permission/grp_tree.js index 0682cdb53d..308298c6bb 100644 --- a/Open-ILS/web/conify/global/permission/grp_tree.js +++ b/Open-ILS/web/conify/global/permission/grp_tree.js @@ -37,8 +37,6 @@ dojo.require('dijit.layout.SplitContainer'); dojo.require('dojox.widget.Toaster'); dojo.require('dojox.fx'); dojo.require('dojox.grid.Grid'); -dojo.require('dojox.grid.compat._data.model'); -dojo.require("dojox.grid.compat._data.editors"); // some handy globals var cgi = new CGI(); diff --git a/Open-ILS/web/conify/global/permission/perm_list.js b/Open-ILS/web/conify/global/permission/perm_list.js index 4766c5367b..540f601bba 100644 --- a/Open-ILS/web/conify/global/permission/perm_list.js +++ b/Open-ILS/web/conify/global/permission/perm_list.js @@ -29,8 +29,6 @@ dojo.require('dijit.layout.BorderContainer'); dojo.require('dojox.widget.Toaster'); dojo.require('dojox.fx'); dojo.require('dojox.grid.Grid'); -dojo.require('dojox.grid.compat._data.model'); -dojo.require("dojox.grid.compat._data.editors"); // some handy globals var cgi = new CGI(); diff --git a/Open-ILS/web/js/dojo/openils/conify/nls/aou.js b/Open-ILS/web/js/dojo/openils/conify/nls/aou.js index 1a387a0cb6..039ba00d4b 100644 --- a/Open-ILS/web/js/dojo/openils/conify/nls/aou.js +++ b/Open-ILS/web/js/dojo/openils/conify/nls/aou.js @@ -1,31 +1,31 @@ { - CONFIRM_DELETE: "Are you sure you want to delete ${0}?", - CONFIRM_EXIT: "There are unsaved changes to one or more organizational units. Click OK to save these changes, or Cancel to abandon them.", - ERROR_CREATING_CHILD: "Problem creating child Organizational Unit", - ERROR_DELETING: "Problem deleting ${0}", - ERROR_DELETING_LAST: "Cannot delete ${0}, you need at least one.", - ERROR_FETCHING_HOLDS: "Problem fetching Holds Address for ${0}", - ERROR_FETCHING_HOURS: "Problem fetching hours of operation for ${0}", - ERROR_FETCHING_ILL: "Problem fetching ILL Address for ${0}", - ERROR_FETCHING_MAILING: "Problem fetching Mailing Address for ${0}", - ERROR_FETCHING_ORGS: "Problem fetching organizational unit data", - ERROR_FETCHING_PHYSICAL: "Problem fetching Physical Address for ${0}", - ERROR_FETCHING_TYPES: "Problem fetching organizational unit type data", - ERROR_ORPHANS: "Cannot delete ${0}, ${1} subordinates still exist.", - ERROR_SAVING_HOO: "Problem saving Hours of Operation data for ${0}", - ERROR_SAVING_DATA: "Problem saving data for ${0}", - ERROR_SAVING_HOLDS: "Problem saving Holds Address data for ${0}", - ERROR_SAVING_ILL: "Problem saving ILL Address data for ${0}", - ERROR_SAVING_MAILING: "Problem saving Mailing Address data for ${0}", - ERROR_SAVING_PHYSICAL: "Problem saving Physical Address data for ${0}", - LABEL_NEW_BRANCH: "New Branch", - STATUS_DELETED: "${0} deleted", - STATUS_EDITING: "Now editing ${0}", - SUCCESS_CREATING_CHILD: "New child Organizational Unit created for ${0}", - SUCCESS_SAVE: "Saved changes to ${0}", - SUCCESS_SAVING_HOO: "Hours of Operation updated for ${0}", - SUCCESS_SAVING_HOLDS: "Saved changes to the Holds Address of ${0}", - SUCCESS_SAVING_ILL: "Saved changes to the ILL Address of ${0}", - SUCCESS_SAVING_MAILING: "Saved changes to the Mailing Address of ${0}", - SUCCESS_SAVING_PHYSICAL: "Saved changes to the Physical Address of ${0}" + "CONFIRM_DELETE": "Are you sure you want to delete ${0}?", + "CONFIRM_EXIT": "There are unsaved changes to one or more organizational units. Click OK to save these changes, or Cancel to abandon them.", + "ERROR_CREATING_CHILD": "Problem creating child Organizational Unit", + "ERROR_DELETING": "Problem deleting ${0}", + "ERROR_DELETING_LAST": "Cannot delete ${0}, you need at least one.", + "ERROR_FETCHING_HOLDS": "Problem fetching Holds Address for ${0}", + "ERROR_FETCHING_HOURS": "Problem fetching hours of operation for ${0}", + "ERROR_FETCHING_ILL": "Problem fetching ILL Address for ${0}", + "ERROR_FETCHING_MAILING": "Problem fetching Mailing Address for ${0}", + "ERROR_FETCHING_ORGS": "Problem fetching organizational unit data", + "ERROR_FETCHING_PHYSICAL": "Problem fetching Physical Address for ${0}", + "ERROR_FETCHING_TYPES": "Problem fetching organizational unit type data", + "ERROR_ORPHANS": "Cannot delete ${0}, ${1} subordinates still exist.", + "ERROR_SAVING_HOO": "Problem saving Hours of Operation data for ${0}", + "ERROR_SAVING_DATA": "Problem saving data for ${0}", + "ERROR_SAVING_HOLDS": "Problem saving Holds Address data for ${0}", + "ERROR_SAVING_ILL": "Problem saving ILL Address data for ${0}", + "ERROR_SAVING_MAILING": "Problem saving Mailing Address data for ${0}", + "ERROR_SAVING_PHYSICAL": "Problem saving Physical Address data for ${0}", + "LABEL_NEW_BRANCH": "New Branch", + "STATUS_DELETED": "${0} deleted", + "STATUS_EDITING": "Now editing ${0}", + "SUCCESS_CREATING_CHILD": "New child Organizational Unit created for ${0}", + "SUCCESS_SAVE": "Saved changes to ${0}", + "SUCCESS_SAVING_HOO": "Hours of Operation updated for ${0}", + "SUCCESS_SAVING_HOLDS": "Saved changes to the Holds Address of ${0}", + "SUCCESS_SAVING_ILL": "Saved changes to the ILL Address of ${0}", + "SUCCESS_SAVING_MAILING": "Saved changes to the Mailing Address of ${0}", + "SUCCESS_SAVING_PHYSICAL": "Saved changes to the Physical Address of ${0}" } diff --git a/Open-ILS/web/js/dojo/openils/conify/nls/aout.js b/Open-ILS/web/js/dojo/openils/conify/nls/aout.js index 1b2813ed2e..cb486deb95 100644 --- a/Open-ILS/web/js/dojo/openils/conify/nls/aout.js +++ b/Open-ILS/web/js/dojo/openils/conify/nls/aout.js @@ -1,17 +1,16 @@ { - - CONFIRM_UNSAVED_CHANGES: "There are unsaved changes to one or more organization types. Click OK to save these changes, or Cancel to abandon them.", - CONFIRM_DELETE: "Are you sure you want to delete ${0}?", - ERROR_CREATING_CHILD: "Problem creating child Organization Type", - ERROR_CREATING_CHILD_METHOD: "Problem calling method to create child Organization Type", - ERROR_DELETING: "Problem deleting ${0}", - ERROR_DELETING_LAST: "Cannot delete ${0}. You need at least one organization type.", - ERROR_ORPHANS: "Cannot delete ${0}; ${1} subordinates still exist.", - ERROR_SAVING_DATA: "Problem saving data for ${0}", - ERROR_FETCHING_TYPES: "Problem fetching organization types", - LABEL_NEW_TYPE: "New Type", - STATUS_DELETED: "${0} deleted", - STATUS_EDITING: "Now editing ${0}", - SUCCESS_CREATING_CHILD: "New child Organization Type created for ${0}", - SUCCESS_SAVING_DATA: "Saved changes to ${0}" + "CONFIRM_UNSAVED_CHANGES": "There are unsaved changes to one or more organization types. Click OK to save these changes, or Cancel to abandon them.", + "CONFIRM_DELETE": "Are you sure you want to delete ${0}?", + "ERROR_CREATING_CHILD": "Problem creating child Organization Type", + "ERROR_CREATING_CHILD_METHOD": "Problem calling method to create child Organization Type", + "ERROR_DELETING": "Problem deleting ${0}", + "ERROR_DELETING_LAST": "Cannot delete ${0}. You need at least one organization type.", + "ERROR_ORPHANS": "Cannot delete ${0}; ${1} subordinates still exist.", + "ERROR_SAVING_DATA": "Problem saving data for ${0}", + "ERROR_FETCHING_TYPES": "Problem fetching organization types", + "LABEL_NEW_TYPE": "New Type", + "STATUS_DELETED": "${0} deleted", + "STATUS_EDITING": "Now editing ${0}", + "SUCCESS_CREATING_CHILD": "New child Organization Type created for ${0}", + "SUCCESS_SAVING_DATA": "Saved changes to ${0}" } diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index bc4ffc66fb..a9c5274207 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -640,6 +640,7 @@ + @@ -1353,6 +1354,7 @@ + @@ -1361,6 +1363,7 @@ + diff --git a/Open-ILS/xul/staff_client/chrome/content/main/constants.js b/Open-ILS/xul/staff_client/chrome/content/main/constants.js index 4863fe3255..e23b8077db 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js @@ -221,11 +221,11 @@ const api = { const urls = { - 'opac' : '/opac/en-US/skin/default/xml/advanced.xml', + 'opac' : '/opac/en-US/skin/default/xml/advanced.xml?nps=1', 'opac_rdetail' : '/opac/en-US/skin/default/xml/rdetail.xml', 'opac_rresult' : '/opac/en-US/skin/default/xml/rresult.xml', 'org_tree' : '/opac/common/js/OrgTree.js', - 'browser' : '/opac/en-US/skin/default/xml/advanced.xml', + 'browser' : '/opac/en-US/skin/default/xml/advanced.xml?nps=1', 'fieldmapper' : '/opac/common/js/fmall.js', 'isodate_lib_remote' : '/opac/common/js/DP_DateExtensions.js', 'isodate_lib_local' : 'chrome://open_ils_staff_client/content/OpenILS/util/DP_DateExtensions.js', diff --git a/Open-ILS/xul/staff_client/chrome/content/main/main.js b/Open-ILS/xul/staff_client/chrome/content/main/main.js index 9faf49ed2d..aa3c635f2f 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/main.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/main.js @@ -2,6 +2,7 @@ dump('entering main/main.js\n'); // vim:noet:sw=4:ts=4: var offlineStrings; +var authStrings; function grant_perms(url) { var perms = "UniversalXPConnect UniversalPreferencesWrite UniversalBrowserWrite UniversalPreferencesRead UniversalBrowserRead UniversalFileRead"; @@ -35,6 +36,7 @@ function main_init() { // Now we can safely load the strings without the cache getting wiped offlineStrings = document.getElementById('offlineStrings'); + authStrings = document.getElementById('authStrings'); if (typeof JSAN == 'undefined') { throw( @@ -233,6 +235,7 @@ function main_init() { version = 'versionless debug build'; document.getElementById('debug_gb').hidden = false; } + window.title = authStrings.getFormattedString('staff.auth.titlebar.label', version); //var x = document.getElementById('version_label'); //x.setAttribute('value','Build ID: ' + version); var x = document.getElementById('about_btn'); @@ -265,7 +268,10 @@ function main_init() { false ); - if ( found_ws_info_in_Achrome() ) { + var pref = Components.classes["@mozilla.org/preferences-service;1"] + .getService(Components.interfaces.nsIPrefBranch); + + if ( found_ws_info_in_Achrome() && pref.getBoolPref("open-ils.write_in_user_chrome_directory") ) { //var hbox = x.parentNode; var b = document.createElement('button'); //b.setAttribute('label','Migrate legacy settings'); hbox.appendChild(b); //b.addEventListener( diff --git a/Open-ILS/xul/staff_client/chrome/locale/en-US/auth.properties b/Open-ILS/xul/staff_client/chrome/locale/en-US/auth.properties index e3e88d2041..b505d7d896 100644 --- a/Open-ILS/xul/staff_client/chrome/locale/en-US/auth.properties +++ b/Open-ILS/xul/staff_client/chrome/locale/en-US/auth.properties @@ -12,3 +12,4 @@ staff.auth.controller.confirm_close=Are you sure you would like to exit the prog staff.auth.session.unregistered=%1$s is not registered with this server. staff.auth.session.login_failed=Login failed. Please check your Server Hostname, Username, Password, and your CAPS LOCK key. staff.auth.session.init_false=open-ils.auth.authenticate.init returned false +staff.auth.titlebar.label=Evergreen Staff Client - %1$s diff --git a/Open-ILS/xul/staff_client/server/cat/z3950.js b/Open-ILS/xul/staff_client/server/cat/z3950.js index d0c2cdffcf..8286779f2c 100644 --- a/Open-ILS/xul/staff_client/server/cat/z3950.js +++ b/Open-ILS/xul/staff_client/server/cat/z3950.js @@ -312,6 +312,7 @@ cat.z3950.prototype = { var x = document.getElementById('service_rows'); for (var i in obj.services) { try { + if (i == 'native-evergreen-catalog') continue; var r = document.createElement('row'); x.appendChild(r); var cb = document.createElement('checkbox'); if (obj.services[i].label) { @@ -337,7 +338,7 @@ cat.z3950.prototype = { alert(E); } } - obj.services[ 'native-evergreen-catalog' ] = { 'attrs' : { 'author' : {}, 'title' : {} } }; + //obj.services[ 'native-evergreen-catalog' ] = { 'attrs' : { 'author' : {}, 'title' : {} } }; setTimeout( function() { if (obj.creds.hosts[ obj.data.server_unadorned ]) { diff --git a/Open-ILS/xul/staff_client/server/circ/checkout.js b/Open-ILS/xul/staff_client/server/circ/checkout.js index 7072a51500..19aacdb84f 100644 --- a/Open-ILS/xul/staff_client/server/circ/checkout.js +++ b/Open-ILS/xul/staff_client/server/circ/checkout.js @@ -351,7 +351,7 @@ circ.checkout.prototype = { '_checkout_pending_hash' : {}, - '_checkout' : function(params) { + '_checkout' : function(params,permit) { var obj = this; try { @@ -454,7 +454,7 @@ circ.checkout.prototype = { } /**********************************************************************************************************************/ - /* This does the actual checkout/renewal */ + /* This used to do the actual checkout/renewal */ var x = document.createElement('label'); x.setAttribute('style','color: green'); @@ -465,6 +465,7 @@ circ.checkout.prototype = { } document.getElementById('msg_area').appendChild(x); + /* obj.network.request( api.CHECKOUT.app, api.CHECKOUT.method, @@ -473,8 +474,12 @@ circ.checkout.prototype = { _checkout_callback(req,x); } ); + */ if (typeof params.noncat == 'undefined') { obj.items_out_count++; } + + /* new */ + _checkout_callback({ 'getResultObject' : function() { return permit; } },x); } catch(E) { x.setAttribute('style','color: red'); @@ -540,14 +545,14 @@ circ.checkout.prototype = { /**********************************************************************************************************************/ - /* Permissibility test before checkout */ + /* This used to be the Permissibility test before checkout */ try { params.patron = obj.patron_id; - var permit = obj.network.request( - api.CHECKOUT_PERMIT.app, - api.CHECKOUT_PERMIT.method, + var permit = obj.network.simple_request( + //api.CHECKOUT_PERMIT.app, + 'CHECKOUT_FULL', [ ses(), params, obj.items_out_count ], null, { @@ -603,7 +608,7 @@ circ.checkout.prototype = { JSAN.use('util.sound'); var sound = new util.sound(); sound.circ_good(); params.permit_key = permit.payload; - obj._checkout( params ); + obj._checkout( params, permit ); /**********************************************************************************************************************/ /* Item not cataloged or barcode mis-scan. Prompt for pre-cat option */ @@ -636,11 +641,14 @@ circ.checkout.prototype = { params.precat = 1; if (params.dummy_title !== '') { - obj._checkout( params ); + //obj._checkout( params ); No real request method here anymore + obj.checkout( params ); } else { alert(document.getElementById('circStrings').getString('staff.circ.checkout.cancelled')); } - } + } + + return; } var test_permit; diff --git a/Open-ILS/xul/staff_client/server/circ/circ_summary.xul b/Open-ILS/xul/staff_client/server/circ/circ_summary.xul index 193aae759a..0838dbf4c7 100644 --- a/Open-ILS/xul/staff_client/server/circ/circ_summary.xul +++ b/Open-ILS/xul/staff_client/server/circ/circ_summary.xul @@ -51,7 +51,6 @@ g.error.sdump('D_TRACE','my_init() for circ_circ_brief.xul'); g.copy_id = xul_param('copy_id',{'modal_xulG':true}); - g.count = xul_param('count',{'modal_xulG':true}); JSAN.use('util.network'); g.network = new util.network(); JSAN.use('util.date'); @@ -78,7 +77,7 @@ try { $('r_last').disabled = true; $('r_all').disabled = true; g.circs = g.network.simple_request('FM_CIRC_RETRIEVE_VIA_COPY', - [ ses(), g.copy_id, g.count ]); + [ ses(), g.copy_id ]); if (g.circs == null || typeof g.circs.ilsevent != 'undefined') throw(circs); if (g.circs.length == 0) return; //g.circs = g.circs.reverse(); /* put the most recent at the top */ diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index 0ed540888a..987dd2fd68 100644 --- a/Open-ILS/xul/staff_client/server/circ/util.js +++ b/Open-ILS/xul/staff_client/server/circ/util.js @@ -86,20 +86,18 @@ circ.util.show_copy_details = function(copy_id) { }; -circ.util.show_last_few_circs = function(selection_list,count) { +circ.util.show_last_few_circs = function(selection_list) { var obj = {}; JSAN.use('util.error'); obj.error = new util.error(); JSAN.use('util.window'); obj.win = new util.window(); JSAN.use('util.network'); obj.network = new util.network(); JSAN.use('OpenILS.data'); obj.data = new OpenILS.data(); obj.data.init({'via':'stash'}); - if (!count) count = 4; - for (var i = 0; i < selection_list.length; i++) { try { if (typeof selection_list[i].copy_id == 'undefined' || selection_list[i].copy_id == null) continue; var url = xulG.url_prefix( urls.XUL_CIRC_SUMMARY ); // + '?copy_id=' + selection_list[i].copy_id + '&count=' + count; - var my_xulG = obj.win.open( url, 'show_last_few_circs', 'chrome,resizable,modal', { 'copy_id' : selection_list[i].copy_id, 'count' : count } ); + var my_xulG = obj.win.open( url, 'show_last_few_circs', 'chrome,resizable,modal', { 'copy_id' : selection_list[i].copy_id } ); if (typeof my_xulG.retrieve_these_patrons == 'undefined') continue; var patrons = my_xulG.retrieve_these_patrons; diff --git a/build/i18n/Makefile.in b/build/i18n/Makefile.in index 946335e70d..439b434553 100644 --- a/build/i18n/Makefile.in +++ b/build/i18n/Makefile.in @@ -6,6 +6,8 @@ LOCALE=fr-CA DTDDIR=../../Open-ILS/web/opac/locale CHROME_PROPSDIR=../../Open-ILS/xul/staff_client/chrome/locale SERVER_PROPSDIR=../../Open-ILS/xul/staff_client/server/locale +DOJO_LOCALE := $(shell echo ${LOCALE} | tr '[:upper:]-' '[:lower:]/') +DOJOSRC=../../Open-ILS/web/js/dojo/openils/conify/nls FMIDLSRC=../../Open-ILS/examples/fm_IDL.xml FMIDLOUT=fm_IDL.pot FMIDLENT=fm_IDL.xml @@ -50,12 +52,12 @@ newpo: @echo "Generated new PO files for locale $(LOCALE)" # Generate a new set of POT files and entityized fieldmapper IDL -newpot: dtds2pot fmidl2pot fmidl2fmidlent ils2pot props2pot sql2pot +newpot: dtds2pot fmidl2pot fmidl2fmidlent ils2pot props2pot sql2pot dojo2pot @echo "Generated new POT files" # Generate DTD, JavaScript message catalogs, fieldmapper IDL, # and SQL insert files from PO for locale LOCALE -project: po2dtds po2props po2sql fmidlpo2entity po2ils +project: po2dtds po2props po2sql fmidlpo2entity po2ils po2dojo @echo "Generated project files for locale $(LOCALE)" # Update PO files with new and changed strings from POT files @@ -78,6 +80,14 @@ props2po: dtds2pot: @moz2po -P $(PROGRESS) -o $(POTSRC) -i $(DTDDIR)/en-US/ 2>&1 +dojo2pot: + @scripts/dojo_resource.py --pot $(DOJOSRC)/aou.js --output $(POTSRC)/conify.aou.pot + @scripts/dojo_resource.py --pot $(DOJOSRC)/aout.js --output $(POTSRC)/conify.aout.pot + +po2dojo: + @scripts/dojo_resource.py --create $(POINDIR)/$(LOCALE)/conify.aou.po --output $(PROJECT)/$(LOCALE)/conify.aou.js + @scripts/dojo_resource.py --create $(POINDIR)/$(LOCALE)/conify.aout.po --output $(PROJECT)/$(LOCALE)/conify.aout.js + ils2pot: @scripts/ils_events.py --pot $(EVTSRC) --output $(POTSRC)/$(EVTOUT) @@ -135,3 +145,6 @@ install: updatepo project fmidl2fmidlent @scripts/merge_ils_events.py --master $(EVTSRC) --localization $(PROJECT)/$(LOCALE)/$(EVTXML) --output $(EVTSRC) cp $(PROJECT)/$(LOCALE)/$(SQLOUT).sql $(SQLSRCDIR)/$(SQLOUT)-$(LOCALE).sql cp $(POOUTDIR)/$(FMIDLENT) $(REPORTDIR)/$(FMIDLENT) + mkdir -p $(DOJOSRC)/$(DOJO_LOCALE) + cp $(PROJECT)/$(LOCALE)/conify.aou.js $(DOJOSRC)/$(DOJO_LOCALE)/aou.js + cp $(PROJECT)/$(LOCALE)/conify.aout.js $(DOJOSRC)/$(DOJO_LOCALE)/aout.js diff --git a/build/i18n/po/en-US/conify.aou.pot b/build/i18n/po/en-US/conify.aou.pot new file mode 100644 index 0000000000..ea14505a89 --- /dev/null +++ b/build/i18n/po/en-US/conify.aou.pot @@ -0,0 +1,128 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Evergreen 1.4\n" +"Report-Msgid-Bugs-To: open-ils-dev@list.georgialibraries.org\n" +"POT-Creation-Date: 2008-10-16 14:07:01-0400\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: aou.js:SUCCESS_SAVING_PHYSICAL +msgid "Saved changes to the Physical Address of ${0}" +msgstr "Saved changes to the Physical Address of ${0}" + +#: aou.js:ERROR_FETCHING_TYPES +msgid "Problem fetching organizational unit type data" +msgstr "Problem fetching organizational unit type data" + +#: aou.js:ERROR_FETCHING_PHYSICAL +msgid "Problem fetching Physical Address for ${0}" +msgstr "Problem fetching Physical Address for ${0}" + +#: aou.js:ERROR_SAVING_DATA +msgid "Problem saving data for ${0}" +msgstr "Problem saving data for ${0}" + +#: aou.js:LABEL_NEW_BRANCH +msgid "New Branch" +msgstr "New Branch" + +#: aou.js:ERROR_FETCHING_HOURS +msgid "Problem fetching hours of operation for ${0}" +msgstr "Problem fetching hours of operation for ${0}" + +#: aou.js:ERROR_FETCHING_ILL +msgid "Problem fetching ILL Address for ${0}" +msgstr "Problem fetching ILL Address for ${0}" + +#: aou.js:SUCCESS_CREATING_CHILD +msgid "New child Organizational Unit created for ${0}" +msgstr "New child Organizational Unit created for ${0}" + +#: aou.js:SUCCESS_SAVING_HOO +msgid "Hours of Operation updated for ${0}" +msgstr "Hours of Operation updated for ${0}" + +#: aou.js:ERROR_DELETING_LAST +msgid "Cannot delete ${0}, you need at least one." +msgstr "Cannot delete ${0}, you need at least one." + +#: aou.js:ERROR_SAVING_HOO +msgid "Problem saving Hours of Operation data for ${0}" +msgstr "Problem saving Hours of Operation data for ${0}" + +#: aou.js:ERROR_SAVING_PHYSICAL +msgid "Problem saving Physical Address data for ${0}" +msgstr "Problem saving Physical Address data for ${0}" + +#: aou.js:CONFIRM_EXIT +msgid "There are unsaved changes to one or more organizational units. Click OK to save these changes, or Cancel to abandon them." +msgstr "There are unsaved changes to one or more organizational units. Click OK to save these changes, or Cancel to abandon them." + +#: aou.js:SUCCESS_SAVE +msgid "Saved changes to ${0}" +msgstr "Saved changes to ${0}" + +#: aou.js:SUCCESS_SAVING_MAILING +msgid "Saved changes to the Mailing Address of ${0}" +msgstr "Saved changes to the Mailing Address of ${0}" + +#: aou.js:ERROR_FETCHING_MAILING +msgid "Problem fetching Mailing Address for ${0}" +msgstr "Problem fetching Mailing Address for ${0}" + +#: aou.js:ERROR_FETCHING_ORGS +msgid "Problem fetching organizational unit data" +msgstr "Problem fetching organizational unit data" + +#: aou.js:SUCCESS_SAVING_HOLDS +msgid "Saved changes to the Holds Address of ${0}" +msgstr "Saved changes to the Holds Address of ${0}" + +#: aou.js:SUCCESS_SAVING_ILL +msgid "Saved changes to the ILL Address of ${0}" +msgstr "Saved changes to the ILL Address of ${0}" + +#: aou.js:ERROR_DELETING +msgid "Problem deleting ${0}" +msgstr "Problem deleting ${0}" + +#: aou.js:STATUS_EDITING +msgid "Now editing ${0}" +msgstr "Now editing ${0}" + +#: aou.js:ERROR_CREATING_CHILD +msgid "Problem creating child Organizational Unit" +msgstr "Problem creating child Organizational Unit" + +#: aou.js:CONFIRM_DELETE +msgid "Are you sure you want to delete ${0}?" +msgstr "Are you sure you want to delete ${0}?" + +#: aou.js:ERROR_ORPHANS +msgid "Cannot delete ${0}, ${1} subordinates still exist." +msgstr "Cannot delete ${0}, ${1} subordinates still exist." + +#: aou.js:ERROR_SAVING_HOLDS +msgid "Problem saving Holds Address data for ${0}" +msgstr "Problem saving Holds Address data for ${0}" + +#: aou.js:ERROR_FETCHING_HOLDS +msgid "Problem fetching Holds Address for ${0}" +msgstr "Problem fetching Holds Address for ${0}" + +#: aou.js:ERROR_SAVING_MAILING +msgid "Problem saving Mailing Address data for ${0}" +msgstr "Problem saving Mailing Address data for ${0}" + +#: aou.js:STATUS_DELETED +msgid "${0} deleted" +msgstr "${0} deleted" + +#: aou.js:ERROR_SAVING_ILL +msgid "Problem saving ILL Address data for ${0}" +msgstr "Problem saving ILL Address data for ${0}" diff --git a/build/i18n/po/en-US/conify.aout.pot b/build/i18n/po/en-US/conify.aout.pot new file mode 100644 index 0000000000..2639d71c03 --- /dev/null +++ b/build/i18n/po/en-US/conify.aout.pot @@ -0,0 +1,68 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Evergreen 1.4\n" +"Report-Msgid-Bugs-To: open-ils-dev@list.georgialibraries.org\n" +"POT-Creation-Date: 2008-10-16 14:07:02-0400\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: aout.js:ERROR_FETCHING_TYPES +msgid "Problem fetching organization types" +msgstr "Problem fetching organization types" + +#: aout.js:SUCCESS_SAVING_DATA +msgid "Saved changes to ${0}" +msgstr "Saved changes to ${0}" + +#: aout.js:LABEL_NEW_TYPE +msgid "New Type" +msgstr "New Type" + +#: aout.js:STATUS_DELETED +msgid "${0} deleted" +msgstr "${0} deleted" + +#: aout.js:ERROR_DELETING +msgid "Problem deleting ${0}" +msgstr "Problem deleting ${0}" + +#: aout.js:STATUS_EDITING +msgid "Now editing ${0}" +msgstr "Now editing ${0}" + +#: aout.js:SUCCESS_CREATING_CHILD +msgid "New child Organization Type created for ${0}" +msgstr "New child Organization Type created for ${0}" + +#: aout.js:ERROR_CREATING_CHILD +msgid "Problem creating child Organization Type" +msgstr "Problem creating child Organization Type" + +#: aout.js:CONFIRM_DELETE +msgid "Are you sure you want to delete ${0}?" +msgstr "Are you sure you want to delete ${0}?" + +#: aout.js:CONFIRM_UNSAVED_CHANGES +msgid "There are unsaved changes to one or more organization types. Click OK to save these changes, or Cancel to abandon them." +msgstr "There are unsaved changes to one or more organization types. Click OK to save these changes, or Cancel to abandon them." + +#: aout.js:ERROR_ORPHANS +msgid "Cannot delete ${0}; ${1} subordinates still exist." +msgstr "Cannot delete ${0}; ${1} subordinates still exist." + +#: aout.js:ERROR_SAVING_DATA +msgid "Problem saving data for ${0}" +msgstr "Problem saving data for ${0}" + +#: aout.js:ERROR_CREATING_CHILD_METHOD +msgid "Problem calling method to create child Organization Type" +msgstr "Problem calling method to create child Organization Type" + +#: aout.js:ERROR_DELETING_LAST +msgid "Cannot delete ${0}. You need at least one organization type." +msgstr "Cannot delete ${0}. You need at least one organization type." diff --git a/build/i18n/scripts/dojo_resource.py b/build/i18n/scripts/dojo_resource.py new file mode 100755 index 0000000000..604b402cce --- /dev/null +++ b/build/i18n/scripts/dojo_resource.py @@ -0,0 +1,121 @@ +#!/usr/bin/env python +# dojo_resource.py +""" +This class enables translation of Dojo resource bundles using gettext format. + +Requires polib from http://polib.googlecode.com + +Source event definitions are structured as follows: +{ + MSG_ID1: "This is a message with 1 variable - ${0}.", + MSG_ID2: "This is a message with two variables: ${0} and ${1}." +} + +Note that this is a deliberately limited subset of the variable substitution +allowed by http://api.dojotoolkit.org/jsdoc/dojo/1.2/dojo.string.substitute + +""" +# Copyright 2007 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. + +import basel10n +import optparse +import polib +import re +import sys +import simplejson +import os.path + +class DojoResource (basel10n.BaseL10N): + """ + This class provides methods for extracting translatable strings from + Evergreen's Dojo resource bundle files, generating translatable POT files, + reading translated PO files, and generating an updated Dojo resource bundle + files with additional or changed strings. + """ + + def __init__(self): + self.pot = None + basel10n.BaseL10N.__init__(self) + self.msgs = {} + + def get_strings(self, source): + """ + Extracts translatable strings from Evergreen's Dojo resource bundles. + """ + self.pothead() + + bundle = simplejson.load(open(source, 'r')) + + for key, value in bundle.iteritems(): + poe = polib.POEntry() + poe.occurrences = [(os.path.basename(source), key)] + poe.msgid = value + poe.msgstr = value + self.pot.append(poe) + + def create_bundle(self): + """ + Creates a Dojo resource bundle file based on a translated PO file. + """ + + msg = "\t\"%s\": \"%s\"" + + for entry in self.pot: + for filename, msgkey in entry.occurrences: + if entry.msgstr == '': + # No translation available; use the en-US definition + self.msgs[msgkey] = entry.msgid + else: + self.msgs[msgkey] = entry.msgstr + +def main(): + """ + Determine what action to take + """ + opts = optparse.OptionParser() + opts.add_option('-p', '--pot', action='store', \ + help='Create a POT file from the specified Dojo resource bundle file', \ + metavar='FILE') + opts.add_option('-c', '--create', action='store', \ + help='Create a Dojo resource bundle file from a translated PO FILE', \ + metavar='FILE') + opts.add_option('-o', '--output', dest='outfile', \ + help='Write output to FILE (defaults to STDOUT)', metavar='FILE') + (options, args) = opts.parse_args() + + pot = DojoResource() + + # Generate a new POT file from the Dojo resource bundle file + if options.pot: + pot.get_strings(options.pot) + if options.outfile: + pot.savepot(options.outfile) + else: + sys.stdout.write(pot.pot.__str__()) + + # Generate an Dojo resource bundle file from a PO file + elif options.create: + pot.loadpo(options.create) + pot.create_bundle() + if options.outfile: + outfile = open(options.outfile, 'w') + simplejson.dump(pot.msgs, outfile, indent=4) + else: + print(simplejson.dumps(pot.msgs, indent=4)) + + # No options were recognized - print help and bail + else: + opts.print_help() + +if __name__ == '__main__': + main() -- 2.11.0