[open-ils-commits] r14055 - in trunk/Open-ILS/xul/staff_client/server: cat locale/en-US (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Sep 18 14:39:36 EDT 2009
Author: phasefx
Date: 2009-09-18 14:39:32 -0400 (Fri, 18 Sep 2009)
New Revision: 14055
Modified:
trunk/Open-ILS/xul/staff_client/server/cat/marc_view.xul
trunk/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties
Log:
in case marc_view.xul gets sent a pre-cat
Modified: trunk/Open-ILS/xul/staff_client/server/cat/marc_view.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/marc_view.xul 2009-09-18 18:16:50 UTC (rev 14054)
+++ trunk/Open-ILS/xul/staff_client/server/cat/marc_view.xul 2009-09-18 18:39:32 UTC (rev 14055)
@@ -61,16 +61,21 @@
JSAN.use('util.network'); g.network = new util.network();
- g.network.request(
- api.MARC_HTML_RETRIEVE.app,
- api.MARC_HTML_RETRIEVE.method,
- [ docid ],
- function(req) {
- marc_html = req.getResultObject();
- if (noprint||typeof xulG == 'undefined') marc_html = marc_html.replace(/<button.+?button>/, '');
- document.getElementById('marc_frame').setAttribute('src', 'data:text/html,' + marc_html);
- }
- );
+ if (docid > -1) {
+ g.network.request(
+ api.MARC_HTML_RETRIEVE.app,
+ api.MARC_HTML_RETRIEVE.method,
+ [ docid ],
+ function(req) {
+ var marc_html = req.getResultObject();
+ if (noprint||typeof xulG == 'undefined') marc_html = marc_html.replace(/<button.+?button>/, '');
+ document.getElementById('marc_frame').setAttribute('src', 'data:text/html,' + marc_html);
+ }
+ );
+ } else {
+ var marc_html = '<h1>' + document.getElementById('catStrings').getString('bib.no_marc') + '</h1>';
+ document.getElementById('marc_frame').setAttribute('src', 'data:text/html,' + marc_html);
+ }
} catch(E) {
var err_msg = document.getElementById("commonStrings").getFormattedString('common.exception', ['cat/marc_view.xul', E]);
@@ -82,6 +87,8 @@
]]>
</script>
+ <messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale' -->/cat.properties"/>
+
<groupbox flex="1">
<caption label="&staff.cat.marc_view.title;"/>
<iframe id="marc_frame" flex="1"/>
Modified: trunk/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties 2009-09-18 18:16:50 UTC (rev 14054)
+++ trunk/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties 2009-09-18 18:39:32 UTC (rev 14055)
@@ -1,3 +1,4 @@
+bib.no_marc=No MARC Record
cat.barcode_for_item=The barcode for the item is %1$s
cat.batch_operation_failed=The whole batch operation failed. %1$s
cat.copy_buckets.tab=Copy Buckets
More information about the open-ils-commits
mailing list