MWF.xApplication.process.FormDesigner.Module = MWF.xApplication.process.FormDesigner.Module || {};
MWF.xDesktop.requireApp("process.FormDesigner", "Module.$ElElement", null, false);
MWF.xApplication.process.FormDesigner.Module.Elbutton = MWF.FCElbutton = new Class({
Extends: MWF.FC$ElElement,
Implements: [Options, Events],
options: {
"style": "default",
"propertyPath": "../x_component_process_FormDesigner/Module/Elbutton/elbutton.html"
},
_initModuleType: function(){
this.className = "Elbutton";
this.moduleType = "element";
this.moduleName = "elbutton";
},
_createElementHtml: function(){
var html = ""+((this.json.circle!==true && this.json.isText!==false) ? (this.json.name || this.json.id) : "")+"";
html += ">{{(isText===false) ? '' : name||id}}";
if( this.json.iconPosition === "right" )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;
},
_setEditStyle_custom: function(name){
switch (name){
case "name": this.setPropertyName(); break;
case "id": this.setPropertyId(); break;
case "buttonRadio":
case "iconPosition":
case "icon":
case "vueSlot":
if (this.isPropertyLoaded) if (this.vm) this.resetElement(); break;
default: ;
}
},
});