tweak to vlagent.js
authorJason Etheridge <jason@esilibrary.com>
Mon, 17 Oct 2016 18:14:40 +0000 (14:14 -0400)
committerKathy Lussier <klussier@masslnc.org>
Tue, 22 Nov 2016 19:10:04 +0000 (14:10 -0500)
Otherwise, within "General Search", we'll get this error:

TypeError: openils.XUL.localStorage is not a function from vlagent.js:6

FIXME: brittle workaround?

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/web/js/ui/default/acq/common/vlagent.js

index 827e183..5ed906f 100644 (file)
@@ -3,7 +3,7 @@ dojo.require('openils.PermaCrud');
 dojo.require('openils.XUL');
 dojo.require('dojox.form.CheckedMultiSelect');
 
-var xulStorage = openils.XUL.localStorage();
+var xulStorage;
 var storekey = 'eg.acq.upload.';
 var osetkey = 'acq.upload.default.';
 var persistOrgSettings;
@@ -53,6 +53,8 @@ function VLAgent(args) {
     this.init = function(oncomplete) {
         var self = this;
 
+       xulStorage = openils.XUL.localStorage();
+
         // load org unit persist setting values
         fieldmapper.standardRequest(
             ['open-ils.actor','open-ils.actor.ou_setting.ancestor_default.batch'],