webstaff: more intra-acq linking fixes
authorGalen Charlton <gmc@equinoxinitiative.org>
Mon, 6 Feb 2017 22:23:34 +0000 (17:23 -0500)
committerKathy Lussier <klussier@masslnc.org>
Sat, 18 Feb 2017 18:31:31 +0000 (13:31 -0500)
- fix typo from previous patch
- implement linking out to queues and invoices from
  line item table

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/web/js/ui/default/acq/common/li_table.js
Open-ILS/web/js/ui/default/staff/acq/app.js

index 818a576..879ba81 100644 (file)
@@ -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;
             };
         }
index b9e5b0f..431ab4d 100644 (file)
@@ -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