mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR SSF-53 : add / remove hover-alike class to "Filter" button for easy css styling while keydown on filter input field
This commit is contained in:
parent
8a56f989ac
commit
7dd7e60f5a
@ -153,10 +153,14 @@
|
||||
*/
|
||||
$('.ss-gridfield .filter-header :input').entwine({
|
||||
onkeydown: function(e) {
|
||||
btn = this.closest('.fieldgroup').find('.ss-gridfield-button-filter');
|
||||
if(e.keyCode == '13') {
|
||||
btn = this.closest('.filter-header').find('.ss-gridfield-button-filter');
|
||||
this.getGridField().reload({data: [{name: btn.attr('name'), value: btn.val()}]});
|
||||
btns = this.closest('.filter-header').find('.ss-gridfield-button-filter');
|
||||
this.getGridField().reload({data: [{name: btns.attr('name'), value: btns.val()}]});
|
||||
btn.removeClass('hover-alike');
|
||||
return false;
|
||||
}else{
|
||||
btn.addClass('hover-alike');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user