mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
1175c693c5
commit
b58b281d8a
@ -28,7 +28,12 @@ jQuery(function($){
|
|||||||
$(this).closest(".ss-gridfield").find("#action_gridfield_relationfind").replaceWith(
|
$(this).closest(".ss-gridfield").find("#action_gridfield_relationfind").replaceWith(
|
||||||
'<input type="hidden" name="relationID" value="'+ui.item.id+'" id="relationID"/>'
|
'<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');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user