70ef68d210fa4b76c16f7b8e8142a8180f75052a tdreszer Fri Jun 17 20:14:06 2011 -0700 Big checkin of jquery 1.5.1, jquery-ui 1.8 and ui-dropdownchecklist 1.3. Needs more testing and CSS work. DDCL is working on FF, Chrome and IE. Both Chrome and IE support required tiny changes to the DDCL wigit code. DDCL may still have problems with IE. Other jquery wigits have been tested at a cursory level and work fine. Ajax calls may need an extrat dataType: html param. Dialog (popup) needs CSS tuning. diff --git src/hg/js/hui.js src/hg/js/hui.js index 9a0859b..2c00773 100644 --- src/hg/js/hui.js +++ src/hg/js/hui.js @@ -232,31 +232,31 @@ if(classes.length > 0 && classes[0] != "All") subCBsToSelect = objsFilterByClasses(subCBsToSelect,"or",classes); // Keep any that should be selected // Now deal with all the others if (subCBsToSelect.length > 0) { var filterComp = $("select.filterComp").not("[name='"+obj.name+"']"); // Exclude self from list for(var ix=0;ix 0;ix++) { var filterClasses = $(filterComp[ix]).val(); if(filterClasses.length > 0 && filterClasses[0] != "All") subCBsToSelect = objsFilterByClasses(subCBsToSelect,"or",filterClasses); // Keep any that should be selected else if(filterClasses.length == 0) subCBsToSelect.length = 0; } } // Filter for Matrix CBs too if (subCBsToSelect.length > 0) { - var matCb = $("input.matCb").filter(":checked"); + var matCb = $("input.matCB").filter(":checked"); if (matCb.length > 0) { var matchClasses = ""; $( matCb ).each( function(i) { var filterClasses = $( this ).attr("class").split(" "); filterClasses = aryRemove(filterClasses,"matCB","halfVis","abc"); matchClasses = matchClasses + ",." + filterClasses.join('.'); }); if (matchClasses.length > 0) { matchClasses = matchClasses.substring(1); // Skip past leading comma: ",.HepG2.ZBTB33,.GM12878.CTCF" subCBsToSelect = $(subCBsToSelect).filter(matchClasses); // Keep any that should be selected } } } // Now we have subCBs that should be checked. Exclude already checked, then do it @@ -909,31 +909,31 @@ var subCBs = $("input.subCB"); var filterComp = $("select.filterComp").not("#"+$(obj).attr('id')); // Exclude self from list $( filterComp ).each( function (i) { if( $( subCBs ).length > 0 ) { var selectedTags = $( this ).val(); if( !selectedTags || selectedTags.length == 0) oneEmpty = true; else if( selectedTags && selectedTags.length > 0 && selectedTags[0] != "All" ) { subCBs = objsFilterByClasses(subCBs,"or",selectedTags); // must belong to one or more allSelectedTags = allSelectedTags.concat(selectedTags); } } }); // Matrix CBs need to be considered too if (subCBs.length > 0) { - var matCb = $("input.matCb").filter(":checked"); + var matCb = $("input.matCB").filter(":checked"); if (matCb.length == 0) oneEmpty = true; else {//if (matCb.length > 0) { var matchClasses = ""; $( matCb ).each( function(i) { var filterClasses = $( this ).attr("class").split(" "); filterClasses = aryRemove(filterClasses,"matCB","halfVis","abc"); matchClasses = matchClasses + ",." + filterClasses.join('.'); }); if (matchClasses.length > 0) { matchClasses = matchClasses.substring(1); // Skip past leading comma: ",.HepG2.ZBTB33,.GM12878.CTCF" subCBs = $(subCBs).filter(matchClasses); } } } @@ -1065,21 +1065,27 @@ $(document).ready(function() { // Initialize sortable tables $('table.sortable').each(function (ix) { sortTableInitialize(this,true,true); }); // Register tables with drag and drop $("table.tableWithDragAndDrop").each(function (ix) { tableDragAndDropRegister(this); }); $('.halfVis').css('opacity', '0.5'); // The 1/2 opacity just doesn't get set from cgi! $('.filterComp').each( function(i) { // Do this by 'each' to set noneIsAll individually + if (newJQuery) { + if ($(this).hasClass('filterBy')) + ddclSetup(this, 'noneIsAll'); + else + ddclSetup(this); + } else $(this).dropdownchecklist({ firstItemChecksAll: true, noneIsAll: $(this).hasClass('filterBy'), maxDropHeight: filterByMaxHeight(this) }); }); // Put navigation links in top corner navigationLinksSetup(); });