KMAIN-954 Make barcode on precat checkout alert more pronounced
authorBill Erickson <berickxx@gmail.com>
Wed, 29 Oct 2014 21:10:01 +0000 (17:10 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
    Cross-port: b423b64

Open-ILS/web/opac/locale/en-US/lang.dtd
Open-ILS/xul/staff_client/chrome/content/util/error.js
Open-ILS/xul/staff_client/server/circ/checkout.js
Open-ILS/xul/staff_client/server/circ/pre_cat_fields.xul
Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
Open-ILS/xul/staff_client/server/skin/global.css

index d1c3f2b..106d38f 100644 (file)
 <!ENTITY staff.circ.pre_cat.dummy_author.accesskey "A">
 <!ENTITY staff.circ.pre_cat.dummy_isbn.label "ISBN">
 <!ENTITY staff.circ.pre_cat.dummy_isbn.accesskey "I">
+<!ENTITY staff.circ.pre_cat.dummy_barcode.label "Barcode">
 <!ENTITY staff.circ.pre_cat.dummy_circ_modifier.label "Circ Modifier">
 <!ENTITY staff.circ.pre_cat.dummy_circ_modifier.accesskey "M">
 <!ENTITY staff.circ.pre_cat.cancel.label "Cancel">
index 4523e2d..6b2a669 100644 (file)
@@ -347,9 +347,13 @@ util.error.prototype = {
 
         dump('yns_alert:\n\ts = ' + s + '\n\ttitle = ' + title + '\n\tb1 = ' + b1 + '\n\tb2 = ' + b2 + '\n\tb3 = ' + b3 + '\n\tc = ' + c + '\n');
 
-        //FIXME - is that good enough of an escape job?
-        s = s.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
-
+        // Check to see if we are in pre-cat checkout so we don't strip out html code
+        var barcode_number = s.match(/\d+/);
+        var test_string = document.getElementById('circStrings').getFormattedString('staff.circ.checkout.not_cataloged.confirm', barcode_number);
+               if(s !== test_string) {
+                       //FIXME - is that good enough of an escape job?
+                       s = s.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
+               }
         var xml = '<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml" flex="1">' 
             + '<groupbox flex="1" style="overflow: auto; border: solid thin red;"><caption label="' + (title) + '"/>';
 
index 626ae4b..cee2eee 100644 (file)
@@ -772,7 +772,7 @@ circ.checkout.prototype = {
                         '/xul/server/skin/media/images/book_question.png'
                     ) ) {
 
-                        obj.data.dummy_title = ''; obj.data.dummy_author = ''; obj.data.stash('dummy_title','dummy_author');
+                        obj.data.dummy_title = ''; obj.data.dummy_author = ''; obj.data.dummy_barcode = params.barcode; obj.data.stash('dummy_title','dummy_author', 'dummy_barcode');
                         JSAN.use('util.window'); var win = new util.window();
                         win.open(urls.XUL_PRE_CAT, 'dummy_fields', 'chrome,resizable,modal');
                         obj.data.stash_retrieve();
index 046f2b2..eaed15d 100644 (file)
@@ -72,6 +72,7 @@
                 x.setAttribute('value', g.data.precat_circ_modifier);
                 x.value = g.data.precat_circ_modifier;
             }
+            document.getElementById('dummy_barcode').value = g.data.dummy_barcode;
             document.getElementById('dummy_title').focus();
         }
 
                     <textbox id="dummy_isbn" context="clipboard"/>
                 </row>
                 <row>
+                    <label value="&staff.circ.pre_cat.dummy_barcode.label;" control="dummy_barcode"/>
+                    <label id="dummy_barcode" class="barcode_highlight"/>
+                </row>
+                <row>
                     <label value="&staff.circ.pre_cat.dummy_circ_modifier.label;" accesskey="&staff.circ.pre_cat.dummy_circ_modifier.accesskey;" control="dummy_circ_modifier"/>
                     <box id="placeholder" />
                 </row>
index 529fbbc..338dc6b 100644 (file)
@@ -52,7 +52,7 @@ staff.circ.checkout.override.item_deposit_required.warning=A billing for an Item
 staff.circ.checkout.override.item_rental_fee_required.warning=A billing for an Item Rental Fee will be added to the patron's account if this action is overrided.
 staff.circ.checkout.override.will_auto=If overridden now, subsequent checkouts during this patron's session will auto-override this event.
 staff.circ.checkout.error_retrieving_copy_status=Could not retrieve the name of the current status for the copy
-staff.circ.checkout.not_cataloged.confirm=Barcode %1$s was either mis-scanned or is a non-cataloged item.  Checkout as a pre-cataloged item?
+staff.circ.checkout.not_cataloged.confirm=Barcode <span class="barcode_highlight">%1$s</span><html:br/> was either mis-scanned or is a non-cataloged item.  Checkout as a pre-cataloged item?
 staff.circ.pre_cataloged=Pre-cataloged
 staff.circ.non_cataloged=Non-cataloged
 staff.circ.checkout.cancelled=Checkout cancelled
index 87c0c9e..9772a75 100644 (file)
@@ -157,3 +157,9 @@ listitem { border-bottom: solid thin black; }
 
 .oils_event { color: red; }
 
+.barcode_highlight { 
+       color: red; 
+       font-weight: bold;
+       font-size: large;               
+)
+