[open-ils-commits] [GIT] Evergreen ILS branch master updated. 400d1ddc8ed3b0e90598dab1c8f4193c3040188a

Evergreen Git git at git.evergreen-ils.org
Tue May 17 22:22:01 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  400d1ddc8ed3b0e90598dab1c8f4193c3040188a (commit)
       via  bab67075d40d83eeef67916e035348d79119edfe (commit)
      from  df33c493bb44912d89d0c2088bf1e339a83f0f5d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 400d1ddc8ed3b0e90598dab1c8f4193c3040188a
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Tue May 17 22:27:07 2011 -0400

    have the call number checkbox for pocket labels include prefix/suffix.  A %call_number% macro is still available for the bare call number label without affixes
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>

diff --git a/Open-ILS/xul/staff_client/server/cat/spine_labels.js b/Open-ILS/xul/staff_client/server/cat/spine_labels.js
index 2db3a6e..04aff17 100644
--- a/Open-ILS/xul/staff_client/server/cat/spine_labels.js
+++ b/Open-ILS/xul/staff_client/server/cat/spine_labels.js
@@ -289,7 +289,12 @@
                         }
                     }
                     if ($('call_number').checked && $('call_number_line').value == j + 1) {
-                        tb2.value = volume.label().substr(0,label_cfg.pocket_width);
+                        tb2.value = (
+                            (volume.prefix() + ' ' + volume.label() + ' ' + volume.suffix())
+                            .replace(/\s+$/,'')
+                            .replace(/^\s+/,'')
+                            .substr(0,label_cfg.pocket_width)
+                        );
                     }
                     if ($('owning_lib_shortname').checked && $('owning_lib_shortname_line').value == j + 1) {
                         var lib = volume.owning_lib();

commit bab67075d40d83eeef67916e035348d79119edfe
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Tue May 17 22:24:21 2011 -0400

    Can't use encodeURI and decodeURI for everything with persist_helper (in particular, something like "%macro1% %macro2%" as a custom entry in the label interface), so try/catch them and fall back to the original behavior.
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>

diff --git a/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js b/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js
index c1c104c..58d6484 100644
--- a/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js
+++ b/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js
@@ -231,7 +231,13 @@
                         dump('on_oils_persist: <<< ' + target.nodeName + '.id = ' + target.id + '\t' + bk + '\n');
                         for (var j = 0; j < attribute_list.length; j++) {
                             var key = base_key + attribute_list[j];
-                            var value = encodeURI(target.getAttribute( attribute_list[j] ));
+                            var value;
+                            try {
+                                value = encodeURI(target.getAttribute( attribute_list[j] ));
+                            } catch(E) {
+                                dump('Error in persist_helper with encodeURI: ' + E + '\n');
+                                value = target.getAttribute( attribute_list[j] );
+                            }
                             if ( attribute_list[j] == 'checked' && ['checkbox','toolbarbutton'].indexOf( target.nodeName ) > -1 ) {
                                 value = target.checked;
                                 dump('\t' + value + ' <== .' + attribute_list[j] + '\n');
@@ -281,7 +287,13 @@
                 for (var j = 0; j < attribute_list.length; j++) {
                     var key = base_key + attribute_list[j];
                     var has_key = prefs.prefHasUserValue(key);
-                    var value = has_key ? decodeURI(prefs.getCharPref(key)) : null;
+                    var value;
+                    try {
+                        value = has_key ? decodeURI(prefs.getCharPref(key)) : null;
+                    } catch(E) {
+                        dump('Error in persist_helper with decodeURI: ' + E + '\n');
+                        value = has_key ? prefs.getCharPref(key) : null;
+                    }
                     if (value == 'true') { value = true; }
                     if (value == 'false') { value = false; }
                     if (has_key) {

-----------------------------------------------------------------------

Summary of changes:
 .../chrome/content/OpenILS/global_util.js          |   16 ++++++++++++++--
 .../xul/staff_client/server/cat/spine_labels.js    |    7 ++++++-
 2 files changed, 20 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list