From: Lebbeous Fogle-Weekley Date: Thu, 26 Jan 2012 19:00:54 +0000 (-0500) Subject: more silly perfectionism; disregard (storeArgs -> store_args) X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a2fec6c892a985e84fc64b8f1fab897206ea0e6f;p=evergreen%2Fequinox.git more silly perfectionism; disregard (storeArgs -> store_args) Signed-off-by: Lebbeous Fogle-Weekley --- diff --git a/Open-ILS/web/js/dojo/openils/widget/AutoSuggest.js b/Open-ILS/web/js/dojo/openils/widget/AutoSuggest.js index 3788053faa..48e6603640 100644 --- a/Open-ILS/web/js/dojo/openils/widget/AutoSuggest.js +++ b/Open-ILS/web/js/dojo/openils/widget/AutoSuggest.js @@ -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() { diff --git a/Open-ILS/web/opac/skin/default/js/search_bar.js b/Open-ILS/web/opac/skin/default/js/search_bar.js index 026c183a8f..5015818058 100644 --- a/Open-ILS/web/opac/skin/default/js/search_bar.js +++ b/Open-ILS/web/opac/skin/default/js/search_bar.js @@ -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,