mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-10-08 13:44:18 +00:00
Merge pull request #1073 from scr34m/updateall-resizable
Fix resizable widget bindings after tablesorter updateAll event
This commit is contained in:
commit
16d0663349
@ -102,10 +102,8 @@
|
||||
.bind( 'selectstart', false );
|
||||
}
|
||||
}
|
||||
$table.one('tablesorter-initialized', function() {
|
||||
ts.resizable.setHandlePosition( c, wo );
|
||||
ts.resizable.bindings( this.config, this.config.widgetOptions );
|
||||
});
|
||||
ts.resizable.setHandlePosition( c, wo );
|
||||
ts.resizable.bindings( c, wo );
|
||||
},
|
||||
|
||||
updateStoredSizes : function( c, wo ) {
|
||||
@ -188,9 +186,9 @@
|
||||
},
|
||||
|
||||
// prevent text selection while dragging resize bar
|
||||
toggleTextSelection : function( c, toggle ) {
|
||||
toggleTextSelection : function( c, wo, toggle ) {
|
||||
var namespace = c.namespace + 'tsresize';
|
||||
c.widgetOptions.resizable_vars.disabled = toggle;
|
||||
wo.resizable_vars.disabled = toggle;
|
||||
$( 'body' ).toggleClass( ts.css.resizableNoSelect, toggle );
|
||||
if ( toggle ) {
|
||||
$( 'body' )
|
||||
@ -227,7 +225,7 @@
|
||||
|
||||
vars.mouseXPosition = event.pageX;
|
||||
ts.resizable.updateStoredSizes( c, wo );
|
||||
ts.resizable.toggleTextSelection( c, true );
|
||||
ts.resizable.toggleTextSelection(c, wo, true );
|
||||
});
|
||||
|
||||
$( document )
|
||||
@ -246,7 +244,7 @@
|
||||
})
|
||||
.bind( 'mouseup' + namespace, function() {
|
||||
if (!wo.resizable_vars.disabled) { return; }
|
||||
ts.resizable.toggleTextSelection( c, false );
|
||||
ts.resizable.toggleTextSelection( c, wo, false );
|
||||
ts.resizable.stopResize( c, wo );
|
||||
ts.resizable.setHandlePosition( c, wo );
|
||||
});
|
||||
@ -351,7 +349,7 @@
|
||||
.unbind( 'contextmenu' + namespace );
|
||||
|
||||
wo.$resizable_container.remove();
|
||||
ts.resizable.toggleTextSelection( c, false );
|
||||
ts.resizable.toggleTextSelection( c, wo, false );
|
||||
ts.resizableReset( table, refreshing );
|
||||
$( document ).unbind( 'mousemove' + namespace + ' mouseup' + namespace );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user