a76306ad6d84f527d6ae938ce4de2299117e1257 tdreszer Tue Nov 1 13:58:35 2011 -0700 Fixed one timy bug using 'use strict' diff --git src/hg/js/utils.js src/hg/js/utils.js index 2cfe963..fff80b8 100644 --- src/hg/js/utils.js +++ src/hg/js/utils.js @@ -1,17 +1,18 @@ // Utility JavaScript -// $Header: /projects/compbio/cvsroot/kent/src/hg/js/utils.js,v 1.31 2010/06/02 19:11:53 tdreszer Exp $ + +// "use strict"; var debug = false; function clickIt(obj,state,force) { // calls click() for an object, and click();click() if force if(obj.checked != state) { obj.click(); } else if (force) { obj.click(); obj.click(); //force onclick event } } function setCheckBoxesWithPrefix(obj, prefix, state) { @@ -2082,46 +2083,46 @@ { // Normalize the page based upon current state of all found tracks $('div#found').show() var selCbs = $('input.selCb'); // All should have their vis enabled/disabled appropriately (false means don't update cart) $(selCbs).each( function(i) { findTracks.clickedOne(this,false); }); findTracks.counts(); }, normalizeWaitOn: function () // UNUSED ? { // Put up wait mask then Normalize the page based upon current state of all found tracks waitOnFunction( findTracks.normalize ); }, - checkAll: function (check) + _checkAll: function (check) { // Checks/unchecks all found tracks. var selCbs = $('input.selCb'); $(selCbs).attr('checked',check); // All should have their vis enabled/disabled appropriately (false means don't update cart) $(selCbs).each( function(i) { findTracks.clickedOne(this,false); }); $('input.viewBtn').val('View in Browser'); findTracks.counts(); return false; // Pressing button does nothing more }, checkAll: function (check) { - waitOnFunction( findTracks.checkAll, check); + waitOnFunction( findTracks._checkAll, check); }, searchButtonsEnable: function (enable) { // Displays visible and checked track count var searchButton = $('input[name="hgt_tSearch"]'); // NOTE: must match TRACK_SEARCH in hg/inc/searchTracks.h var clearButton = $('input.clear'); if(enable) { $(searchButton).attr('disabled',false); $(clearButton).attr('disabled',false); } else { $(searchButton).attr('disabled',true); $(clearButton).attr('disabled',true); } },