Permalink
Browse files

BUGFIX SSF-53 : remove the disabled status of 'add button' in accordi…

…ng with its sitting environment, ie. does it initialed by jQuery UI. If not, simply remove its 'disabled' attribute
  • Loading branch information...
normann committed Mar 2, 2012
1 parent 1175c69 commit b58b281d8accf7499e9d58b974e5bfcdf0b04f21
Showing with 6 additions and 1 deletion.
  1. +6 −1 javascript/GridFieldSearch.js
@@ -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');
+ }
}
});
});

0 comments on commit b58b281

Please sign in to comment.