OOButton.js 1.1 KB

123456789101112131415161718192021222324252627282930
  1. MWF.xDesktop.requireApp("process.Xform", "Button", null, false);
  2. MWF.xApplication.process.Xform.OOButton = MWF.APPOOButton = new Class({
  3. Implements: [Events],
  4. Extends: MWF.APPButton,
  5. iconStyle: "textFieldIcon",
  6. _loadUserInterface: function(){
  7. // var button = new Element('oo-button');
  8. // button.inject(this.node, "after");
  9. // this.node.destroy();
  10. // this.node = button;
  11. debugger;
  12. this.node.set({
  13. "id": this.json.id,
  14. "MWFType": this.json.type
  15. });
  16. this.node.setAttribute('text', this.json.name || this.json.id);
  17. if( this.json.properties ){
  18. this.node.set(this.json.properties)
  19. }
  20. if( this.json.styles ){
  21. this.node.setStyles(this.json.styles)
  22. }
  23. this.node.setAttribute('type', this.json.appearance || "default");
  24. if ( this.json.leftIcon) this.node.setAttribute('left-icon', this.json.leftIcon);
  25. if ( this.json.rightIcon) this.node.setAttribute('right-icon', this.json.rightIcon);
  26. if ( this.json.disabled) this.node.setAttribute('disabled', this.json.disabled);
  27. }
  28. });