Address.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. MWF.xApplication.process.FormDesigner.Module = MWF.xApplication.process.FormDesigner.Module || {};
  2. MWF.xDesktop.requireApp("process.FormDesigner", "Module.$Element", null, false);
  3. MWF.xApplication.process.FormDesigner.Module.Address = MWF.FCAddress = new Class({
  4. Extends: MWF.FCCombox,
  5. Implements: [Options, Events],
  6. options: {
  7. "style": "default",
  8. "propertyPath": "/x_component_process_FormDesigner/Module/Address/address.html"
  9. },
  10. initialize: function(form, options){
  11. this.setOptions(options);
  12. this.path = "/x_component_process_FormDesigner/Module/Address/";
  13. this.cssPath = "/x_component_process_FormDesigner/Module/Address/"+this.options.style+"/css.wcss";
  14. this._loadCss();
  15. this.moduleType = "element";
  16. this.moduleName = "address";
  17. this.form = form;
  18. this.container = null;
  19. this.containerNode = null;
  20. },
  21. _createMoveNode: function(){
  22. this.moveNode = new Element("div", {
  23. "MWFType": "address",
  24. "styles": this.css.moduleNodeMove,
  25. "id": this.json.id,
  26. "events": {
  27. "selectstart": function(){
  28. return false;
  29. }
  30. }
  31. }).inject(this.form.container);
  32. var icon = new Element("div", {
  33. "styles": this.css.addressIcon
  34. }).inject(this.moveNode);
  35. var text = new Element("div", {
  36. "styles": this.css.moduleText,
  37. "text": this.json.id
  38. }).inject(this.moveNode);
  39. }
  40. });