Button.js 830 B

123456789101112131415161718192021222324252627
  1. MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
  2. MWF.xApplication.process.Xform.Button = MWF.APPButton = new Class({
  3. Implements: [Events],
  4. Extends: MWF.APP$Module,
  5. iconStyle: "personfieldIcon",
  6. _loadUserInterface: function(){
  7. // var button = new Element("button");
  8. // button.inject(this.node, "after");
  9. // this.node.destroy();
  10. // this.node = button;
  11. var button = this.node.getElement("button");
  12. button.inject(this.node, "after");
  13. this.node.destroy();
  14. this.node = button;
  15. this.node.set({
  16. "id": this.json.id,
  17. "text": this.json.name || this.json.id,
  18. "MWFType": this.json.type
  19. });
  20. if (!this.json.preprocessing) this.node.setStyles(this.form.css.buttonStyles);
  21. }
  22. });