don't try to load user settings if we are not logged in yet
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 9 Jun 2009 16:22:00 +0000 (16:22 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 9 Jun 2009 16:22:00 +0000 (16:22 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@13347 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/dojo/openils/widget/AutoGrid.js

index 40fc62d..6fb19ed 100644 (file)
@@ -39,8 +39,13 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) {
                     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() });
+                        }
                     }
                 }