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:
Sean Harvey 2012-04-23 21:21:31 +12:00
parent 614f307a37
commit 647d57809b

View File

@ -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();
}
});