Elradio.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. MWF.xApplication.process.FormDesigner.Module = MWF.xApplication.process.FormDesigner.Module || {};
  2. MWF.xDesktop.requireApp("process.FormDesigner", "Module.Checkbox", null, false);
  3. MWF.xApplication.process.FormDesigner.Module.Elradio = MWF.FCElradio = new Class({
  4. Extends: MWF.FC$ElElement,
  5. Implements: [Options, Events],
  6. options: {
  7. "style": "default",
  8. "type": "elradio",
  9. "path": "../x_component_process_FormDesigner/Module/Elradio/",
  10. "propertyPath": "../x_component_process_FormDesigner/Module/Elradio/elradio.html"
  11. },
  12. _initModuleType: function(){
  13. this.className = "Elradio";
  14. this.moduleType = "element";
  15. this.moduleName = "elradio";
  16. },
  17. _createElementHtml: function(){
  18. var html = "<el-radio-group";
  19. html += " :text-color=\"textColor\"";
  20. html += " :fill=\"fillColor\"";
  21. html += " :size=\"size\"";
  22. html += " :style=\"elGroupStyles\"";
  23. html += (this.json.buttonRadio) ? " ><el-radio-button" : " ><el-radio";
  24. html += " :border=\"border\"";
  25. html += " :style=\"tmpElStyles\"";
  26. html += ">{{id}}"+((this.json.buttonRadio) ? "</el-radio-button></el-radio-group>" : "</el-radio></el-radio-group>");
  27. return html;
  28. },
  29. _createCopyNode: function(){
  30. this.copyNode = new Element("div", {
  31. "styles": this.css.moduleNodeShow
  32. });
  33. this.copyNode.addEvent("selectstart", function(){
  34. return false;
  35. });
  36. },
  37. _getCopyNode: function(){
  38. if (!this.copyNode) this._createCopyNode();
  39. this.copyNode.setStyle("display", "inline-block");
  40. return this.copyNode;
  41. },
  42. setPropertyId: function(){
  43. if (this.isPropertyLoaded) if (this.vm) this.resetElement();
  44. }
  45. });