[open-ils-commits] r17268 - in trunk/Open-ILS/xul/staff_client/chrome: content/cat locale/en-US (senator)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Aug 19 13:35:07 EDT 2010
Author: senator
Date: 2010-08-19 13:35:03 -0400 (Thu, 19 Aug 2010)
New Revision: 17268
Modified:
trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul
trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties
Log:
Acq: make view/place orders open a new tab w/ xul browser wrapped therearound
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js 2010-08-19 16:51:00 UTC (rev 17267)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js 2010-08-19 17:35:03 UTC (rev 17268)
@@ -4,7 +4,6 @@
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 @@
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 @@
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 @@
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;
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul 2010-08-19 16:51:00 UTC (rev 17267)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul 2010-08-19 17:35:03 UTC (rev 17268)
@@ -49,7 +49,7 @@
<menuitem label="&staff.cat.opac.marc_edit.label;" accesskey="&staff.cat.opac.marc_edit.accesskey;" id="marc_edit" oncommand="set_marc_edit();"/>
<menuitem label="&staff.cat.opac.copy_browse.label;" accesskey="&staff.cat.opac.copy_browse.accesskey;" id="copy_browse" oncommand="set_copy_browser();"/>
<menuitem label="&staff.cat.opac.view_holds.label;" accesskey="&staff.cat.opac.view_holds.accesskey;" id="view_holds" oncommand="set_hold_browser();"/>
- <menuitem label="&staff.cat.opac.view_orders.label;" accesskey="&staff.cat.opac.view_orders.accesskey;" id="view_orders" oncommand="set_acq_orders();"/>
+ <menuitem label="&staff.cat.opac.view_orders.label;" accesskey="&staff.cat.opac.view_orders.accesskey;" id="view_orders" oncommand="open_acq_orders();"/>
<menuseparator/>
<menuitem label="&staff.cat.opac.add_bucket.label;" accesskey="&staff.cat.opac.add_bucket.accesskey;" id="add_bucket" oncommand="add_to_bucket();"/>
<menuitem label="&staff.cat.opac.mark_for_overlay.label;" accesskey="&staff.cat.opac.mark_for_overlay.accesskey;" id="mark_for_overlay" oncommand="mark_for_overlay();"/>
Modified: trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties 2010-08-19 16:51:00 UTC (rev 17267)
+++ trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties 2010-08-19 17:35:03 UTC (rev 17268)
@@ -259,6 +259,7 @@
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.):
More information about the open-ils-commits
mailing list