From: Jason Etheridge <jason@esilibrary.com>
Date: Wed, 18 May 2011 02:27:07 +0000 (-0400)
Subject: have the call number checkbox for pocket labels include prefix/suffix.  A %call_numbe... 
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3af69e089bb548ea61c821405134e2466facb148;p=evergreen%2Fjoelewis.git

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@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 2db3a6ed23..04aff17b9a 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();