MWF.xApplication.cms.FormDesigner.Module = MWF.xApplication.cms.FormDesigner.Module || {}; MWF.xDesktop.requireApp("process.FormDesigner", "Module.Subform", null, false); MWF.xApplication.cms.FormDesigner.Module.Subform = MWF.CMSFCSubform = new Class({ Extends: MWF.FCSubform, Implements : [MWF.CMSFCMI], openSubform: function(e){ if (this.json.subformSelected && this.json.subformSelected!=="none" && this.json.subformType!=="script"){ layout.desktop.openApplication(e, "cms.FormDesigner", {"id": this.json.subformSelected, "appId": "FormDesigner"+this.json.subformSelected}); } }, refreshSubform: function(){ if (this.json.subformSelected && this.json.subformSelected!=="none" && this.json.subformType!=="script"){ MWF.Actions.get("x_cms_assemble_control").getForm(this.json.subformSelected, function(json){ if (this.subformData.updateTime!==json.data.updateTime){ var select = null; if (this.property){ select = $(this.property.data.pid+"selectSubform").getElement("select"); } this.clearSubformList(this.json.subformSelected); this.reloadSubform(json.data, select, ""); } }.bind(this)); } }, redoSelectedSubform: function(name, input, oldValue){ if (this.json.subformSelected==="none") this.json.subformSelected=""; if (this.json.subformSelected && this.json.subformSelected!=="none"){ if (this.form.subformList && this.form.subformList[this.json.subformSelected]){ //var p = (input) ? input.getPosition() : this.node.getPosition(); var p = this.node.getPosition(document.bosy); this.form.designer.alert("error", { "event": { "x": p.x+150, "y": p.y+80 } }, this.form.designer.lp.subformConflictTitle, this.form.designer.lp.subformConflictInfor, 400, 120); this.json.subformSelected = oldValue; if (input){ for (var i=0; i