[open-ils-commits] r13383 - trunk/Open-ILS/web/opac/skin/default/js (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Sun Jun 14 23:28:58 EDT 2009


Author: dbs
Date: 2009-06-14 23:28:56 -0400 (Sun, 14 Jun 2009)
New Revision: 13383

Modified:
   trunk/Open-ILS/web/opac/skin/default/js/rdetail.js
Log:
Make it possible to edit MFHD records that have gone bad.

Previously, invalid MFHD records would be hidden from the staff client because
they had no holdings to display; now we check for isXUL() and display a default
location of "MFHD" inside the staff client if things are so messed up that even
the location isn't visible.


Modified: trunk/Open-ILS/web/opac/skin/default/js/rdetail.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/rdetail.js	2009-06-14 03:34:18 UTC (rev 13382)
+++ trunk/Open-ILS/web/opac/skin/default/js/rdetail.js	2009-06-15 03:28:56 UTC (rev 13383)
@@ -246,16 +246,17 @@
 	var ho = holdings.online();
 	var hm = holdings.missing();
 	var hinc = holdings.incomplete();
+	var hloc = holdings.location() || 'MFHD';
 
 	if (	hh.length == 0 && hch.length == 0 && hs.length == 0 &&
 		hcs.length == 0 && hi.length == 0 && hci.length == 0 &&
-		ho.length == 0 && hm.length == 0 && hinc.length == 0
+		ho.length == 0 && hm.length == 0 && hinc.length == 0 && !isXUL()
 	) {
 		return null;
 	}
 
 	dojo.place("<table style='width: 100%;'><caption id='mfhdHoldingsCaption' class='rdetail_header color_1'>" +
-		dojo.string.substitute(opac_strings.HOLDINGS_TABLE_CAPTION, [holdings.location()]) +
+		dojo.string.substitute(opac_strings.HOLDINGS_TABLE_CAPTION, [hloc]) +
 		"</caption><tbody id='rdetail_holdings_tbody_" + entryNum +
 		"'></tbody></table>", "rdetail_details_table", "after"
 	);



More information about the open-ils-commits mailing list