From fd273fbc9096d71e4ef8eb807aaa9df96ea1ff0a Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 21 Apr 2009 16:08:48 +0000 Subject: [PATCH] when isXUL, load the linked bib record in the usual opac details wrapper tab, so we can access holdings maintenance, etc. git-svn-id: svn://svn.open-ils.org/ILS/trunk@12942 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/css/skin/default/acq.css | 2 +- Open-ILS/web/js/dojo/openils/acq/nls/acq.js | 3 ++- Open-ILS/web/js/ui/default/acq/common/li_table.js | 32 +++++++++++++++++++---- 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/Open-ILS/web/css/skin/default/acq.css b/Open-ILS/web/css/skin/default/acq.css index a7f58fe8bd..e16d4f4eac 100644 --- a/Open-ILS/web/css/skin/default/acq.css +++ b/Open-ILS/web/css/skin/default/acq.css @@ -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; } diff --git a/Open-ILS/web/js/dojo/openils/acq/nls/acq.js b/Open-ILS/web/js/dojo/openils/acq/nls/acq.js index 5a12092a1b..f31aebb0ca 100644 --- a/Open-ILS/web/js/dojo/openils/acq/nls/acq.js +++ b/Open-ILS/web/js/dojo/openils/acq/nls/acq.js @@ -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' } diff --git a/Open-ILS/web/js/ui/default/acq/common/li_table.js b/Open-ILS/web/js/ui/default/acq/common/li_table.js index 32c768480a..0bbe520513 100644 --- a/Open-ILS/web/js/ui/default/acq/common/li_table.js +++ b/Open-ILS/web/js/ui/default/acq/common/li_table.js @@ -14,9 +14,11 @@ dojo.require('openils.widget.AutoFieldWidget'); 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 @@ function AcqLiTable() { 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 @@ function AcqLiTable() { /* 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 @@ function AcqLiTable() { /* 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()); -- 2.11.0