diff --git a/README.markdown b/README.markdown index c5a34c45..a4b90979 100644 --- a/README.markdown +++ b/README.markdown @@ -34,6 +34,10 @@ Included all original [document pages](http://mottie.github.com/tablesorter/docs View the [complete listing here](http://mottie.github.com/tablesorter/changelog.txt). +#### Version 2.0.30.1 (2012-2-20) + +* Modified the "filter" widget to disable the input window instead of setting it with display none. Now the input is disabled and a "disabled" class is applied to allow for further styling. + #### Version 2.0.30 (2012-2-20) * Fixed the total mess I just made with the addWidget init functionality... I need a vacation :P diff --git a/changelog.txt b/changelog.txt index df896380..c1dd4214 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,10 @@ TableSorter Change Log +Version 2.0.30.1 (2012-2-20) +============================ + +* Modified the "filter" widget to disable the input window instead of setting it with display none. Now the input is disabled and a "disabled" class is applied to allow for further styling. + Version 2.0.30 (2012-2-20) ============================ diff --git a/docs/example-widget-filter.html b/docs/example-widget-filter.html index 1ecb76b2..3a8b8c47 100644 --- a/docs/example-widget-filter.html +++ b/docs/example-widget-filter.html @@ -157,7 +157,9 @@ table.tablesorter thead input.filter { table.tablesorter thead tr.filters, table.tablesorter thead tr.filters td { text-align: center; background: #fff; -} +} +/* optional disabled input styling */ +table.tablesorter thead tr.filters input.disabled {}

HTML

diff --git a/js/jquery.tablesorter.widgets.js b/js/jquery.tablesorter.widgets.js index d6b2196c..c7602165 100644 --- a/js/jquery.tablesorter.widgets.js +++ b/js/jquery.tablesorter.widgets.js @@ -108,10 +108,10 @@ $.tablesorter.addWidget({ time = new Date(); } for (i=0; i < cols; i++){ - fr += '').wrapInner('
').hover(function(){b(this).addClass("ui-state-hover")}, function(){b(this).removeClass("ui-state-hover")})}));b.each(c.headerList,function(e){f=b(this);this.sortDisabled?f.find("span.ui-icon").removeClass(d+" ui-icon"):(a=f.hasClass(c.cssAsc)?j[1]:f.hasClass(c.cssDesc)?j[2]:f.hasClass(c.cssHeader)?j[0]:"",h=i.hasClass("hasStickyHeaders")?i.find("tr.stickyHeader").find("th").eq(e).add(f):f,h[a===j[0]?"removeClass":"addClass"]("ui-state-active").find("span.ui-icon").removeClass(d).addClass(a))});c.debug&&b.tablesorter.benchmark("Applying uitheme widget", g)}}); b.tablesorter.addWidget({id:"columns",format:function(e){var g,a,d,f,h=e.config,c=h.sortList,i=c.length,j=["primary","secondary","tertiary"];h.widgetColumns&&h.widgetColumns.hasOwnProperty("css")&&(j=h.widgetColumns.css||j);d=j.length-1;f=j.join(" ");h.debug&&(a=new Date);c&&c[0]&&b("tr:visible",e.tBodies[0]).each(function(a){g=b(this).children().removeClass(f);g.eq(c[0][0]).addClass(j[0]);if(1',l;i.debug&&(l=new Date);for(g=0;g';k.find("thead").append(e+="").find(".filter").bind("keyup",function(){a=k.find(".filter").map(function(){return(b(this).val()|| "").toLowerCase()}).get();""===a.join("")?k.find("tr").show():k.find("tbody").find("tr:not(.expand-child)").each(function(){d=!0;h=b(this).nextUntil("tr:not(.expand-child)");f=h.length&&("undefined"!==typeof i.widgetFilterChildRows?i.widgetFilterChildRows:1)?h.text():"";c=b(this).find("td");for(g=0;g',l;i.debug&&(l=new Date);for(g=0;gc.top&&b
').wrapInner('
').find(".resizer").bind("mousedown",function(c){a.resizable_target=b(c.target).closest("th");a.resizable_position=c.pageX}).end().bind("mousemove",function(c){if(!(0===a.resizable_position||null===typeof a.resizable_target)){var b=c.pageX-a.resizable_position, d=a.resizable_target.closest("th").prev();a.resizable_target.width()<-b||d&&d.width()<=b||(d.width(d.width()+b),a.resizable_position=c.pageX)}}).bind("mouseup",function(){h();return!1});b(e).find("thead").bind("mouseup mouseleave",function(){h()});a.resizable=!0}}}); b.tablesorter.addWidget({id:"saveSort",init:function(b,g,a){a.format(b,!0)},format:function(e,g){var a,d,f,h,c=e.config;f='{"sortList":'+JSON.stringify(c.sortList)+"}";c.debug&&(h=new Date);if(c.widgetsavesort)e.hasInitialized&&(a="tablesorter"+ (c.tableIndex||0)+e.id,c.hasLocalStorage?localStorage[a]=f:(d=new Date,d.setTime(d.getTime()+31536E6),document.cookie=a+"="+f+"; expires="+d.toGMTString()+"; path=/"),c.debug&&b.tablesorter.benchmark('saveSort: Saving sort to "'+a+'" in '+(c.hasLocalStorage?"local storage":"a cookie"),h));else{c.widgetsavesort=!0;c.hasLocalStorage=!1;try{localStorage.getItem&&(c.hasLocalStorage=!0)}catch(i){}c.tableIndex=b(".tablesorter").index(b(e));a="tablesorter"+(c.tableIndex||0)+e.id;c.hasLocalStorage?d=localStorage[a]: (f=document.cookie.split(/[;\s|=]/),d=b.inArray(a,f)+1,d=0!==d?f[d]:"");try{d=b.parseJSON(d)}catch(j){d=""}f=d&&d.hasOwnProperty("sortList")&&b.isArray(d.sortList)?d.sortList:"";c.debug&&b.tablesorter.benchmark('saveSort: Last sort for "'+a+'" obtained from '+(c.hasLocalStorage?"local storage":"a cookie"),h);g&&f&&0