mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUGFIX Cleanup of onclick() being called in onmatch for ParentType
field. Use a redraw() function instead which is called in onmatch and onclick
This commit is contained in:
parent
614f307a37
commit
647d57809b
@ -276,20 +276,16 @@
|
||||
*/
|
||||
$('.cms-edit-form.CMSPageSettingsController input[name="ParentType"]:checked').entwine({
|
||||
onmatch: function() {
|
||||
this.onclick();
|
||||
this.redraw();
|
||||
this._super();
|
||||
},
|
||||
/**
|
||||
* Function: onclick
|
||||
*
|
||||
* Parameters:
|
||||
* (Event) e
|
||||
*/
|
||||
onclick: function(e) {
|
||||
var parentTreeDropDown = $('.cms-edit-form.CMSPageSettingsController #ParentID');
|
||||
|
||||
if (e.target.id == 'Form_EditForm_ParentType_root') parentTreeDropDown.slideUp();
|
||||
else parentTreeDropDown.slideDown();
|
||||
redraw: function() {
|
||||
var treeField = $('.cms-edit-form.CMSPageSettingsController #ParentID');
|
||||
if ($(this).attr('id') == 'Form_EditForm_ParentType_root') treeField.slideUp();
|
||||
else treeField.slideDown();
|
||||
},
|
||||
onclick: function() {
|
||||
this.redraw();
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user