put Marc View in all bib summary, and avoid the modal print of death bug
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 4 Aug 2006 09:40:22 +0000 (09:40 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 4 Aug 2006 09:40:22 +0000 (09:40 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5290 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/cat/bib_brief.xul
Open-ILS/xul/staff_client/server/cat/marc_view.xul

index ea481c9..e428966 100644 (file)
@@ -33,6 +33,9 @@
        <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
        <script>
        <![CDATA[
+
+               var docid;
+
                function my_init() {
                        try {
                                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
@@ -43,7 +46,7 @@
                                g.error.sdump('D_TRACE','my_init() for cat_bib_brief.xul');
 
                                g.cgi = new CGI();
-                               var docid = g.cgi.param('docid');
+                               docid = g.cgi.param('docid');
 
                                JSAN.use('util.network'); g.network = new util.network();
                                JSAN.use('util.date');
                        }
                }
 
+               function view_marc() {
+                       JSAN.use('util.window'); var win = new util.window();
+                       win.open( urls.XUL_MARC_VIEW + '?noprint=1&docid=' + docid, 'marc_view', 'chrome,resizable,modal,width=400,height=400');
+               }
+
        ]]>
        </script>
 
                <caption label="Record Summary" id="caption"/>
                        <html:table width="90%">
                                <html:tr valign="top">
-                                       <html:td colspan="4">
+                                       <html:td colspan="3">
                                                <html:span style="font-weight: bold;">Title: </html:span><html:span id="title" />
                                        </html:td>
+                                       <html:td>
+                                               (<html:a href="javascript:view_marc();" style="text-decoration: underline; color: blue;">View MARC</html:a>)
+                                       </html:td>
                                </html:tr>
                                <html:tr valign="top">
                                        <html:td colspan="2">
index 2d35ba9..9cea451 100644 (file)
@@ -52,8 +52,8 @@
                                        [ docid ],
                                        function(req) {
                                                marc_html = req.getResultObject();
-                                               document.getElementById('marc_frame').setAttribute('src',
-                                                       'data:text/html,' + marc_html);
+                                               if (g.cgi.param('noprint')||typeof xulG == 'undefined') marc_html = marc_html.replace(/<button.+?button>/, '');
+                                               document.getElementById('marc_frame').setAttribute('src', 'data:text/html,' + marc_html);
                                        }
                                );