Use differently colored turtles as a visual aid on circulation pop-ups collab/senator/ninja_turtles
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Mon, 23 Sep 2013 21:39:21 +0000 (17:39 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Mon, 23 Sep 2013 21:39:21 +0000 (17:39 -0400)
Deana Cunningham of the Granville County Library System in North
Carolina asked for the turtle in the popup dialog to wear a different
color depending on whether the dialog says to route to hold shelf,
to put into transit (generically), or to put into transit for a hold.
I also handled the case of putting the copy on the (booking) reservation
hold shelf, for sites that use that.

This is the most direct possible implementation.  It's not particularly
configurable and it doesn't take accessibility into account, in that not
everyone can see the difference between red and green, etc.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/xul/staff_client/server/circ/util.js
Open-ILS/xul/staff_client/server/skin/media/images/turtle-blue.gif [new file with mode: 0644]
Open-ILS/xul/staff_client/server/skin/media/images/turtle-red.gif [new file with mode: 0644]
Open-ILS/xul/staff_client/server/skin/media/images/turtle-yellow.gif [new file with mode: 0644]

index 19e728a..4603019 100644 (file)
@@ -3400,7 +3400,7 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che
                             document.getElementById('circStrings').getString('staff.circ.utils.reservation_slip.print.no'),
                             null,
                             document.getElementById('circStrings').getString('staff.circ.confirm.msg'),
-                            '/xul/server/skin/media/images/turtle.gif'
+                            '/xul/server/skin/media/images/turtle-blue.gif'
                         );
                     }
                     if (rv == 0) {
@@ -3520,7 +3520,9 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che
                     data.hash.ccs[check.payload.transit.copy_status()].name();
             }
             JSAN.use('util.date');
+            var transit_turtle;
             if (check.payload.hold) {
+                transit_turtle = '/xul/server/skin/media/images/turtle-yellow.gif';
                 check.what_happened = 'transit_for_hold';
                 sound.special('checkin.transit_for_hold');
                 JSAN.use('patron.util');
@@ -3634,6 +3636,8 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che
                         print_data.destination_shelf = destination_shelf;
                     }
                 }
+            } else {
+                transit_turtle = '/xul/server/skin/media/images/turtle-red.gif';
             }
             var rv = 0;
             if (suppress_popups) {
@@ -3657,7 +3661,7 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che
                     document.getElementById('circStrings').getString('staff.circ.utils.transit_slip.print.no'),
                     null,
                     document.getElementById('circStrings').getString('staff.circ.confirm.msg'),
-                    '/xul/server/skin/media/images/turtle.gif'
+                    transit_turtle
                 );
             } else {
                 if (suppress_popups && !no_print_prompting) {
diff --git a/Open-ILS/xul/staff_client/server/skin/media/images/turtle-blue.gif b/Open-ILS/xul/staff_client/server/skin/media/images/turtle-blue.gif
new file mode 100644 (file)
index 0000000..a7cbcf1
Binary files /dev/null and b/Open-ILS/xul/staff_client/server/skin/media/images/turtle-blue.gif differ
diff --git a/Open-ILS/xul/staff_client/server/skin/media/images/turtle-red.gif b/Open-ILS/xul/staff_client/server/skin/media/images/turtle-red.gif
new file mode 100644 (file)
index 0000000..3cd4a6d
Binary files /dev/null and b/Open-ILS/xul/staff_client/server/skin/media/images/turtle-red.gif differ
diff --git a/Open-ILS/xul/staff_client/server/skin/media/images/turtle-yellow.gif b/Open-ILS/xul/staff_client/server/skin/media/images/turtle-yellow.gif
new file mode 100644 (file)
index 0000000..1a25e80
Binary files /dev/null and b/Open-ILS/xul/staff_client/server/skin/media/images/turtle-yellow.gif differ