Permalink
Browse files

filter widget; inputs not hidden, but disabled

  • Loading branch information...
1 parent 7996096 commit a357090cbf1598a598614717e6dede2cd1dc66fc @Mottie committed Feb 21, 2012
View
@@ -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
View
@@ -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)
============================
@@ -157,7 +157,9 @@
table.tablesorter thead tr.filters, table.tablesorter thead tr.filters td {
text-align: center;
background: #fff;
-}</pre>
+}
+/* optional disabled input styling */
+table.tablesorter thead tr.filters input.disabled {}</pre>
</div>
<h1>HTML</h1>
@@ -108,10 +108,10 @@ $.tablesorter.addWidget({
time = new Date();
}
for (i=0; i < cols; i++){
- fr += '<td><input type="text" class="filter" data-col="' + i + '" style="';
+ fr += '<td><input type="text" data-col="' + i + '" class="filter';
// use header option - headers: { 1: { filter: false } } OR add class="filter-false"
- fr += ((c.headers[i] && 'filter' in c.headers[i] && c.headers[i].filter === false) || $(c.headerList[i]).is('.filter-false') ) ? 'display:none' : '';
- fr += '"></td>';
+ fr += ((c.headers[i] && 'filter' in c.headers[i] && c.headers[i].filter === false) || $(c.headerList[i]).is('.filter-false') ) ? ' disabled" disabled' : '"';
+ fr += '></td>';
}
tbl
.find('thead').append(fr += '</tr>')
@@ -120,7 +120,6 @@ $.tablesorter.addWidget({
if (v.join('') === '') {
tbl.find('tr').show();
} else {
-
tbl.find('tbody').find('tr:not(.expand-child)').each(function(){
r = true;
cr = $(this).nextUntil('tr:not(.expand-child)');

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -1,6 +1,6 @@
{
"name": "tablesorter",
- "version": "2.0.30",
+ "version": "2.0.30.1",
"title": "tablesorter",
"author": {
"name": "Christian Bach",

0 comments on commit a357090

Please sign in to comment.