[open-ils-commits] r18009 - trunk/Open-ILS/web/js/dojo/openils/widget (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Sep 26 11:53:24 EDT 2010
Author: miker
Date: 2010-09-26 11:53:21 -0400 (Sun, 26 Sep 2010)
New Revision: 18009
Modified:
trunk/Open-ILS/web/js/dojo/openils/widget/FacetSidebar.js
Log:
Only show facetOrder limited facets that have values
Modified: trunk/Open-ILS/web/js/dojo/openils/widget/FacetSidebar.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/FacetSidebar.js 2010-09-26 15:33:05 UTC (rev 18008)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/FacetSidebar.js 2010-09-26 15:53:21 UTC (rev 18009)
@@ -123,13 +123,14 @@
var possible_facets = [];
if (x.facetOrder) {
dojo.forEach(x.facetOrder, function(fname) {
- possible_facets.push(dojo.filter(
+ var maybe_facet = dojo.filter(
openils.widget.Searcher._cache.arr.cmf,
function (y) {
- if (y.field_class == x.name && y.name == fname) return 1;
+ if (y.field_class == x.name && y.name == fname && facetData[y.id]) return 1;
return 0;
}
- )[0]);
+ )[0];
+ if (maybe_facet) possible_facets.push(maybe_facet);
});
} else {
possible_facets = dojo.filter(
More information about the open-ils-commits
mailing list