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({ $('.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();
} }
}); });