Filter: row remains visible after focused, when hideFilters set

This commit is contained in:
Mottie 2015-06-12 21:06:08 -05:00
parent 449b985c60
commit 5faba4b9e0
8 changed files with 43 additions and 43 deletions

View File

@ -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 );
});

File diff suppressed because one or more lines are too long

View File

@ -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 );
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -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 );
});

View File

@ -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 );
});

View File

@ -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 );
});