Tree.js 898 B

123456789101112131415161718192021222324252627
  1. MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
  2. MWF.xApplication.process.Xform.Tree = MWF.APPTree = new Class({
  3. Extends: MWF.APP$Module,
  4. _loadUserInterface: function(){
  5. this.node.empty();
  6. MWF.require("MWF.widget.Tree", function(){
  7. this.tree = new MWF.widget.Tree(this.node, {"style":"form"});
  8. this.tree.form = this.form;
  9. this._setTreeWidgetStyles();
  10. var treeData = this.json.data;
  11. if (this.json.dataType == "script") treeData = this.form.Macro.exec(((this.json.dataScript) ? this.json.dataScript.code : ""), this);
  12. this.tree.load(treeData);
  13. }.bind(this));
  14. },
  15. _setTreeWidgetStyles: function(){
  16. this.tree.css.areaNode = this.json.areaNodeStyle;
  17. this.tree.css.treeItemNode = this.json.treeItemNodeStyle;
  18. this.tree.css.textDivNode = this.json.textDivNodeStyle;
  19. this.tree.css.textDivNodeSelected = this.json.textDivNodeSelectedStyle;
  20. }
  21. });