From d94eb942551572d60dc3c4d71aa2ad72f2c63deb Mon Sep 17 00:00:00 2001 From: phasefx Date: Wed, 27 Apr 2011 19:12:27 +0000 Subject: [PATCH] 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 Signed-off-by: Thomas Berezansky Signed-off-by: Jason Etheridge git-svn-id: svn://svn.open-ils.org/ILS/trunk@20349 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/skin/default/js/copy_details.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/opac/skin/default/js/copy_details.js b/Open-ILS/web/opac/skin/default/js/copy_details.js index 992c9a0c13..c4c623ae09 100644 --- a/Open-ILS/web/opac/skin/default/js/copy_details.js +++ b/Open-ILS/web/opac/skin/default/js/copy_details.js @@ -251,7 +251,19 @@ function cpdDrawCopy(r) { 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) { -- 2.11.0