bfd2408ad59c975f572065386d94e9f4d89fd113 kate Thu Apr 23 11:36:24 2015 -0700 Fix behavior of +/- buttons when used without a matrix. Detected during Q/A of hg38 track. refs #14732 diff --git src/hg/js/hui.js src/hg/js/hui.js index 9aa4d8f..be874e9 100644 --- src/hg/js/hui.js +++ src/hg/js/hui.js @@ -758,54 +758,39 @@ function multiSelectBlur(obj) { // Closes a multiselect and colapse it to a single option when appropriate var val = $(obj).val(); if (!val || val === "") { $(obj).val("All"); $(obj).attr('selectedIndex',0); } if ($(obj).attr('selectedIndex') === 0) // Close if selected index is 1 $(obj).attr('size',1); else multiSelectCollapseToSelectedOnly(obj); } function filterCompositeSet(obj,all) -{ // Will set all filter composites via [+] or [-] buttons - - matSubCBsCheck(all); - var vars = []; - var vals = []; +{ // Sets/Clears all subtrack checkboxes via [+] or [-] buttons + // Resets any filter composites so they work as expected after button press var filterComp = $("select.filterComp"); - 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]"); + $(this).dropdownchecklist("refresh"); + ddcl.onComplete($(this)); }); - } - if (vars.length > 0) { - setCartVars(vars,vals);// FIXME: setCartVar conflicts with "submit" button paradigm - } + matSubCBsCheck(all); matSubCBsSelected(); // Be sure to update the counts! } function matCbFilterClasses(matCb,joinThem) { // returns the var associated with a filterComp var classes = $( matCb ).attr("class").split(" "); classes = aryRemove(classes,["matCB","changed","disabled","abc"]); if (joinThem) return '.' + classes.join('.'); return classes; } function filterCompFilterVar(filter) { // returns the var associated with a filterComp