[open-ils-commits] r17601 - trunk/Open-ILS/web/js/dojo/openils/widget (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Sep 10 22:12:43 EDT 2010
Author: miker
Date: 2010-09-10 22:12:41 -0400 (Fri, 10 Sep 2010)
New Revision: 17601
Modified:
trunk/Open-ILS/web/js/dojo/openils/widget/FacetSidebar.js
Log:
In IE, tell Evergreen to return just the initially visible facets, and do it async-y (thanks berick)
Modified: trunk/Open-ILS/web/js/dojo/openils/widget/FacetSidebar.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/FacetSidebar.js 2010-09-10 22:30:23 UTC (rev 17600)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/FacetSidebar.js 2010-09-11 02:12:41 UTC (rev 17601)
@@ -47,12 +47,28 @@
if (openils.widget.Searcher._cache.facetData) {
this.facetData = openils.widget.Searcher._cache.facetData;
+ this._render_callback();
} else {
- var facetData = fieldmapper.standardRequest( [ 'open-ils.search', 'open-ils.search.facet_cache.retrieve'], this.facetCacheKey );
- if (!facetData) return;
- this.facetData = openils.widget.Searcher._cache.facetData = facetData;
+ var limit = dojo.isIE ? this.facetLimit : null;
+ var self = this;
+ fieldmapper.standardRequest(
+ [ 'open-ils.search', 'open-ils.search.facet_cache.retrieve'],
+ { async : true,
+ params : [this.facetCacheKey, limit],
+ oncomplete : function(r) {
+ var facetData = r.recv().content();
+ if (!facetData) return;
+ self.facetData = openils.widget.Searcher._cache.facetData = facetData;
+ self._render_callback();
+ }
+ }
+ );
}
+ },
+
+ _render_callback : function(facetData) {
+ var facetData = this.facetData;
var classes = openils.widget.Searcher._cache.arr.cmc;
if (this.classOrder && this.classOrder.length > 0) {
classes = [];
More information about the open-ils-commits
mailing list