MWF.xApplication.portal.PageDesigner.Module.Common = MWF.PCCommon = new Class({ Extends: MWF.FCDiv, Implements: [Options, Events], options: { "style": "default", "propertyPath": "../x_component_portal_PageDesigner/Module/Common/common.html" }, initialize: function(form, options){ this.setOptions(options); this.path = "../x_component_portal_PageDesigner/Module/Common/"; this.cssPath = "../x_component_portal_PageDesigner/Module/Common/"+this.options.style+"/css.wcss"; this._loadCss(); this.moduleType = "container"; this.moduleName = "common"; this.Node = null; this.form = form; }, _setNodeProperty: function(){ this.node.store("module", this); if (this.form.moduleList.indexOf(this)==-1) this.form.moduleList.push(this); if (this.form.moduleNodeList.indexOf(this.node)==-1) this.form.moduleNodeList.push(this.node); if (this.form.moduleContainerNodeList.indexOf(this.node)==-1) this.form.moduleContainerNodeList.push(this.node); this.node.store("module", this); this._setEditStyle_custom("innerHTML"); }, _setEditStyle_custom: function(name, obj, oldValue){ if (name==="tagName"){ var tagName = this.json.tagName.toString().toLowerCase(); var nodeTag = this.node.tagName.toString().toLowerCase(); if (tagName !== nodeTag){ var node = new Element(tagName).inject(this.node, "before"); var nodes = this.node.childNodes; for (var i = 0; i < nodes.length; i++){ node.appendChild(nodes[i]); } this.node.destroy(); this.node = node; this.node.set("mwftype", "common"); this.node.set("id", this.json.id); this.isSetEvents = false; this._initModule(); var title = this.json.name || this.json.id; var text = text = this.json.tagName+"(Common)"; this.treeNode.setText("<"+text+"> "+title); } } if (name==="innerHTML"){ try{ if (this.json.innerHTML){ var nodes = this.node.childNodes; for (var i=0; i