more silly perfectionism; disregard (storeArgs -> store_args)
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Thu, 26 Jan 2012 19:00:54 +0000 (14:00 -0500)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Thu, 26 Jan 2012 19:00:54 +0000 (14:00 -0500)
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/web/js/dojo/openils/widget/AutoSuggest.js
Open-ILS/web/opac/skin/default/js/search_bar.js

index 3788053..48e6603 100644 (file)
@@ -20,6 +20,8 @@ if (!dojo._hasResource["openils.widget.AutoSuggest"]) {
             "submitter": function() { console.log("No submitter connected"); },
             "type_selector": null,  /* see openils.AutoSuggestStore for docs */
 
+            "store_args": {},
+
             "_update_search_type_selector": function(id) {  /* cmf id */
                 /* Fail somewhat gracefully if a race condition, which I'm not
                  * /certain/ actually exists, lets us get here before
@@ -70,15 +72,13 @@ if (!dojo._hasResource["openils.widget.AutoSuggest"]) {
             "postMixInProperties": function() {
                 this.inherited(arguments);
 
-                if (this.storeArgs) {
-                    /* Save the instantiator from needing to specify same thing
-                     * twice, even though we need it and the store needs it too.
-                     */
-                    if (this.type_selector && !this.storeArgs.type_selector)
-                        this.storeArgs.type_selector = this.type_selector;
+                /* Save the instantiator from needing to specify same thing
+                 * twice, even though we need it and the store needs it too.
+                 */
+                if (this.type_selector && !this.store_args.type_selector)
+                    this.store_args.type_selector = this.type_selector;
 
-                    this.store = new openils.AutoSuggestStore(this.storeArgs);
-                }
+                this.store = new openils.AutoSuggestStore(this.store_args);
             },
 
             "postCreate": function() {
index 026c183..5015818 100644 (file)
@@ -30,10 +30,10 @@ function autoSuggestInit() {
     dojo.require("openils.widget.AutoSuggest");
 
     /* See comments in openils.AutoSuggestStore, esp. near the constructor,
-     * to find out what you can control with the storeArgs object. */
+     * to find out what you can control with the store_args object. */
     var widg = new openils.widget.AutoSuggest(
         {
-            "storeArgs": {
+            "store_args": {
                 "org_unit_getter": org_unit_getter
             },
             "type_selector": G.ui.searchbar.type_selector,