webstaff: Protect some ACQ interfaces from XUL-ish calls
authorMike Rylander <mrylander@gmail.com>
Tue, 10 Jan 2017 17:10:58 +0000 (12:10 -0500)
committerKathy Lussier <klussier@masslnc.org>
Sat, 18 Feb 2017 18:31:31 +0000 (13:31 -0500)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/web/js/ui/default/acq/common/inv_dialog.js
Open-ILS/web/js/ui/default/acq/common/li_table.js
Open-ILS/web/js/ui/default/acq/invoice/view.js

index 6ef5126..95ca98a 100644 (file)
@@ -11,7 +11,7 @@ function InvoiceLinkDialogManager(which, target) {
             var join = (idx == 0) ? '?' : '&';
             path += join + "attach_" + self.which + "=" + id;
         });
-        if (openils.XUL.isXUL()) {
+        if (openils.XUL.isXUL() && !window.IAMBROWSER) {
             openils.XUL.newTabEasy(
                 path,
                 /* tab title */ dojo.string.substitute(
index 7a34720..818a576 100644 (file)
@@ -3158,7 +3158,7 @@ function AcqLiTable() {
         }
         var path = oilsBasePath + '/acq/invoice/view?create=1';
         dojo.forEach(liIds, function(li, idx) { path += '&attach_li=' + li });
-        if (openils.XUL.isXUL())
+        if (openils.XUL.isXUL() && !window.IAMBROWSER)
             openils.XUL.newTabEasy(path, localeStrings.NEW_INVOICE, null, true);
         else
             location.href = path;
index 4fbc16a..9ac5e25 100644 (file)
@@ -275,7 +275,7 @@ function performSearch(pageDir, clearFirst) {
 
     var searchObject = termManager.buildSearchObject();
 
-    if (openils.XUL.isXUL()) {
+    if (openils.XUL.isXUL() && !window.IAMBROWSER) {
 
         cookieSvc.setCookieString(cookieUriSSL, null, 
             "invs=" + base64Encode(searchObject) + ';max-age=2592000', null);
@@ -373,7 +373,7 @@ function renderUnifiedSearch() {
 
         var searchObject, searchConjunction;
 
-        if (openils.XUL.isXUL()) {
+        if (openils.XUL.isXUL() && !window.IAMBROWSER) {
     
             if (!cookieSvc) {