mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Core: fix hasWidget error
This commit is contained in:
parent
565a0e6c1f
commit
a0d29c99f4
6
dist/js/jquery.tablesorter.combined.js
vendored
6
dist/js/jquery.tablesorter.combined.js
vendored
@ -1,4 +1,4 @@
|
||||
/*! tablesorter (FORK) - updated 07-22-2015 (v2.22.2)*/
|
||||
/*! tablesorter (FORK) - updated 07-23-2015 (v2.22.2)*/
|
||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
@ -1700,8 +1700,8 @@
|
||||
ts.widgets.push(widget);
|
||||
};
|
||||
|
||||
ts.hasWidget = function(table, name){
|
||||
$table = $(table);
|
||||
ts.hasWidget = function( $table, name ) {
|
||||
$table = $( $table );
|
||||
return $table.length && $table[0].config && $table[0].config.widgetInit[name] || false;
|
||||
};
|
||||
|
||||
|
6
dist/js/jquery.tablesorter.combined.min.js
vendored
6
dist/js/jquery.tablesorter.combined.min.js
vendored
File diff suppressed because one or more lines are too long
4
dist/js/jquery.tablesorter.js
vendored
4
dist/js/jquery.tablesorter.js
vendored
@ -1698,8 +1698,8 @@
|
||||
ts.widgets.push(widget);
|
||||
};
|
||||
|
||||
ts.hasWidget = function(table, name){
|
||||
$table = $(table);
|
||||
ts.hasWidget = function( $table, name ) {
|
||||
$table = $( $table );
|
||||
return $table.length && $table[0].config && $table[0].config.widgetInit[name] || false;
|
||||
};
|
||||
|
||||
|
4
dist/js/jquery.tablesorter.min.js
vendored
4
dist/js/jquery.tablesorter.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/jquery.tablesorter.widgets.js
vendored
2
dist/js/jquery.tablesorter.widgets.js
vendored
@ -1,4 +1,4 @@
|
||||
/*! tablesorter (FORK) - updated 07-22-2015 (v2.22.2)*/
|
||||
/*! tablesorter (FORK) - updated 07-23-2015 (v2.22.2)*/
|
||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
|
2
dist/js/jquery.tablesorter.widgets.min.js
vendored
2
dist/js/jquery.tablesorter.widgets.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀▀██
|
||||
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
||||
*/
|
||||
/*! tablesorter (FORK) - updated 07-22-2015 (v2.22.2)*/
|
||||
/*! tablesorter (FORK) - updated 07-23-2015 (v2.22.2)*/
|
||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
@ -1706,8 +1706,8 @@
|
||||
ts.widgets.push(widget);
|
||||
};
|
||||
|
||||
ts.hasWidget = function(table, name){
|
||||
$table = $(table);
|
||||
ts.hasWidget = function( $table, name ) {
|
||||
$table = $( $table );
|
||||
return $table.length && $table[0].config && $table[0].config.widgetInit[name] || false;
|
||||
};
|
||||
|
||||
|
@ -1688,8 +1688,8 @@
|
||||
ts.widgets.push(widget);
|
||||
};
|
||||
|
||||
ts.hasWidget = function(table, name){
|
||||
$table = $(table);
|
||||
ts.hasWidget = function( $table, name ) {
|
||||
$table = $( $table );
|
||||
return $table.length && $table[0].config && $table[0].config.widgetInit[name] || false;
|
||||
};
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀▀██
|
||||
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
||||
*/
|
||||
/*! tablesorter (FORK) - updated 07-22-2015 (v2.22.2)*/
|
||||
/*! tablesorter (FORK) - updated 07-23-2015 (v2.22.2)*/
|
||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
|
@ -749,6 +749,15 @@ $(function(){
|
||||
assert.equal( zebra(), true, 'zebra is applied after update' );
|
||||
});
|
||||
|
||||
/************************************************
|
||||
test has widget function
|
||||
************************************************/
|
||||
QUnit.test( "has zebra widget", function(assert) {
|
||||
assert.expect(2);
|
||||
assert.equal( ts.hasWidget( table2, 'zebra'), true, 'table has zebra widget (using table element object)' );
|
||||
assert.equal( ts.hasWidget( $table2, 'zebra'), true, 'table has zebra widget (using jQuery table object)' );
|
||||
});
|
||||
|
||||
/************************************************
|
||||
check destroy method
|
||||
************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user