[open-ils-commits] r13347 - trunk/Open-ILS/web/js/dojo/openils/widget (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Jun 9 12:22:02 EDT 2009


Author: erickson
Date: 2009-06-09 12:22:00 -0400 (Tue, 09 Jun 2009)
New Revision: 13347

Modified:
   trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
Log:
don't try to load user settings if we are not logged in yet

Modified: trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js	2009-06-09 16:21:45 UTC (rev 13346)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js	2009-06-09 16:22:00 UTC (rev 13347)
@@ -39,8 +39,13 @@
                     if(!this.columnPickerPrefix) {
                         console.error("No columnPickerPrefix defined");
                     } else {
-                        new openils.widget.GridColumnPicker(
-                            openils.User.authtoken, this.columnPickerPrefix, this).load();
+                        var picker = new openils.widget.GridColumnPicker(
+                            openils.User.authtoken, this.columnPickerPrefix, this);
+                        if(openils.User.authtoken) {
+                            picker.load();
+                        } else {
+                            openils.Util.addOnLoad(function() { picker.load() });
+                        }
                     }
                 }
 



More information about the open-ils-commits mailing list