From: senator Date: Thu, 19 Aug 2010 17:35:03 +0000 (+0000) Subject: Acq: make view/place orders open a new tab w/ xul browser wrapped therearound X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c4b27f979fe84817877f035b4bb8630bb0e0636a;p=contrib%2FConifer.git Acq: make view/place orders open a new tab w/ xul browser wrapped therearound git-svn-id: svn://svn.open-ils.org/ILS/trunk@17268 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- 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 48abee9ef9..cdbf7e9e5e 100644 --- a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js +++ b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js @@ -4,7 +4,6 @@ var marc_view_reset = true; var marc_edit_reset = true; var copy_browser_reset = true; var hold_browser_reset = true; -var acq_orders_reset = true; var serctrl_view_reset = true; function $(id) { return document.getElementById(id); } @@ -269,17 +268,38 @@ function set_hold_browser() { bottom_pane.get_contentWindow().addEventListener('load',opac_wrapper_set_help_context,false); } -function set_acq_orders() { - g.view = 'acq_orders'; - var url = xulG.url_prefix( '/eg/acq/lineitem/related/' ) + window.escape(docid) + '?target=bib'; - if (acq_orders_reset) { - bottom_pane.reset_iframe(url,{},xulG); - acq_orders_reset = false; - } else { - bottom_pane.set_iframe(url,{},xulG); + +function open_acq_orders() { + try { + var content_params = { + "session": ses(), + "authtime": ses("authtime"), + "no_xulG": false, + "show_print_button": false + }; + + ["url_prefix", "new_tab", "set_tab", "close_tab", "new_patron_tab", + "set_patron_tab", "volume_item_creator", "get_new_session", + "holdings_maintenance_tab", "set_tab_name", "open_chrome_window", + "url_prefix", "network_meter", "page_meter", "set_statusbar", + "set_help_context" + ].forEach(function(k) { content_params[k] = xulG[k]; }); + + var loc = urls.XUL_BROWSER + "?url=" + window.escape( + xulG.url_prefix("/eg/acq/lineitem/related/") + + docid + "?target=bib" + ); + xulG.new_tab( + loc, { + "tab_name": $("offlineStrings").getString( + "staff.cat.opac.related_items" + ), + "browser": false + }, content_params + ); + } catch (E) { + g.error.sdump("D_ERROR", E); } - opac_wrapper_set_help_context(); - bottom_pane.get_contentWindow().addEventListener('load',opac_wrapper_set_help_context,false); } function set_opac() { @@ -667,7 +687,6 @@ function refresh_display(id) { marc_edit_reset = true; copy_browser_reset = true; hold_browser_reset = true; - acq_orders_reset = true; while(top_pane.node.lastChild) top_pane.node.removeChild( top_pane.node.lastChild ); var children = bottom_pane.node.childNodes; for (var i = 0; i < children.length; i++) { @@ -690,7 +709,6 @@ function refresh_display(id) { case 'marc_edit' : set_marc_edit(); break; case 'copy_browser' : set_copy_browser(); break; case 'hold_browser' : set_hold_browser(); break; - case 'acq_orders' : set_acq_orders(); break; case 'serctrl_view' : set_serctrl_view(); break; case 'opac' : default: set_opac(); break; diff --git a/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul b/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul index a758c929f3..dd26a6dfcb 100644 --- a/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul +++ b/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul @@ -49,7 +49,7 @@ - + diff --git a/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties b/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties index eca1229ffc..07c9f4a042 100644 --- a/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties +++ b/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties @@ -259,6 +259,7 @@ staff.cat.opac.marked_record_for_hold_transfer_indicator.record_id.label=Record staff.cat.opac.title_for_hold_transfer.destination_needed.label=Need to mark a record as a Title Hold Transfer Destination first. staff.cat.opac.title_for_hold_transfer.success.label=Holds transferred. staff.cat.opac.title_for_hold_transfer.failure.label=Holds not transferred. +staff.cat.opac.related_items=Related Lineitems staff.cat.create_or_rebarcode_items=Create or Re-barcode Items printing.nothing_to_reprint=Nothing to re-print printing.prompt_for_external_print_cmd=Enter external print command and parameters (use %receipt.txt% or %receipt.html% as the file containing the print data. Those values will be substituted with the proper path.):