From: Mike Rylander Date: Tue, 22 Nov 2016 15:03:16 +0000 (-0500) Subject: webstaff: Allow ACQ catalog and link-to-record, er, links to work in a browser X-Git-Tag: sprint4-merge-nov22^2~1 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b6ff1f4c49b827c05bea998abfb9441a97fc2c7f;p=working%2FEvergreen.git 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 --- 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();