From b6ff1f4c49b827c05bea998abfb9441a97fc2c7f Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Tue, 22 Nov 2016 10:03:16 -0500 Subject: [PATCH] webstaff: Allow ACQ catalog and link-to-record, er, links to work in a browser Signed-off-by: Mike Rylander Signed-off-by: Kathy Lussier --- .../web/js/ui/default/acq/common/li_table.js | 39 ++++++++++++------- 1 file changed, 26 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 c54346bc6c..851982d207 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 @@ -1786,17 +1786,25 @@ function AcqLiTable() { this.generateMakeRecTab = function(bib_id,default_view, row) { 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('opac_rdetail|' + bib_id), - default_view : default_view + if(openils.XUL.isXUL() && !window.IAMBROWSER) { + 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('opac_rdetail|' + bib_id), + default_view : default_view + } + ); + } else { + var url = '/eg/staff/cat/catalog/record/' + bib_id; + if (default_view == 'copy_browser') { + url += '/holdings'; } - ); + window.open(url); + } if(row) nodeByName("action_none", row).selected = true; } @@ -3742,9 +3750,14 @@ function AcqLiTable() { } ); - win = window.open( - oilsBasePath + '/acq/lineitem/findbib?query=' + encodeURIComponent(query), - '', 'resizable,scrollbars=1,chrome'); + if(openils.XUL.isXUL() && !window.IAMBROWSER) { + win = window.open( + oilsBasePath + '/acq/lineitem/findbib?query=' + encodeURIComponent(query), + '', 'resizable,scrollbars=1,chrome'); + } else { + win = window.open( oilsBasePath + '/acq/lineitem/findbib?query=' + encodeURIComponent(query)); + } + win.window.recordFound = function(bibId) { win.close(); -- 2.43.2