Make it possible to edit MFHD records that have gone bad.
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 15 Jun 2009 03:28:56 +0000 (03:28 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 15 Jun 2009 03:28:56 +0000 (03:28 +0000)
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.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@13383 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/skin/default/js/rdetail.js

index 7f9c07d..5c81e45 100644 (file)
@@ -246,16 +246,17 @@ function _holdingsDrawMFHD(holdings, entryNum) {
        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"
        );