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({
|
$('.cms-edit-form.CMSPageSettingsController input[name="ParentType"]:checked').entwine({
|
||||||
onmatch: function() {
|
onmatch: function() {
|
||||||
this.onclick();
|
this.redraw();
|
||||||
this._super();
|
this._super();
|
||||||
},
|
},
|
||||||
/**
|
redraw: function() {
|
||||||
* Function: onclick
|
var treeField = $('.cms-edit-form.CMSPageSettingsController #ParentID');
|
||||||
*
|
if ($(this).attr('id') == 'Form_EditForm_ParentType_root') treeField.slideUp();
|
||||||
* Parameters:
|
else treeField.slideDown();
|
||||||
* (Event) e
|
},
|
||||||
*/
|
onclick: function() {
|
||||||
onclick: function(e) {
|
this.redraw();
|
||||||
var parentTreeDropDown = $('.cms-edit-form.CMSPageSettingsController #ParentID');
|
|
||||||
|
|
||||||
if (e.target.id == 'Form_EditForm_ParentType_root') parentTreeDropDown.slideUp();
|
|
||||||
else parentTreeDropDown.slideDown();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user