From 90130b1276d18ba408b2e583ce07de82a9b9f346 Mon Sep 17 00:00:00 2001 From: phasefx Date: Thu, 11 Mar 2010 09:51:31 +0000 Subject: [PATCH] Holdings Maintenance link next to Update Barcodes in Acq git-svn-id: svn://svn.open-ils.org/ILS/trunk@15784 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/ui/default/acq/common/li_table.js | 33 +++++++++++++--------- .../web/templates/default/acq/common/li_table.tt2 | 1 + .../xul/staff_client/chrome/content/cat/opac.js | 1 + .../xul/staff_client/chrome/content/main/menu.js | 12 ++++++++ .../staff_client/chrome/content/util/browser.js | 1 + 5 files changed, 35 insertions(+), 13 deletions(-) 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 e9b3a454d0..50d2c1c21c 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 @@ -294,6 +294,7 @@ function AcqLiTable() { var recv_link = nodeByName("receive_link", row); var unrecv_link = nodeByName("unreceive_link", row); var real_copies_link = nodeByName("real_copies_link", row); + var holdings_maintenance_link = nodeByName("holdings_maintenance_link", row); /* handle row coloring for based on LI state */ openils.Util.removeCSSClass(row, /^oils-acq-li-state-/); @@ -325,6 +326,8 @@ function AcqLiTable() { real_copies_link.onclick = function() { self.showRealCopyEditUI(li); } + openils.Util.show(holdings_maintenance_link); + holdings_maintenance_link.onclick = self.generateMakeRecTab( li.eg_bib_id(), 'copy_browser' ); return; } } @@ -600,20 +603,8 @@ function AcqLiTable() { 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; + link.onclick = this.generateMakeRecTab( li.eg_bib_id() ); } else { var href = link.getAttribute('href'); @@ -625,6 +616,22 @@ function AcqLiTable() { } }; + this.generateMakeRecTab = function(bib_id,default_view) { + return 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=' + bib_id), + default_view : default_view + } + ); + } + }; + this.drawMarcHTML = function(li) { var params = [null, true, li.marc()]; if(li.eg_bib_id()) diff --git a/Open-ILS/web/templates/default/acq/common/li_table.tt2 b/Open-ILS/web/templates/default/acq/common/li_table.tt2 index 2640fc8031..7383870e59 100644 --- a/Open-ILS/web/templates/default/acq/common/li_table.tt2 +++ b/Open-ILS/web/templates/default/acq/common/li_table.tt2 @@ -92,6 +92,7 @@ + Mark ReceivedUn-Receive Copies(0) diff --git a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js index a2518cf197..6ef2d85e73 100644 --- a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js +++ b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js @@ -25,6 +25,7 @@ function my_init() { try { authtime = g.cgi.param('authtime') || xulG.authtime; } catch(E) { g.error.sdump('D_ERROR',E); } try { docid = g.cgi.param('docid') || xulG.docid; } catch(E) { g.error.sdump('D_ERROR',E); } try { opac_url = g.cgi.param('opac_url') || xulG.opac_url; } catch(E) { g.error.sdump('D_ERROR',E); } + try { g.view_override = g.cgi.param('default_view') || xulG.default_view; } catch(E) { g.error.sdump('D_ERROR',E); } JSAN.use('util.deck'); top_pane = new util.deck('top_pane'); diff --git a/Open-ILS/xul/staff_client/chrome/content/main/menu.js b/Open-ILS/xul/staff_client/chrome/content/main/menu.js index 449112cf52..5e4625856d 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/menu.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/menu.js @@ -1336,6 +1336,17 @@ main.menu.prototype = { params ); }, + 'holdings_maintenance_tab' : function(docid,params,content_params) { + var obj = this; + if (!content_params) { + content_params = {}; + } + if (docid) { + content_params['docid'] = docid; + } + var url = obj.url_prefix( urls.XUL_COPY_VOLUME_BROWSE ); + obj.new_tab(url,params || {}, content_params); + }, 'set_tab' : function(url,params,content_params) { var obj = this; if (!url) url = '/xul/server/'; @@ -1355,6 +1366,7 @@ main.menu.prototype = { content_params.new_patron_tab = function(a,b) { return obj.new_patron_tab(a,b); }; content_params.set_patron_tab = function(a,b) { return obj.set_patron_tab(a,b); }; content_params.volume_item_creator = function(a) { return obj.volume_item_creator(a); }; + content_params.holdings_maintenance_tab = function(a,b,c) { return obj.holdings_maintenance_tab(a,b,c); }; content_params.set_tab_name = function(name) { tab.setAttribute('label',(idx + 1) + ' ' + name); }; content_params.open_chrome_window = function(a,b,c) { return xulG.window.open(a,b,c); }; content_params.url_prefix = function(url) { return obj.url_prefix(url); }; diff --git a/Open-ILS/xul/staff_client/chrome/content/util/browser.js b/Open-ILS/xul/staff_client/chrome/content/util/browser.js index e96b5ab722..14c1c4234b 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/browser.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/browser.js @@ -139,6 +139,7 @@ util.browser.prototype = { cw.xulG.new_patron_tab = window.xulG.new_patron_tab; cw.xulG.set_patron_tab = window.xulG.set_patron_tab; cw.xulG.volume_item_creator = window.xulG.volume_item_creator; + cw.xulG.holdings_maintenance_tab = window.xulG.holdings_maintenance_tab; cw.xulG.url_prefix = window.xulG.url_prefix; cw.xulG.urls = window.urls; try { s += ('******** cw = ' + cw + ' cw.xulG = ' + (cw.xulG) + '\n'); } catch(E) { s+=E + '\n'; } -- 2.11.0