From ed762f4aa390991b59822e36232c3e930b0be6dd Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Tue, 26 Apr 2016 07:49:53 -0500 Subject: [PATCH] Docs: Add `sortMultiSortKey` alternative settings. See #1200 --- docs/index.html | 54 +++++++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/docs/index.html b/docs/index.html index 8c72b3135..5b93c6799 100644 --- a/docs/index.html +++ b/docs/index.html @@ -457,7 +457,7 @@

Plugins / Widgets
  • Columns highlight widget (v2.0.17).
  • Column selector widget (v2.15; v2.25.1).
  • Content editable widget (v2.9; v2.25.5).
  • -
  • Beta Dragtable mod - (jQuery UI widget for column reordering [ref]; v2.24.0).
  • +
  • Beta Dragtable mod - (jQuery UI widget for column reordering [ref]; v2.24.0).
  • Filter widget (v2.25.7):
    • basic (v2.0.18; v2.25.5).
    • @@ -521,7 +521,7 @@

      Plugins / Widgets

      Custom Parsers

      • Countdown parser (v2.19.0).
      • -
      • Date parsers (v2.8; v2.24.6; includes weekday, month, two-digit year & sugar.js date parsers; a datejs parser is also available).
      • +
      • Date parsers (v2.8; v2.24.6; includes weekday, month, two-digit year & sugar.js date parsers; a datejs parser is also available).
      • Date range parsers (v2.21.0; v2.25.0); if filters, include the insideRange filter search type.
      • Duration parser (v2.17.8).
      • Feet-inch-fraction parser (v2.8).
      • @@ -541,7 +541,7 @@

        Work-in-progress

        @@ -1125,7 +1125,7 @@

        Configuration

        This function is called after content is to the TH tags (after the template is procressed and added). You can use this to modify the HTML in each header tag for additional styling (v2.18.0).

        - In versions 2.0.6+, all TH text is wrapped in a div with a class name of "tablesorter-inner" by default. In the example below, the header cell (TH) div is given a class name (source).
        + In versions 2.0.6+, all TH text is wrapped in a div with a class name of "tablesorter-inner" by default. In the example below, the header cell (TH) div is given a class name (source).
        Function parameters:
        • index - zero-based index of the current table header cell; this value is not indicative of the column index, as it is simply a count of header cells. So it will be effected by rowspan, colspan and multiple rows in the header.
        • @@ -1372,7 +1372,7 @@

          Configuration

        • This option no longer switches the sort to use the String.localeCompare method.
        • When this option is true, the text parsed from table cells will convert accented characters to their equivalent to allow the alphanumeric sort to properly sort.
        • If false (default), any accented characters are treated as their value in the standard unicode order.
        • -
        • The following characters are replaced for both upper and lower case (information obtained from sugar.js sorting equivalents table): +
        • The following characters are replaced for both upper and lower case (information obtained from sugar.js sorting equivalents table):
          • áàâãä replaced with a
          • ç replaced with c
          • @@ -1439,17 +1439,23 @@

            Configuration

            Setting this option to true and sorting two rows with exactly the same content, the original sort order is maintained (v2.14).

            - This isn't exactly a stable sort because the sort order maintains the original unsorted order when sorting the column in an ascending direction. When sorting the column in a descending order, the opposite of the original unsorted order is returned. If that doesn't make any sense, please refer to issue #419. + This isn't exactly a stable sort because the sort order maintains the original unsorted order when sorting the column in an ascending direction. When sorting the column in a descending order, the opposite of the original unsorted order is returned. If that doesn't make any sense, please refer to issue #419.
            - sortMultiSortKey + String "shiftKey" - The key used to select more than one column for multi-column sorting. Defaults to the Shift key. The other options are "ctrlKey" or "altKey" (reference). + + The key used to select more than one column for multi-column sorting. Defaults to the Shift key. +
            +

            The other options include "ctrlKey" or "altKey" (reference)

            + To make a multisort always active, use any of the other event objects that are always "truthy" like "type" or "bubbles". See issue #1200). +
            + Example @@ -1717,7 +1723,7 @@

            Custom theme

            "mousedown" Use this option to change the pointer down event (v2.22.0)
            -

            Change this option if you're using pointer events (or the pointer events polyfill). Add multiple events separated by spaces.

            +

            Change this option if you're using pointer events (or the pointer events polyfill). Add multiple events separated by spaces.

            Warning If this option is set to fire multiple events (e.g. 'mousedown pointerdown'), sorting may be initialized twice in rapid succession and make it appear that nothing changed.
            @@ -1729,7 +1735,7 @@

            Custom theme

            "mouseup" Use this option to change the pointer up event (v2.22.0)
            -

            Change this option if you're using pointer events (or the pointer events polyfill). Add multiple events separated by spaces.

            +

            Change this option if you're using pointer events (or the pointer events polyfill). Add multiple events separated by spaces.

            Warning If this option is set to fire multiple events (e.g. 'mouseup pointerup'), sorting may be initialized twice in rapid succession and make it appear that nothing changed.
            @@ -1744,7 +1750,7 @@

            Custom theme

            Replace the default sorting algorithm with a custom one using this option (v2.12) - *NOTE* The parameters have changed!!.

            - Include a script like naturalSort.js as follows: + Include a script like naturalSort.js as follows:
            $(function(){
               $("table").tablesorter({
                 textSorter : naturalSort
            @@ -2051,7 +2057,7 @@ 

            Custom theme

            This option is used by multiple parsers to localize the language (v2.24.0; v2.24.1).

            - This option is meant to be used with the jQuery Globalize library along with CLDR data. + This option is meant to be used with the jQuery Globalize library along with CLDR data.

            See the Globalization section in the group widget demo for details on how to set it up.

            Currently, the globalize (parser-globalize.js), month (parser-date-month.js) & weekday (parser-date-weekday.js) parsers utilize this option.

            $(function(){
            @@ -2342,7 +2348,7 @@ 

            Widget & Pager Options

            Filter widget: If there are child rows in the table (rows with class name from "cssChildRow" option) and this option is true and a match is found anywhere in the child row, then it will make that row visible. (Modified v2.1).
            -

            *NOTE* When using this option, please be aware that all child row content will be obtained from each table cell using textContent, so none of the markup will be preserved. Also, carriage returns (<br>) will not be included. To account for the loss of white space, especially after carriage returns, please add an extra space to the end of the line. Using innerText, could have been an option for preserving the white space, but it is not standardized across all browsers (ref).

            +

            *NOTE* When using this option, please be aware that all child row content will be obtained from each table cell using textContent, so none of the markup will be preserved. Also, carriage returns (<br>) will not be included. To account for the loss of white space, especially after carriage returns, please add an extra space to the end of the line. Using innerText, could have been an option for preserving the white space, but it is not standardized across all browsers (ref).

            Use the filter_childRows option to include child row text as follows:
            $(function(){
               $("table").tablesorter({
            @@ -2669,7 +2675,7 @@ 

            Widget & Pager Options

            } } }); -});
            Any of the other jQuery UI spinner widget options can also be included.
            +});
            Any of the other jQuery UI spinner widget options can also be included.

          • Filter formatter functions include: "uiSpinner", "uiSlider", "uiRange" (uiSlider ranged), "uiDatepicker" (range only), "html5Number", "html5Range" and "html5Color".
          • @@ -2958,7 +2964,7 @@

            Comparison example

            from : '', // datepicker range "from" placeholder to : '' // datepicker range "to" placeholder } -
            Note: The browser must support the placeholder attribute before it will be visible. +Note: The browser must support the placeholder attribute before it will be visible.
            Example @@ -2972,7 +2978,7 @@

            Comparison example

            Filter widget: jQuery selector string of an element used to reset the filters (v2.4; v2.16).

            - When this option points to a reset element using a jQuery selector string, it is bound using event delegation. So if any additional reset elements, with the same class name, are added to the page dynamically, they will be associated with the same table.
            + When this option points to a reset element using a jQuery selector string, it is bound using event delegation. So if any additional reset elements, with the same class name, are added to the page dynamically, they will be associated with the same table.

            For example, add this button (<button class="reset">Reset</button>) to the table header, or anywhere else on the page. That element will be used as a reset for all column and quick search filters (clears all fields):

            @@ -3125,7 +3131,7 @@

            Comparison example

          • *NOTE* because this example is providing a fixed select option source, it can not support "filter-onlyAvail" (only show available options after filtering).
          - In v2.21.5, this option will now override the filter_function options (so you need to add them back!), allowing the addition of custom select options and still maintain basic filtering action - see this demo (ref).
          + In v2.21.5, this option will now override the filter_function options (so you need to add them back!), allowing the addition of custom select options and still maintain basic filtering action - see this demo (ref).

          In v2.17.0, the filter_selectSource column can also be referenced by using a jQuery selector (e.g. class name or ID) that points to a table header cell.
          filter_selectSource : {
          @@ -3974,7 +3980,7 @@ 

          Comparison example


          Your server does not need to return a JSON format, if you want to return pure HTML, set the dataType to "html" and modify the ajaxProcessing function to instead work with HTML; then return a jQuery object or apply the HTML to the table yourself.

          - See all possible settings in the jQuery.ajax documentation + See all possible settings in the jQuery.ajax documentation
          $(function(){
             $("table")
               .tablesorter()
          @@ -4005,7 +4011,7 @@ 

          Comparison example


          In v2.23.1
            -
          • A settings parameter was added before the exception parameter to exactly match the parameters returned by the jQuery .ajaxError() method.
          • +
          • A settings parameter was added before the exception parameter to exactly match the parameters returned by the jQuery .ajaxError() method.
          • This function is now always called, even if the $.tablesorter.showError function is called by an external function with only a string.
          Note The pager widget equivalent option is within the widgetOptions and accessed via widgetOptions.pager_ajaxError
          @@ -4088,7 +4094,7 @@

          Comparison example


          This function was created and modified to allow you a great deal of flexibility. The only required information that this function needs to return is an array containing the total number of rows, which is needed to calculate total pages.

          - There are numerous examples below. Choosing which one to use is left to you. For more information, please check out related questions on Stackoverflow, in particular see this thread about how to use the different ajax options together.
          + There are numerous examples below. Choosing which one to use is left to you. For more information, please check out related questions on Stackoverflow, in particular see this thread about how to use the different ajax options together.

          In v2.10, the returned rows is now optional. And it can either be an array of arrays or a jQuery object (not attached to the table)

          @@ -7274,7 +7280,7 @@

          Functions

          This function allows adding/removing a row to the thead, to display any errors (v2.15; v2.23.1).

          This function is ONLY included within the widget-pager.js and jquery.tablesorter.pager.js files; in version 3+, I plan to add it as a selectable option in a build.

          -

          In v2.23.1, a settings parameter was included to make it match the parametered returned by the jQuery .ajaxError() method.

          +

          In v2.23.1, a settings parameter was included to make it match the parametered returned by the jQuery .ajaxError() method.

          In v2.23.0, this function will accept xhr and exception parameters provided by ajax error messages. To maintain backward compatibility, if xhr is a string, it will be treated as previous message parameter and displayed in the error row without modification.

          Use it as follows:
          $.tablesorter.showError( table, xhr, settings, exception );
          @@ -7592,9 +7598,9 @@

          Download

          tar.gz
        • Download a previous release.
        • -
        • Install with bower: bower install jquery.tablesorter
        • -
        • Install with node.js: npm install tablesorter
        • -
        • Use CDN: jquery.tablesorter
        • +
        • Install with bower: bower install jquery.tablesorter
        • +
        • Install with node.js: npm install tablesorter
        • +
        • Use CDN: jquery.tablesorter
        Required: