MWF.xApplication.process.FormDesigner.Module = MWF.xApplication.process.FormDesigner.Module || {}; MWF.xDesktop.requireApp("process.FormDesigner", "Module.$ElElement", null, false); MWF.xApplication.process.FormDesigner.Module.Eldropdown = MWF.FCEldropdown = new Class({ Extends: MWF.FC$ElElement, Implements: [Options, Events], options: { "style": "default", "propertyPath": "../x_component_process_FormDesigner/Module/Eldropdown/eldropdown.html" }, _initModuleType: function(){ this.className = "Eldropdown"; this.moduleType = "element"; this.moduleName = "eldropdown"; }, _createElementHtml: function(){ var html = ""; if (this.json.vueSlot){ html += this.json.vueSlot; }else{ html += this.getButtonHtml(); } html += ""; html += " "; html += ""; html += ""; return html; }, _createCopyNode: function(){ this.copyNode = new Element("div", { "styles": this.css.moduleNodeShow }); this.copyNode.addEvent("selectstart", function(){ return false; }); }, _getCopyNode: function(){ if (!this.copyNode) this._createCopyNode(); this.copyNode.setStyle("display", "inline-block"); return this.copyNode; }, getButtonHtml: function(){ if( this.json.showButton ){ if( this.json.splitButton ) { return this.json.text || this.json.id; }else{ return ""+ ( this.json.text || this.json.id ) + ""+ ""; } }else{ return " "+ ( this.json.text || this.json.id ) + ""+ ""; } }, _setEditStyle_custom: function(name){ switch (name){ case "name": this.setPropertyName(); break; case "id": case "text": case "size": case "buttonType": case "showButton": case "splitButton": case "vueSlot": if (this.isPropertyLoaded && !this.reseting) { if (this.vm) this.resetElement(); } break; default: break; } }, setPropertyName: function(){ // if (this.json.name){ // var input = this.node.getElement("input"); // if (input) input.set("value", this.json.name); // } }, setPropertyId: function(){ // if (!this.json.name){ // var input = this.node.getElement("input"); // if (input) input.set("value", this.json.id); // } } });