From 6373f821d6a871030ff3d79c52c6d361e92f0813 Mon Sep 17 00:00:00 2001 From: Mottie Date: Wed, 27 Nov 2013 14:53:58 -0600 Subject: [PATCH] Update filter widget docs to show filter precedence. See #441 --- docs/css/jq.css | 2 +- docs/example-widget-filter.html | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/css/jq.css b/docs/css/jq.css index 7827971a..533090da 100644 --- a/docs/css/jq.css +++ b/docs/css/jq.css @@ -49,7 +49,7 @@ form {font-size:10pt;margin-bottom:20px;width:auto;} form fieldset {padding:10px;text-align:left;width:140px;} div#main h1 {border-bottom:1px solid #cdcdcd;display:block;padding:4px 0 2px;} table#tablesorter-demo {margin: 10px 0 0 0;} -table, p.small {font-size:small;} +table, p.small,.smallcode code {font-size:small;} p.small {padding-left: 25px;} p.tip em, div.tip em,.label-info {padding: 2px; background-color: #5bc0de; color: #fff; border-radius: .25em;} .label { padding: 0.1em 0.6em 0.1em; font-size: 75%; color: #fff; border-radius: .25em; } diff --git a/docs/example-widget-filter.html b/docs/example-widget-filter.html index 6b4b4818..95576eda 100644 --- a/docs/example-widget-filter.html +++ b/docs/example-widget-filter.html @@ -204,10 +204,10 @@ $(function(){
  • This widget does work with tablesorter v2.0.5.
  • Using the filters: - + - + @@ -216,12 +216,13 @@ $(function(){ - +
    Type (1)DescriptionExamples
    Type (1)(2)DescriptionExamples
    textAny text entered in the filter will match text found within the columnabc (finds "abc", "abcd", "abcde", etc); (finds "Aaron" and "Philip Aaron Wong")
    ~Fuzzy search (matches sequential characters) the query by adding a tilde to the beginning of the query (v2.13.3) (matches "Bruce Lee" and "Brenda Dexter") or (matches "Philip Aaron Wong")
    ~Perform a fuzzy search (matches sequential characters) by adding a tilde to the beginning of the query (v2.13.3) (matches "Bruce Lee" and "Brenda Dexter") or (matches "Philip Aaron Wong")
    "To exactly match the search query, add a quote, apostrophe or equal sign to the beginning and/or end of the queryabc" or abc= (exactly match "abc"); or (exactly match "John")
    ?Wildcard for a single, non-space character.J?n (finds "Jan" and "Jun", but not "Joan"); (finds "Dumass" and "Evans", but not "McMasters")
    *Wildcard for zero or more non-space characters.B*k (matches "Black" and "Book"); (matches "Dumass", "Evans" and "McMasters")
    !Not operator. Filter the column with content that do not match the query.!fe (hide rows with "female" in that column, but shows rows with "male"); (find text that doesn't contain an "a")
     &&  or  AND Logical "and". Filter the column for content that matches text from either side of the operator.box && bat (matches a column cell that contains both "box" and "bat"); (Find text that contains both "br" and "c")
    | or  OR Logical "or" (Vertical bar). Filter the column for content that matches text from either side of the bar (3).box|bat (matches a column cell with either "box" or "bat"); (Find text that contains either "Alex" or "Peter")
     -  or  to Find a range of values. Make sure there is a space before and after the dash (or the word "to") (2). or (match values between 10 and 30)
     -  or  to Find a range of values. Make sure there is a space before and after the dash (or the word "to") (4). or (match values between 10 and 30)
    (1) You cannot combine these operators with each other (except for the wildcards).
    - (2) In tablesorter v2.10, comparisons can be made in date columns (if properly parsed).
    - (3) Logical "or" comparisons can now show exact matches (by default; v2.10.1) or just match cell contents. + (2) The filter order (or precendence) of how searches are checked is as follows: regex (/\d/) > exact (") > not match (!) > operators (< <= >= >) > and ( AND ) > range ( - ) > wild/or (?, * and  OR ) > fuzzy (~); so an exact match will override "and", "or" and "range" searches
    + (3) Logical "or" comparisons can now show exact matches (by default; v2.10.1) or just match cell contents.
    + (4) In tablesorter v2.10, comparisons can be made in date columns (if properly parsed).