From f68b3898c01bc668bb9c577ea64ec0f3c14aedbe Mon Sep 17 00:00:00 2001
From: Mottie
Date: Tue, 19 Nov 2013 22:21:16 -0600
Subject: [PATCH] more search menu tweaks & version bump
---
README.md | 222 +++++++++------------------
component.json | 2 +-
docs/css/menu.css | 8 +-
docs/index.html | 19 ++-
docs/js/search.js | 1 +
js/jquery.tablesorter.js | 6 +-
js/jquery.tablesorter.min.js | 4 +-
js/jquery.tablesorter.widgets.js | 10 +-
js/jquery.tablesorter.widgets.min.js | 26 ++--
package.json | 2 +-
tablesorter.jquery.json | 2 +-
11 files changed, 115 insertions(+), 187 deletions(-)
diff --git a/README.md b/README.md
index 10884de5..c31b3d74 100644
--- a/README.md
+++ b/README.md
@@ -44,6 +44,75 @@ tablesorter can successfully parse and sort many types of data including linked
View the [complete listing here](https://github.com/Mottie/tablesorter/wiki/Change).
+#### Version 2.14.0 (11/19/2013)
+
+**Core**
+* Changed sorting algorithms:
+ * Due to problems with sorting multiple columns improperly sorting algorithms again include code to sort empty cells.
+ * Internal sorting again has separate ascending and descending functions; but the previous `$.tablesorter.sortNatural` (ascending only), `$.tablesorter.sortNumeric` (ascending only) and `$.tablesorter.sortText` (ascending only) functions are still available.
+ * Custom text & numeric sort functions, added via `textSorter` and `numberSorter` options now require you to return the sort in the correct direction.
+ * Custom sort functions no longer have empty cells automatically handled for you.
+ * Fixes [issue #419](https://github.com/Mottie/tablesorter/issues/419).
+* Added `sortStable` option which when `true` will sort exactly equal items by placing them in their original unsorted order (or, perform a [stable sort](http://en.wikipedia.org/wiki/Stable_sort#Stability)).
+* Removed double icon class names.
+* Added `tabIndex` option
+ * When `true`, a tabindex is added to the headers for keyboard accessibility; this was previously always applied
+ * When `false`, table headers will not be included when tabbing through the page
+ * Fulfills [issue #415](https://github.com/Mottie/tablesorter/issues/415).
+
+**Filter widget**
+* Setting a filter to build a select no longer causes an error. Fixes [issue #421](https://github.com/Mottie/tablesorter/issues/421).
+* Added `filter_saveFilters` option
+ * When `true`, this option saves the current filters using the storage utility (local storage with cookie fallback).
+ * This option is set to `false` by default.
+ * See [issue #388](https://github.com/Mottie/tablesorter/issues/388).
+* Allow multiple external filter inputs
+ * The `$.tablesorter.filter.bindSearch( $table, $external )` function now allows binding searches using the built-in functioning.
+ * The bind search function will unbind any previously bound `keyup` and `search` event listeners on the `$external` elements.
+ * External inputs must not have a `tablesorter-filter` class to distinguish them from internal filters.
+ * If not using the `filter_anyMatch` option, external filters can be set to target specific columns by including a `data-column` attribute.
+ * See the new [filter external inputs demo](http://mottie.github.io/tablesorter/docs/example-widget-filter-external-inputs.html).
+* Filter reset button clicks will again trigger a `filterReset` event. Fixes [issue #423](https://github.com/Mottie/tablesorter/issues/423).
+
+**Grouping widget**
+* Merged in fix for grouping widget + filter widget + child row widget.
+ * Updated demo with multi-child column styling.
+ * Thanks [Xamamule](https://github.com/Xamamule) in [pull #414](https://github.com/Mottie/tablesorter/pull/414)!
+ * This also fixes [issue #422](https://github.com/Mottie/tablesorter/issues/422).
+* Renamed variables & cleanup
+* Added `group_dateString` function to format the date string for `group-date` header class name.
+
+**Zebra widget**
+* Now skips removable rows added by other widgets, more specifically, it skips rows with a `remove-me` class name (set by the `selectorRemove` option).
+
+**Docs updates**
+* Added a side menu with search to the main document page.
+ * The main documentation page now uses Bootstrap for some styles.
+ * Search includes a count with clear search, previous result and next result buttons.
+ * Search options included to find letters or whole words only, and choose if the search is case sensitive, or not.
+ * The advantage of this search over the browser's built-in search (Ctrl-F) is that this search will find text within the hidden content
+ * Indexing of the search results may not always be in order, i.e. "10/10" may not always be the lowest result on the page due to nested elements.
+ * Sorry, IE7 and older users, the search works but but is really slow. And the side menu styling leaves much to be desired (using Bootstrap).
+* jQuery UI theme selector updates. See [issue #407](https://github.com/Mottie/tablesorter/issues/407).
+* Updated typos & css in various demos
+* Added Utility options section for options used by parsers, storage utility and pager ajax data.
+* Added removed options section.
+ * This applies to pager options available in the original version of tablesorter which are no longer supported.
+ * Fixes [issue #416](https://github.com/Mottie/tablesorter/issues/416).
+x* Added `kbd` styling for better visualization of keyboard keys.
+
+**Other**
+* Renamed variables within the [pager custom control demo](http://mottie.github.io/tablesorter/beta-testing/example-pager-custom-controls.html) (still in beta)
+* Renamed variables within default widgets file
+ * Utilities: storage, addHeaderResizeEvent,, resizableReset
+ * Widgets: columns, resizable, stickyHeaders, uitheme, saveSort
+* Updated parser-date-two-digit-year.js to allow changing the date range
+ * Set a different date range by adding a value to `table.config.dateRange`.
+ * Instructions added to main documents under utility options
+* Storage utility (`$.tablesorter.storage`) now accepts a jQuery object as well as a DOM object of the table
+ * `$.tablesorter.storage( $('#mytable'), 'myvariable', 'YAY' );`, or
+ * `$.tablesorter.storage( $('#mytable')[0], 'myvariable', 'YAY' );`
+
#### Version 2.13.3 (11/9/2013)
* Pager (plugin/widget)
@@ -121,156 +190,3 @@ View the [complete listing here](https://github.com/Mottie/tablesorter/wiki/Chan
* Other changes
* Improved `formatFloat()` replace method.
* Sorting a zero hex value (`0x00`) is now possible.
-
-#### Version 2.12 (10/18/2013)
-
-**Core**
-* Added `numberSorter` option allowing you to modify the overall numeric sorter.
-* Updated the `textSorter` option to allow setting a text sorter for each column.
- * The `textSorter` functon parameters have changed from `(a, b, table, column)` to `(a, b, direction, column, table)`.
- * Restructured & combined sorting functions internally so that tablesorter will always sort empty cells no matter what sorting algorithm is used by the `textSorter`.
- * Renamed `$.tablesorter.sortText()` to `$.tablesorter.sortNatural()`
- * Added a new basic alphabetical sort algorithm `$.tablesorter.sortText = function(a, b) { return a > b ? 1 : (a < b ? -1 : 0); };` which can be set using the `textSorter` option.
- * New examples can be found in the updated [custom sort demo](http://mottie.github.io/tablesorter/docs/example-option-custom-sort.html).
-
-* Added `fixedUrl` option for use with the `$.tablesorter.storage()` function.
- * Setting this with a fixed name (it doesn't need to be a url) allows saving table data (`saveSort` widget, `savePages` in pager widget) for tables on multiple pages in a domain.
- * Additional storage options are described below under "Storage".
-* An accurate number of table columns is now contained within `table.config.columns`. This accounts for multiple header rows, tds, ths, etc.
-* Replaced `.innerHTML` with jQuery's `.html()` to fix issues in IE8. Fixes [issue #385](https://github.com/Mottie/tablesorter/issues/385).
-* Version numbers should now all be accurate, even in the comments.. at least this time ;). Fixes [issue #386](https://github.com/Mottie/tablesorter/issues/386).
-
-**Pager**
-* In attempts to initialize the pager after the filter widget:
- * Added a pager widget (still beta testing) to allow initializing the pager after certain widgets (filter widget).
- * Updated tablesorter core (properly count table columns) & filter widget code to allow it to initialize on an empty table (thanks @stanislavprokopov!).
- * Hopefully one or both of these changes fixes [issue #388](https://github.com/Mottie/tablesorter/issues/388).
- * New pager widget demos: [basic](http://mottie.github.io/tablesorter/docs/example-widget-pager.html) & [ajax](http://mottie.github.io/tablesorter/docs/example-widget-pager-ajax.html).
-* `savePages` option
- * Should no longer cause an error if stored data is malformed or unrecognized. Fixes [issue #387](https://github.com/Mottie/tablesorter/issues/387).
- * The stored size and page is now cleared if the table is destroyed.
-* Fixed an error occuring in IE when trying to determine if a variable is an array (`toString` function call not recognized). Fixes [issue #390](https://github.com/Mottie/tablesorter/issues/390).
-* Updated pager rendering to prevent multiple ajax calls.
-* During this update, the pager page size would return as zero and set the totalPages value to inifinity. Yeah, it doesn't do that anymore; but you can still set the pager size to zero if you want!
-
-**Widgets**
-* Filter widget:
- * Should now properly initialize when the pager plugin/widget is used with ajax and/or the `filter_serversideFiltering` option is `true`. Fixes [issue #388](https://github.com/Mottie/tablesorter/issues/388).
- * Please note that the select dropdowns still sort using the natural sort algorithm, but since it is using the function directly, empty cells will not sort based on the `emptyTo` option. If this is a big problem, let me know!
-* Grouping widget:
- * Added `group_callback` option - this sets a callback function which allows modification of each group header label - like adding a subtotal for each group, or something. See the [updated demo](http://mottie.github.io/tablesorter/docs/example-widget-grouping.html).
- * Added `group_complete` option which is `"groupingComplete"` by default. This is the name of the event that is triggered once the grouping widget has completed updating.
-* Updated the editable widget:
- * Added `editable_editComplete` option which names the event that is triggered after tablesorter has completed updating the recent edit.
- * You can also bind to the `change` event for that editable element, but it may occur before tablesorter has updated its internal data cache.
-* Storage
- * The `$.tablesorter.storage()` function now has options including the `fixedUrl` option described in the core section above.
- * Also added storage options which can be used for custom widgets: `$.tablesorter.storage(table, key, value, { url : 'mydomain', id : 'table-group' })`.
- * Additionally, for already build-in widgets, you can apply data-attributes to the table: `
...
`.
- * For more details, please see [issue #389](https://github.com/Mottie/tablesorter/issues/389).
-
-**Parsers**
-* Added an IPv6 parser
- * This parser will auto-detect (the `is` function checks for valid IPv6 addresses).
- * Added a new [IPv6 parser demo](http://mottie.github.io/tablesorter/docs/example-parsers-ip-address.html).
- * Included rather extensive unit tests for just this parser o.O.
-
-#### Version 2.11.1 (10/11/2013)
-
-* Fixed an updating bug:
- * The pager was not updating properly
- * The `updateComplete` event was not firing when not using ajax.
- * Thanks @sbine for sharing the fix!
-
-#### Version 2.11 (10/10/2013)
-
-**Core**
-* Initialized widgets (widgets with options) are now tracked to ensure widget options are extended when using "applyWidgets". Fixes [issue #330](https://github.com/Mottie/tablesorter/issues/330).
-* An javascript error no longer pops up when setting the `delayInit` option to `true` and using the `saveSort` widget (or triggering a `sorton` method). Fixes [issue #346](https://github.com/Mottie/tablesorter/issues/346).
-* Only visible columns will be considered when fixing column widths. Fixes [issue #371](https://github.com/Mottie/tablesorter/issues/371).
-* Merged in fix for jQuery version check ([pull #338](https://github.com/Mottie/tablesorter/pull/338)). This also fixes [issue #379](https://github.com/Mottie/tablesorter/issues/379). Thanks @lemoinem!
-* Removed natural sort's ability to sort dates. This shouldn't be a problem since tablesorter uses parsers detect & parse date columns automatically. Fixes [issue #373](https://github.com/Mottie/tablesorter/issues/373).
-* Fixed [issue #381](https://github.com/Mottie/tablesorter/issues/381).
- * Any class name that is set by an option and is later used to search for that element now has an empty default class name.
- * The reasoning is that if a developer adds two class names to the option, the jQuery find breaks.
- * All default single class name options are now contained within `$.tablesorter.css`
- * Options affected include: tableClass, cssAsc, cssDesc, cssHeader, cssIcon, cssHeaderRow, cssProcessing in the core.
- * Note that the `cssIcon` option retains it's default class name & functionality to not add an `` inside the table cell if this *extra class name* is undefined.
- * Widget options affected include: filter_cssFilter and stickyHeaders.
-* Removed `return false` from header mouse/keyboard interaction. Fixes [issue #305](https://github.com/Mottie/tablesorter/pull/305) & [issue #366](https://github.com/Mottie/tablesorter/issues/366).
-
-**Parsers**
-* Fixed sugar date parser demo to point to the correct parser file and sugarjs resource.
-* General cleaned up date, fraction and metric parsers & fixing of minor bugs.
-
-**Build Table Widget (new)**
-* Build a table starting with an assortment of data types ( array, text (CSV, HTML) or object (json) ).
-* This widget isn't really a widget because it is run and does it's processing before tablesorter has initialized; but the options for it are contained within the tablesorter `widgetOptions`.
-
-**Column Widget**
-* General cleanup
-
-**Filter Widget**
-* Exact matches can still be made if the user enters an exact match indicator twice (i.e. `John==` will still find `John` in the column; before it would think the user was looking for `John=` after the second `=` was typed)
-* Dynamically added filter reset buttons will now work automatically. Added by [pull #327](https://github.com/Mottie/tablesorter/pull/327). Thanks @riker09!
-* Chrome appears to have fixed the hidden input bug, so reverted changes to the basic filter demo. Fixes [issue #341](https://github.com/Mottie/tablesorter/issues/341).
-* The filter widget will work properly with sub-tables. Fixes [issue #354](https://github.com/Mottie/tablesorter/issues/354). Thanks @johngrogg!
-* Fixed issues with `filter_columnFilters` set to `false`. Fixes [issue #355](https://github.com/Mottie/tablesorter/issues/355).
-* Searches now have accents replaced if the `sortLocaleCompare` option is `true`. Fixes [issue #357](https://github.com/Mottie/tablesorter/issues/357).
-* Merged in enhancement for the filter widget & updated docs - add row to `filter_functions` parameters ([issue #367](https://github.com/Mottie/tablesorter/issues/367), [pull #368](https://github.com/Mottie/tablesorter/pull/368)). Thanks @gknights!
-* FilterFormatter jQuery UI Datepicker now includes the user selected time for comparisons. Thanks @TheSin-!
-* Another fix to the filteFormatter jQuery UI Datepicker to make it work properly with the sticky header widget. Thanks @TheSin-!
-* Removed filter_cssFilter default class name. The "tablesorter-filter" class name is automatically added, and this option now contains any additional class names to add. Fixes [issue #381](https://github.com/Mottie/tablesorter/issues/381).
-
-**Grouping Widget**
-* The grouping widget now works across multiple tbodies.
-* Added `group-false` header option which disables the grouping widget for a specific column. Fixes [issue #344](https://github.com/Mottie/tablesorter/issues/344).
-* Added the `group_collapsed` option which when true and the `group_collapsible` option is also true, all groups will start collapsed. Fulfills [issue #352](https://github.com/Mottie/tablesorter/issues/352).
-* You can now toggle *all* group rows by holding down the shift key while clicking on a group header.
-* This widget now works properly with the pager addon (pager addon updated). Fixes [issue #281](https://github.com/Mottie/tablesorter/issues/281).
-
-**StickyHeaders Widget**
-* Caption outerheight now used to get the correct full height of the caption. Thanks @TheSin-!
-* `stickyHeaders_zIndex` option added to allow users to customize their sticky header z-index. Fixes [issue #332](https://github.com/Mottie/tablesorter/pull/332). Thanks @TheSin-!
-
-**UITheme widget**
-* Updated Bootstrap theme to work with Bootstrap v3
- * Only additions were made to the sorting icons class names within in the `$.tablesorter.themes.bootstrap` defaults (contained in the `jquery.tablesorter.widgets.js` file).
- * So the theme will support all current versions of Bootstrap, just make sure you are using the appropriate icon class name (`icon-{name}` = v2; `glyphicon glyphicon-{name}` = v3).
- * Removed the gradient background from the header & footer cells.
- * Added a reduced icon font side for header sort icons.
- * Renamed the pager class from `pager` to `ts-pager` as Bootstrap adds a lot of padding to that class. See [Bootstrap theme demo](http://mottie.github.io/tablesorter/docs/example-widget-bootstrap-theme.html).
- * Thanks @YeaYeah for sharing how to fix the top border in [issue #365](https://github.com/Mottie/tablesorter/issues/365).
-
-**Pager**
-* Fixed the `removeRows` option error when set to `true`.
-* The pager now stores any object returned by the `ajaxProcessing` function in `table.config.pager.ajaxData`
- * The object should contain attributes for `total` (numeric), `headers` (array) and `rows` (array of arrays).
- * A replacement `output` option can also be loaded via this method and must be included in the `output` attribute (i.e. `ajaxData.output`).
- * Additional attributes are also available to the output display by using the attribute key wrapped in curly brackets (e.g. `{extra}` from `ajaxData.extra`).
- * Additional attributes can also be objects or arrays and can be accessed via the output string as `{extra:0}` (for arrays) or `{extra:key}` for objects.
- * The page number is processed first, so it would be possible to use this string `{extra:{page}}` (`{page}` is a one-based index), or if you need a different value use `{page+1}` (zero-based index plus any number), or `{page-1}` (zero-based index minus any number).
- * For more details, please see [issue #326](https://github.com/Mottie/tablesorter/issues/326).
- * Thanks @camallen for the suggestions & feedback!
-* The "updateComplete" event should now properly trigger after an ansynchronous ajax call has completed. Fixes [issue #343](https://github.com/Mottie/tablesorter/issues/343).
-* Added a new `savePages` option
- * Requires requires the `$.tablesorter.storage` script within the `jquery.tablesorter.widget.js` file to work properly.
- * When `true`, it saves pager page & size if the storage script is loaded (requires $.tablesorter.storage in jquery.tablesorter.widgets.js).
- * The pager will continue to function properly without the storage script, it just won't save the current page or pager size.
- * Fulfills enhancement request from [issue #345](https://github.com/Mottie/tablesorter/issues/345).
-* Removed table update when using ajax with a server that is already doing all of the work. Fixes [issue #372](https://github.com/Mottie/tablesorter/issues/372) & [issue #361](https://github.com/Mottie/tablesorter/issues/361). Thanks @sbine!
-* Merged in change to count table th length after ajaxProcessing ([pull #383](https://github.com/Mottie/tablesorter/pull/383)). Thanks @harryxu!
-* Reverted changes made in [pull #349](https://github.com/Mottie/tablesorter/pull/349) as the error row was not showing because the urls did not exactly equal each other.
-* Child rows within the pager will now properly display/hide. Fixes [issue #348](https://github.com/Mottie/tablesorter/issues/348).
-* Merged in fix for pager redundant ajax requests ([pull #336](https://github.com/Mottie/tablesorter/pull/336)). Thanks @camallen!
-* Merged in fix for pager totalRows check ([pull #324](https://github.com/Mottie/tablesorter/pull/324)). Thanks @camallen!
-
-**Internal fixes**
-* Modified the pager plugin internal variables to use `p` for pager options and `c` for table config options - for consistency.
-* Cleaned up the formatting of a few parsers (mostly cosmetic!)
-* Some parser functions were added to the `$.tablesorter` object instead of keeping them as private functions, just because my OCD compelled me to do it.
-* Some of the changes made the parsers are no longer backward compatible to the original version of tablesorter. Break away man, just do it!
-
-**Thanks**
-* Thanks to @thezoggy and @TheSin- for help maintaining and supporting the tablesorter github project while I was away!
-* Also thanks to everyone else that contributed and even more thanks to those that helped troubleshoot and solve problems!
diff --git a/component.json b/component.json
index 4386d1b1..b93f5ef0 100644
--- a/component.json
+++ b/component.json
@@ -1,6 +1,6 @@
{
"name": "tablesorter",
- "version": "2.13.3",
+ "version": "2.14.0",
"dependencies": {
"jquery": ">=1.2.6"
}
diff --git a/docs/css/menu.css b/docs/css/menu.css
index 27184773..317a87b7 100644
--- a/docs/css/menu.css
+++ b/docs/css/menu.css
@@ -24,7 +24,7 @@ a{text-decoration:none;}
.input-group input.search.form-control{width:100%;font-size:14px;border-radius:4px 0 0 4px!important;-webkit-border-radius:4px 0 0 4px!important;background-clip:padding-box;}
.status{position:absolute;right:60px;top:1em;background:#FFF;color:#555;font-size:9px;}
.status.busy{width:20px;height:20px;margin-top:-4px;background:no-repeat center center;background-color:#fff!important;background-image:url(../../addons/pager/icons/loading.gif);text-indent:100%;white-space:nowrap;overflow:hidden;}
-.status.label-danger{color:#FFF;background-color:#d9534f;}
+.status.label-danger{color:#FFF;background-color:#d9534f;cursor:pointer;}
.highlight{background:#FF0;color:#000;cursor:pointer;padding:0 3px;}
.highlight.selected{background:orange;}
.message{margin:2px auto;}
@@ -39,8 +39,8 @@ a{text-decoration:none;}
#main-nav-check:checked ~ #main .main-header span{background-color:rgba(0,0,0,0.0);-webkit-transition-delay:.2s;-moz-transition-delay:.2s;-o-transition-delay:.2s;transition-delay:.2s;}
#main-nav-check:checked ~ #main .main-header span:before{margin-top:0;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg);-webkit-transition-delay:0 .2s;-moz-transition-delay:0 .2s;-o-transition-delay:0 .2s;transition-delay:0 .2s;}
#main-nav-check:checked ~ #main .main-header span:after{margin-top:0;-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transition-delay:0 .2s;-moz-transition-delay:0 .2s;-o-transition-delay:0 .2s;transition-delay:0 .2s;}
-.search-options{padding-left:12px;}
/* http://www.cssflow.com/snippets/toggle-switches */
+.search-options{padding-left:12px;}
.switch{position:relative;display:inline-block;height:26px;width:100px;margin-top:5px;background:rgba(0,0,0,0.25);border-radius:3px;-webkit-border-radius:3px;background-clip:padding-box;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,0.3), 0 1px rgba(255,255,255,0.1);box-shadow:inset 0 1px 3px rgba(0,0,0,0.3), 0 1px rgba(255,255,255,0.1);}
.switch-label{position:relative;z-index:2;float:left;width:48px;line-height:26px;font-size:11px;color:rgba(255,255,255,0.35);text-align:center;text-shadow:0 1px 1px rgba(0,0,0,0.45);cursor:pointer;}
.switch-label:active{font-weight:700;}
@@ -52,8 +52,8 @@ a{text-decoration:none;}
.switch-selection-right{left:50px;} /* separated from next line or IE ignores it */
.switch-input:checked + .switch-label-on ~ .switch-selection{left:50px;}
/* tipsy */
-.tipsy{font-size:10px;position:absolute;z-index:100000;padding:5px;}
-.tipsy-inner{background-color:#000;color:#FFF;max-width:200px;text-align:center;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;padding:5px 8px 4px;}
+.tipsy{font-size:12px;position:absolute;z-index:100000;padding:5px;}
+.tipsy-inner{background-color:#000;color:#FFF;max-width:250px;text-align:center;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;padding:5px 8px 4px;}
.tipsy-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000;}
.tipsy-arrow-n{border-bottom-color:#000;}
.tipsy-arrow-s{border-top-color:#000;}
diff --git a/docs/index.html b/docs/index.html
index d509f8c8..d2308626 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -88,7 +88,7 @@