[open-ils-commits] [GIT] Evergreen ILS branch master updated. df055439b452778df68191b052035e3bb4c9a37a
Evergreen Git
git at git.evergreen-ils.org
Tue Mar 20 16:25:31 EDT 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, master has been updated
via df055439b452778df68191b052035e3bb4c9a37a (commit)
via 51bd2fbb982380432979e5d1cbb0c23a0f5ff7a4 (commit)
from 8b52ac29ef014159b66c38f992ad051b0ef0ab22 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit df055439b452778df68191b052035e3bb4c9a37a
Author: Mike Rylander <mrylander at gmail.com>
Date: Tue Mar 20 16:16:44 2012 -0400
AutoSuggest: Have the server cache for us if we're not using cookies
Signed-off-by: Mike Rylander <mrylander at gmail.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
diff --git a/Open-ILS/web/js/dojo/openils/AutoSuggestStore.js b/Open-ILS/web/js/dojo/openils/AutoSuggestStore.js
index 5e134a1..b36b6a4 100644
--- a/Open-ILS/web/js/dojo/openils/AutoSuggestStore.js
+++ b/Open-ILS/web/js/dojo/openils/AutoSuggestStore.js
@@ -75,6 +75,7 @@ if (!dojo._hasResource["openils.AutoSuggestStore"]) {
"method": "open-ils.fielder." + key + ".atomic",
"params": [{"query": query, "fields": field_list}],
"async": true,
+ "cache": true,
"oncomplete": function(r) {
var result_arr = openils.Util.readResponse(r);
commit 51bd2fbb982380432979e5d1cbb0c23a0f5ff7a4
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date: Mon Mar 19 11:08:08 2012 -0400
AutoSuggest: Don't try to store cmc and cmf caches in a cookie. Too big.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Signed-off-by: Mike Rylander <mrylander at gmail.com>
diff --git a/Open-ILS/web/js/dojo/openils/AutoSuggestStore.js b/Open-ILS/web/js/dojo/openils/AutoSuggestStore.js
index e985183..5e134a1 100644
--- a/Open-ILS/web/js/dojo/openils/AutoSuggestStore.js
+++ b/Open-ILS/web/js/dojo/openils/AutoSuggestStore.js
@@ -51,13 +51,8 @@ if (!dojo._hasResource["openils.AutoSuggestStore"]) {
if (this.cm_cache[key]) return;
- var cookie = dojo.cookie("OILS_AS" + key);
- if (cookie) {
- this.cm_cache[key] = dojo.fromJson(cookie);
- return oncomplete();
- }
-
- /* now try to get it from open-ils.searcher */
+ /* Try to get cache of cmc's or cmf's from
+ * openils.widget.Searcher */
try {
/* openils.widget.Searcher may not even be loaded;
* that's ok; just try. */
@@ -81,17 +76,13 @@ if (!dojo._hasResource["openils.AutoSuggestStore"]) {
"params": [{"query": query, "fields": field_list}],
"async": true,
"oncomplete": function(r) {
- /* XXX check for failure? */
- var result_arr = r.recv().content();
+ var result_arr = openils.Util.readResponse(r);
self.cm_cache[key] = {};
dojo.forEach(
result_arr,
function(o) { self.cm_cache[key][o[pkey]] = o; }
);
- dojo.cookie(
- "OILS_AS" + key, dojo.toJson(self.cm_cache[key])
- );
oncomplete();
}
}).send();
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/web/js/dojo/openils/AutoSuggestStore.js | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list