mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Filter: row remains visible after focused, when hideFilters set
This commit is contained in:
parent
449b985c60
commit
5faba4b9e0
16
dist/js/jquery.tablesorter.combined.js
vendored
16
dist/js/jquery.tablesorter.combined.js
vendored
@ -3344,14 +3344,13 @@ ts.filter = {
|
||||
}
|
||||
},
|
||||
hideFilters: function( table, c ) {
|
||||
var $filterRow, $filterRow2, timer;
|
||||
$( table )
|
||||
var timer;
|
||||
c.$table
|
||||
.find( '.' + tscss.filterRow )
|
||||
.addClass( tscss.filterRowHide )
|
||||
.bind( 'mouseenter mouseleave', function( e ) {
|
||||
// save event object - http://bugs.jquery.com/ticket/12140
|
||||
var event = e;
|
||||
$filterRow = $( this );
|
||||
var event = e,
|
||||
$filterRow = $( this );
|
||||
clearTimeout( timer );
|
||||
timer = setTimeout( function() {
|
||||
if ( /enter|over/.test( event.type ) ) {
|
||||
@ -3369,13 +3368,14 @@ ts.filter = {
|
||||
}, 200 );
|
||||
})
|
||||
.find( 'input, select' ).bind( 'focus blur', function( e ) {
|
||||
$filterRow2 = $( this ).closest( 'tr' );
|
||||
var event = e,
|
||||
$row = $( this ).closest( 'tr' );
|
||||
clearTimeout( timer );
|
||||
var event = e;
|
||||
timer = setTimeout( function() {
|
||||
clearTimeout( timer );
|
||||
// don't hide row if any filter has a value
|
||||
if ( ts.getFilters( c.$table ).join( '' ) === '' ) {
|
||||
$filterRow2.toggleClass( tscss.filterRowHide, event.type === 'focus' );
|
||||
$row.toggleClass( tscss.filterRowHide, event.type !== 'focus' );
|
||||
}
|
||||
}, 200 );
|
||||
});
|
||||
|
2
dist/js/jquery.tablesorter.combined.min.js
vendored
2
dist/js/jquery.tablesorter.combined.min.js
vendored
File diff suppressed because one or more lines are too long
16
dist/js/jquery.tablesorter.widgets.js
vendored
16
dist/js/jquery.tablesorter.widgets.js
vendored
@ -1166,14 +1166,13 @@ ts.filter = {
|
||||
}
|
||||
},
|
||||
hideFilters: function( table, c ) {
|
||||
var $filterRow, $filterRow2, timer;
|
||||
$( table )
|
||||
var timer;
|
||||
c.$table
|
||||
.find( '.' + tscss.filterRow )
|
||||
.addClass( tscss.filterRowHide )
|
||||
.bind( 'mouseenter mouseleave', function( e ) {
|
||||
// save event object - http://bugs.jquery.com/ticket/12140
|
||||
var event = e;
|
||||
$filterRow = $( this );
|
||||
var event = e,
|
||||
$filterRow = $( this );
|
||||
clearTimeout( timer );
|
||||
timer = setTimeout( function() {
|
||||
if ( /enter|over/.test( event.type ) ) {
|
||||
@ -1191,13 +1190,14 @@ ts.filter = {
|
||||
}, 200 );
|
||||
})
|
||||
.find( 'input, select' ).bind( 'focus blur', function( e ) {
|
||||
$filterRow2 = $( this ).closest( 'tr' );
|
||||
var event = e,
|
||||
$row = $( this ).closest( 'tr' );
|
||||
clearTimeout( timer );
|
||||
var event = e;
|
||||
timer = setTimeout( function() {
|
||||
clearTimeout( timer );
|
||||
// don't hide row if any filter has a value
|
||||
if ( ts.getFilters( c.$table ).join( '' ) === '' ) {
|
||||
$filterRow2.toggleClass( tscss.filterRowHide, event.type === 'focus' );
|
||||
$row.toggleClass( tscss.filterRowHide, event.type !== 'focus' );
|
||||
}
|
||||
}, 200 );
|
||||
});
|
||||
|
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
2
dist/js/widgets/widget-filter.min.js
vendored
2
dist/js/widgets/widget-filter.min.js
vendored
File diff suppressed because one or more lines are too long
@ -3350,14 +3350,13 @@ ts.filter = {
|
||||
}
|
||||
},
|
||||
hideFilters: function( table, c ) {
|
||||
var $filterRow, $filterRow2, timer;
|
||||
$( table )
|
||||
var timer;
|
||||
c.$table
|
||||
.find( '.' + tscss.filterRow )
|
||||
.addClass( tscss.filterRowHide )
|
||||
.bind( 'mouseenter mouseleave', function( e ) {
|
||||
// save event object - http://bugs.jquery.com/ticket/12140
|
||||
var event = e;
|
||||
$filterRow = $( this );
|
||||
var event = e,
|
||||
$filterRow = $( this );
|
||||
clearTimeout( timer );
|
||||
timer = setTimeout( function() {
|
||||
if ( /enter|over/.test( event.type ) ) {
|
||||
@ -3375,13 +3374,14 @@ ts.filter = {
|
||||
}, 200 );
|
||||
})
|
||||
.find( 'input, select' ).bind( 'focus blur', function( e ) {
|
||||
$filterRow2 = $( this ).closest( 'tr' );
|
||||
var event = e,
|
||||
$row = $( this ).closest( 'tr' );
|
||||
clearTimeout( timer );
|
||||
var event = e;
|
||||
timer = setTimeout( function() {
|
||||
clearTimeout( timer );
|
||||
// don't hide row if any filter has a value
|
||||
if ( ts.getFilters( c.$table ).join( '' ) === '' ) {
|
||||
$filterRow2.toggleClass( tscss.filterRowHide, event.type === 'focus' );
|
||||
$row.toggleClass( tscss.filterRowHide, event.type !== 'focus' );
|
||||
}
|
||||
}, 200 );
|
||||
});
|
||||
|
@ -1172,14 +1172,13 @@ ts.filter = {
|
||||
}
|
||||
},
|
||||
hideFilters: function( table, c ) {
|
||||
var $filterRow, $filterRow2, timer;
|
||||
$( table )
|
||||
var timer;
|
||||
c.$table
|
||||
.find( '.' + tscss.filterRow )
|
||||
.addClass( tscss.filterRowHide )
|
||||
.bind( 'mouseenter mouseleave', function( e ) {
|
||||
// save event object - http://bugs.jquery.com/ticket/12140
|
||||
var event = e;
|
||||
$filterRow = $( this );
|
||||
var event = e,
|
||||
$filterRow = $( this );
|
||||
clearTimeout( timer );
|
||||
timer = setTimeout( function() {
|
||||
if ( /enter|over/.test( event.type ) ) {
|
||||
@ -1197,13 +1196,14 @@ ts.filter = {
|
||||
}, 200 );
|
||||
})
|
||||
.find( 'input, select' ).bind( 'focus blur', function( e ) {
|
||||
$filterRow2 = $( this ).closest( 'tr' );
|
||||
var event = e,
|
||||
$row = $( this ).closest( 'tr' );
|
||||
clearTimeout( timer );
|
||||
var event = e;
|
||||
timer = setTimeout( function() {
|
||||
clearTimeout( timer );
|
||||
// don't hide row if any filter has a value
|
||||
if ( ts.getFilters( c.$table ).join( '' ) === '' ) {
|
||||
$filterRow2.toggleClass( tscss.filterRowHide, event.type === 'focus' );
|
||||
$row.toggleClass( tscss.filterRowHide, event.type !== 'focus' );
|
||||
}
|
||||
}, 200 );
|
||||
});
|
||||
|
@ -799,14 +799,13 @@ ts.filter = {
|
||||
}
|
||||
},
|
||||
hideFilters: function( table, c ) {
|
||||
var $filterRow, $filterRow2, timer;
|
||||
$( table )
|
||||
var timer;
|
||||
c.$table
|
||||
.find( '.' + tscss.filterRow )
|
||||
.addClass( tscss.filterRowHide )
|
||||
.bind( 'mouseenter mouseleave', function( e ) {
|
||||
// save event object - http://bugs.jquery.com/ticket/12140
|
||||
var event = e;
|
||||
$filterRow = $( this );
|
||||
var event = e,
|
||||
$filterRow = $( this );
|
||||
clearTimeout( timer );
|
||||
timer = setTimeout( function() {
|
||||
if ( /enter|over/.test( event.type ) ) {
|
||||
@ -824,13 +823,14 @@ ts.filter = {
|
||||
}, 200 );
|
||||
})
|
||||
.find( 'input, select' ).bind( 'focus blur', function( e ) {
|
||||
$filterRow2 = $( this ).closest( 'tr' );
|
||||
var event = e,
|
||||
$row = $( this ).closest( 'tr' );
|
||||
clearTimeout( timer );
|
||||
var event = e;
|
||||
timer = setTimeout( function() {
|
||||
clearTimeout( timer );
|
||||
// don't hide row if any filter has a value
|
||||
if ( ts.getFilters( c.$table ).join( '' ) === '' ) {
|
||||
$filterRow2.toggleClass( tscss.filterRowHide, event.type === 'focus' );
|
||||
$row.toggleClass( tscss.filterRowHide, event.type !== 'focus' );
|
||||
}
|
||||
}, 200 );
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user