From 5e071c58b2b9f755e9631b53e64833a0c0071a9f Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 6 Feb 2017 17:23:34 -0500 Subject: [PATCH 1/1] webstaff: more intra-acq linking fixes - fix typo from previous patch - implement linking out to queues and invoices from line item table Signed-off-by: Galen Charlton Signed-off-by: Kathy Lussier --- .../web/js/ui/default/acq/common/li_table.js | 20 ++++++++++++------- Open-ILS/web/js/ui/default/staff/acq/app.js | 2 +- 2 files changed, 14 insertions(+), 8 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 818a576681..879ba81a70 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 @@ -765,10 +765,13 @@ function AcqLiTable() { openils.Util.show(nodeByName('queue', row), 'inline'); var link = nodeByName("queue_link", row); link.onclick = function() { + var url = oilsBasePath + '/vandelay/vandelay?qtype=bib&qid=' + qrec.queue() // open a new tab to the vandelay queue for this record - openils.XUL.newTabEasy( - oilsBasePath + '/vandelay/vandelay?qtype=bib&qid=' + qrec.queue() - ); + if (window.IAMBROWSER) { + xulG.relay_url(url); + } else { + openils.XUL.newTabEasy(url); + } } } } @@ -1236,10 +1239,13 @@ function AcqLiTable() { openils.Util.show(nodeByName("invoices_span", row), "inline"); var link = nodeByName("invoices_link", row); link.onclick = function() { - openils.XUL.newTabEasy( - oilsBasePath + "/acq/search/unified?so=" + - base64Encode({"jub":[{"id": li.id()}]}) + "&rt=invoice" - ); + var url = oilsBasePath + "/acq/search/unified?so=" + + base64Encode({"jub":[{"id": li.id()}]}) + "&rt=invoice" + if (window.IAMBROWSER) { + xulG.relay_url(url); + } else { + openils.XUL.newTabEasy(url); + } return false; }; } diff --git a/Open-ILS/web/js/ui/default/staff/acq/app.js b/Open-ILS/web/js/ui/default/staff/acq/app.js index b9e5b0f12d..431ab4dc6c 100644 --- a/Open-ILS/web/js/ui/default/staff/acq/app.js +++ b/Open-ILS/web/js/ui/default/staff/acq/app.js @@ -53,7 +53,7 @@ function($scope , $routeParams , $location , $window , $timeout , egCore) { var acq_path = '/eg/acq/' + $routeParams.noun + '/' + $routeParams.verb + - ((typeof $routeParams.record != 'undefined') ? '/' + $routeParams.record : '') + ((typeof $routeParams.record != 'undefined') ? '/' + $routeParams.record : '') + location.search; $scope.min_height = 2000; // give lots of space to start -- 2.43.2