MINOR: Disabled sort-input focus+button move if only 1 such field exists

This commit is contained in:
Russell Michell 2012-01-10 12:28:24 +13:00
parent 284360e987
commit eb77c4b056

View File

@ -40,8 +40,9 @@ jQuery(function($){
*/ */
$('fieldset.ss-gridfield input.ss-gridfield-sort').entwine({ $('fieldset.ss-gridfield input.ss-gridfield-sort').entwine({
onfocusin: function(e) { onfocusin: function(e) {
// Dodgy results in IE <=7 // Dodgy results in IE <=7 & ignore if only one filter-field
if($.browser.msie && $.browser.version <= 7) { countfields = $('fieldset.ss-gridfield input.ss-gridfield-sort').length;
if(($.browser.msie && $.browser.version <= 7) || countfields == 1) {
return false; return false;
} }
var eleInput = $(this); var eleInput = $(this);