Combox.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. MWF.xApplication.process.FormDesigner.Module = MWF.xApplication.process.FormDesigner.Module || {};
  2. MWF.xDesktop.requireApp("process.FormDesigner", "Module.$Input", null, false);
  3. MWF.xApplication.process.FormDesigner.Module.Combox = MWF.FCCombox = new Class({
  4. Extends: MWF.FC$Input,
  5. Implements: [Options, Events],
  6. options: {
  7. "style": "default",
  8. "type": "combox",
  9. "path": "../x_component_process_FormDesigner/Module/Combox/",
  10. "propertyPath": "../x_component_process_FormDesigner/Module/Combox/combox.html"
  11. },
  12. _preprocessingModuleData: function(){
  13. this.node.clearStyles();
  14. this.recoveryIconNode = this.node.getFirst();
  15. this.recoveryIconNode.dispose();
  16. this.recoveryTextNode = this.node.getFirst();
  17. this.recoveryTextNode.dispose();
  18. if (this.json.styles){
  19. this.json.recoveryStyles = Object.clone(this.json.styles);
  20. if (this.json.recoveryStyles) Object.each(this.json.recoveryStyles, function(value, key){
  21. if ((value.indexOf("x_processplatform_assemble_surface")==-1 && value.indexOf("x_portal_assemble_surface")==-1)){
  22. this.node.setStyle(key, value);
  23. delete this.json.styles[key];
  24. }
  25. }.bind(this));
  26. }
  27. this.json.preprocessing = "y";
  28. },
  29. _recoveryModuleData: function(){
  30. if (this.json.recoveryStyles) this.json.styles = this.json.recoveryStyles;
  31. if (this.json.recoveryInputStyles) this.json.inputStyles = this.json.recoveryInputStyles;
  32. if (this.recoveryTextNode) {
  33. this.node.empty();
  34. this.recoveryTextNode.inject(this.node, "top");
  35. }
  36. if (this.recoveryIconNode) {
  37. this.recoveryIconNode.inject(this.node, "top");
  38. }
  39. this.json.recoveryStyles = null;
  40. this.json.recoveryInputStyles = null;
  41. this.recoveryIconNode = null;
  42. this.recoveryTextNode = null;
  43. },
  44. });