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:
Normann Lou 2012-03-05 17:28:42 +13:00
parent 8a56f989ac
commit 7dd7e60f5a

View File

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