From 400d1ddc8ed3b0e90598dab1c8f4193c3040188a Mon Sep 17 00:00:00 2001
From: Jason Etheridge <jason@esilibrary.com>
Date: Tue, 17 May 2011 22:27:07 -0400
Subject: [PATCH] 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>
---
 Open-ILS/xul/staff_client/server/cat/spine_labels.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

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();
-- 
2.11.0