Button.js 887 B

12345678910111213141516171819202122232425262728
  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. if (!button) button = new Element("button");
  13. button.inject(this.node, "after");
  14. this.node.destroy();
  15. this.node = button;
  16. this.node.set({
  17. "id": this.json.id,
  18. "text": this.json.name || this.json.id,
  19. "MWFType": this.json.type
  20. });
  21. if (!this.json.preprocessing) this.node.setStyles(this.form.css.buttonStyles);
  22. }
  23. });