mirror of
https://github.com/Mottie/tablesorter.git
synced 2025-01-12 15:24:21 +00:00
Core: Fix method of saving default widgetOptions. See #1356
This commit is contained in:
parent
3cd9882fc7
commit
0e2235fabc
@ -431,7 +431,7 @@
|
||||
var tmp = $.extend( true, {}, c.originalSettings );
|
||||
// restore original settings; this clears out current settings, but does not clear
|
||||
// values saved to storage.
|
||||
c = $.extend( true, ts.defaults, tmp );
|
||||
c = $.extend( true, {}, ts.defaults, tmp );
|
||||
c.originalSettings = tmp;
|
||||
this.hasInitialized = false;
|
||||
// setup the entire table again
|
||||
@ -1910,14 +1910,15 @@
|
||||
},
|
||||
|
||||
applyWidgetOptions : function( table ) {
|
||||
var indx, widget,
|
||||
var indx, widget, wo,
|
||||
c = table.config,
|
||||
len = c.widgets.length;
|
||||
if ( len ) {
|
||||
for ( indx = 0; indx < len; indx++ ) {
|
||||
widget = ts.getWidgetById( c.widgets[ indx ] );
|
||||
if ( widget && widget.options ) {
|
||||
c.widgetOptions = $.extend( true, widget.options, c.widgetOptions );
|
||||
wo = $.extend( {}, widget.options );
|
||||
c.widgetOptions = $.extend( true, wo, c.widgetOptions );
|
||||
// add widgetOptions to defaults for option validator
|
||||
$.extend( true, ts.defaults.widgetOptions, widget.options );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user