From: miker Date: Tue, 10 Mar 2009 01:14:51 +0000 (+0000) Subject: default to BKS if no valid record type can be gleaned from the fixed fields X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=516d0eb35633e203948962212d43cb2f9f045974;p=evergreen%2Ftadl.git default to BKS if no valid record type can be gleaned from the fixed fields git-svn-id: svn://svn.open-ils.org/ILS/trunk@12478 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/cat/marcedit.js b/Open-ILS/xul/staff_client/server/cat/marcedit.js index c5cbc3f3ac..dbd8dcb6bd 100644 --- a/Open-ILS/xul/staff_client/server/cat/marcedit.js +++ b/Open-ILS/xul/staff_client/server/cat/marcedit.js @@ -81,10 +81,10 @@ function xml_escape_unicode ( str ) { function my_init() { try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); } - JSAN.errorLevel = "die"; // none, warn, or die - JSAN.addRepository('/xul/server/'); + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); } + JSAN.errorLevel = "die"; // none, warn, or die + JSAN.addRepository('/xul/server/'); // Fake xulG for standalone... try { @@ -1003,10 +1003,15 @@ function recordType (rec) { for (var t in rec_type) { if (_t.match(rec_type[t].Type) && _b.match(rec_type[t].BLvl)) { document.getElementById('recordTypeLabel').value = t; - _record_type = t; + _record_type = t; return t; } } + + // in case we don't have a valid record type ... + _record_type = 'BKS'; + return _record_type; + } catch(E) { alert('FIXME, MARC Editor, recordType: ' + E); }