[open-ils-commits] r20349 - trunk/Open-ILS/web/opac/skin/default/js (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Apr 27 15:12:32 EDT 2011
Author: phasefx
Date: 2011-04-27 15:12:27 -0400 (Wed, 27 Apr 2011)
New Revision: 20349
Modified:
trunk/Open-ILS/web/opac/skin/default/js/copy_details.js
Log:
Change barcode to link to item status
For copy details change the barcode to a link to the item status.
This only applies to the staff client itself due to an isXUL check first.
This allows for a staff member to get more details on the copy with a single click, rather than copy/paste of the barcode.
Author: Thomas Berezansky <tsbere at mvlc.org>
Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
Signed-off-by: Jason Etheridge <jason at esilibrary.com>
Modified: trunk/Open-ILS/web/opac/skin/default/js/copy_details.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/copy_details.js 2011-04-27 18:44:05 UTC (rev 20348)
+++ trunk/Open-ILS/web/opac/skin/default/js/copy_details.js 2011-04-27 19:12:27 UTC (rev 20349)
@@ -251,7 +251,19 @@
return;
}
- var b = $n(row, 'barcode').appendChild(text(copy.barcode()));
+ // Make barcode more useful for staff client usage
+ if(isXUL()) {
+ var my_a = document.createElement('a');
+ my_a.appendChild(text(copy.barcode()));
+ my_a.setAttribute("href","javascript:void(0);");
+ my_a.onclick = function() {
+ xulG.new_tab(xulG.urls.XUL_COPY_STATUS, {}, {'from_item_details_new': true, 'barcodes': [copy.barcode()]});
+ };
+ $n(row, 'barcode').appendChild(my_a);
+ }
+ else {
+ $n(row, 'barcode').appendChild(text(copy.barcode()));
+ }
/* show the peer type*/
if (pt) {
More information about the open-ils-commits
mailing list