Fixed js bug on Files and Images tree

Call observeMethod only if ($(_HANDLER_FORMS.addpage).elements.PageType) exist to prevent javascript error on File & Images page.
This commit is contained in:
Giulio Bonanome 2014-02-13 18:12:50 +01:00
parent 34eb6678d8
commit 57bf2927af
1 changed files with 1 additions and 1 deletions

View File

@ -31,8 +31,8 @@ addpageclass.prototype = {
var selectedNode = $('sitetree').firstSelected();
if(selectedNode) this.showApplicableChildrenPageTypes(selectedNode.hints);
$('sitetree').observeMethod('SelectionChanged', this.treeSelectionChanged.bind(this));
}
$('sitetree').observeMethod('SelectionChanged', this.treeSelectionChanged.bind(this));
},
onclick : function() {