BUGFIX SSF-53 : remove the disabled status of 'add button' in according with its sitting environment, ie. does it initialed by jQuery UI. If not, simply remove its 'disabled' attribute

This commit is contained in:
Normann Lou 2012-03-02 17:45:39 +13:00
parent 1175c693c5
commit b58b281d8a

View File

@ -28,7 +28,12 @@ jQuery(function($){
$(this).closest(".ss-gridfield").find("#action_gridfield_relationfind").replaceWith(
'<input type="hidden" name="relationID" value="'+ui.item.id+'" id="relationID"/>'
);
$(this).closest(".ss-gridfield").find("#action_gridfield_relationadd").button('enable');
var addbutton = $(this).closest(".ss-gridfield").find("#action_gridfield_relationadd");
if(addbutton.data('button')){
addbutton.button('enable');
}else{
addbutton.removeAttr('disabled');
}
}
});
});