From b497cfb1a4b46e172af68247354905b243f60c5e Mon Sep 17 00:00:00 2001 From: Mottie Date: Thu, 28 Aug 2014 11:26:31 -0500 Subject: [PATCH] Filter: add defaultFilter option. Fixes #704 --- docs/css/jq.css | 3 +- docs/example-widget-filter-any-match.html | 7 +- docs/example-widget-filter-custom-search.html | 61 ++-- docs/index.html | 53 +++- js/jquery.tablesorter.widgets.js | 287 +++++++++++------- 5 files changed, 272 insertions(+), 139 deletions(-) diff --git a/docs/css/jq.css b/docs/css/jq.css index 1b0b9473..0d1ba8a9 100644 --- a/docs/css/jq.css +++ b/docs/css/jq.css @@ -64,7 +64,8 @@ p.tip em, div.tip em,.label-info {padding: 2px; background-color: #5bc0de; color span.tip em, .label-success { background-color: #5cb85c; } .updated .label-success { background-color: #8eCe8e; } span.tip.old em, .label-default { background-color: #999; } -span.warn em, .label.alert { background-color: #d9534f; } +span.warning { background-color: #f0ad4e; } /* orange */ +span.warn em, .label.alert { background-color: #d9534f; } /* red */ .label.warning { background-color: #f0ad4e; } tr td.lookhere, span.lookhere { background-color: rgba(230,191,153,0.5); } div.ui-slider .ui-slider-handle { width: 0.8em; height: 0.8em; } diff --git a/docs/example-widget-filter-any-match.html b/docs/example-widget-filter-any-match.html index 73e661fb..791a061d 100644 --- a/docs/example-widget-filter-any-match.html +++ b/docs/example-widget-filter-any-match.html @@ -30,6 +30,8 @@ // Set to use a jQuery selector (or jQuery object) pointing to the // external filter (column specific or any match) filter_external : '.search', + // add a default type search to the first name column + filter_defaultFilter: { 1 : '~{query}' }, // include column filters filter_columnFilters: true, filter_placeholder: { search : 'Search...' }, @@ -57,6 +59,7 @@

Notes