[open-ils-commits] r12942 - in trunk/Open-ILS/web: css/skin/default js/dojo/openils/acq/nls js/ui/default/acq/common (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Apr 21 12:08:51 EDT 2009


Author: erickson
Date: 2009-04-21 12:08:48 -0400 (Tue, 21 Apr 2009)
New Revision: 12942

Modified:
   trunk/Open-ILS/web/css/skin/default/acq.css
   trunk/Open-ILS/web/js/dojo/openils/acq/nls/acq.js
   trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
Log:
when isXUL, load the linked bib record in the usual opac details wrapper tab, so we can access holdings maintenance, etc.

Modified: trunk/Open-ILS/web/css/skin/default/acq.css
===================================================================
--- trunk/Open-ILS/web/css/skin/default/acq.css	2009-04-21 16:01:59 UTC (rev 12941)
+++ trunk/Open-ILS/web/css/skin/default/acq.css	2009-04-21 16:08:48 UTC (rev 12942)
@@ -109,5 +109,5 @@
 .acq-lit-li-menu-bar {width:99%; text-align:left; border:1px solid #aaa; margin:5px 0px 10px 0px;}
 .acq-lit-table-spacer { height:20px; }
 .acq-lit-row td[name="selector"] { width:1.5em; font-weight:bold; color:blue; font-size:110%;}
-border:1px solid #aaa;-moz-border-radius:3px 3px 3px 3px;
+#acq-lit-notes-tbody li { margin-bottom:10px; border:1px solid #aaa; -moz-border-radius: 5px 5px 5px 5px; }
 

Modified: trunk/Open-ILS/web/js/dojo/openils/acq/nls/acq.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/acq/nls/acq.js	2009-04-21 16:01:59 UTC (rev 12941)
+++ trunk/Open-ILS/web/js/dojo/openils/acq/nls/acq.js	2009-04-21 16:08:48 UTC (rev 12942)
@@ -1,4 +1,5 @@
 {
     'CREATE_PO_ASSETS_CONFIRM' : "This will create bibliographic, call number, and copy records for this purchase order in the ILS.\n\nContinue?",
-    'ROLLBACK_PO_RECEIVE_CONFIRM' : "This will rollback receipt of all copies for this purchase order.\n\nContinue?"
+    'ROLLBACK_PO_RECEIVE_CONFIRM' : "This will rollback receipt of all copies for this purchase order.\n\nContinue?",
+    'XUL_RECORD_DETAIL_PAGE' : 'Record Details'
 }

Modified: trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js	2009-04-21 16:01:59 UTC (rev 12941)
+++ trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js	2009-04-21 16:08:48 UTC (rev 12942)
@@ -14,9 +14,11 @@
 dojo.require('dojo.data.ItemFileReadStore');
 dojo.require('openils.widget.ProgressDialog');
 dojo.require('openils.PermaCrud');
+dojo.require('openils.XUL');
 
 dojo.requireLocalization('openils.acq', 'acq');
 var localeStrings = dojo.i18n.getLocalization('openils.acq', 'acq');
+const XUL_OPAC_WRAPPER = 'chrome://open_ils_staff_client/content/cat/opac.xul';
 
 function AcqLiTable() {
 
@@ -392,9 +394,29 @@
         if(li.eg_bib_id()) {
             openils.Util.show('acq-lit-info-cat-link');
             var link = dojo.byId('acq-lit-info-cat-link').getElementsByTagName('a')[0];
-            var href = link.getAttribute('href');
-            if(href.match(/=$/))
-                link.setAttribute('href',  href + li.eg_bib_id());
+
+            if(openils.XUL.isXUL()) {
+
+                var makeRecTab = function() {
+				    xulG.new_tab(
+                        XUL_OPAC_WRAPPER,
+					    {tab_name: localeStrings.XUL_RECORD_DETAIL_PAGE, browser:false},
+					    {
+                            no_xulG : false, 
+                            show_nav_buttons : true, 
+                            show_print_button : true, 
+                            opac_url : xulG.url_prefix(xulG.urls.opac_rdetail + '?r=' + li.eg_bib_id())
+                        }
+                    );
+                }
+                link.setAttribute('href', 'javascript:void(0);');
+                link.onclick = makeRecTab;
+
+            } else {
+                var href = link.getAttribute('href');
+                if(href.match(/=$/))
+                    link.setAttribute('href',  href + li.eg_bib_id());
+            }
         } else {
             openils.Util.hide('acq-lit-info-cat-link');
         }
@@ -855,7 +877,7 @@
         /*  To run in Firefox directly, must set signed.applets.codebase_principal_support
             to true in about:config */
 
-        netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
+        if(!openils.XUL.enableXPConnect()) return;
         win = window.open('/xul/server/cat/marcedit.xul'); // XXX version?
 
         var self = this;
@@ -887,7 +909,7 @@
         /*  To run in Firefox directly, must set signed.applets.codebase_principal_support
             to true in about:config */
 
-        netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
+        if(!openils.XUL.enableXPConnect()) return;
         win = window.open('/xul/server/cat/marcedit.xul'); // XXX version?
 
         var bib = new openils.PermaCrud().retrieve('bre', li.eg_bib_id());



More information about the open-ils-commits mailing list