src/hg/js/hui.js 1.58
1.58 2010/06/02 19:16:37 tdreszer
Added support for checkAll/uncheckAll on filterComposites.
Index: src/hg/js/hui.js
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/js/hui.js,v
retrieving revision 1.57
retrieving revision 1.58
diff -b -B -U 4 -r1.57 -r1.58
--- src/hg/js/hui.js 27 May 2010 16:41:47 -0000 1.57
+++ src/hg/js/hui.js 2 Jun 2010 19:16:37 -0000 1.58
@@ -1069,8 +1069,35 @@
}
}*/
}
+function filterCompositeSet(obj,all)
+{ // Will set all filter composites via [+] or [-] buttons
+
+ matSubCBsCheck(all);
+ var vars = [];
+ var vals = [];
+ var filterComp = $("select.filterComp").not(".filterBy");
+ if(all) {
+ $(filterComp).each(function(i) {
+ $(this).trigger("checkAll");
+ $(this).val("All");
+ //vars.push($(this).attr('name')); // Don't bother ajaxing this over
+ //vals.push($(this).val());
+ });
+ } else {
+ $(filterComp).each(function(i) {
+ $(this).trigger("uncheckAll");
+ $(this).val("");
+ vars.push($(this).attr('name'));
+ vals.push("[empty]");
+ });
+ }
+ if(vars.length > 0) {
+ setCartVars(vars,vals);
+ }
+}
+
function filterCompositeExcludeOptions(obj)
{ // Will mark all options in one filterComposite boxes that are inconsistent with the current
// selections in other filterComposite boxes. Mark is class ".excluded"