Stat.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. MWF.xApplication.TeamWork = MWF.xApplication.TeamWork || {};
  2. MWF.xApplication.TeamWork.Stat = new Class({
  3. Extends: MWF.widget.Common,
  4. Implements: [Options, Events],
  5. options: {
  6. "style": "default",
  7. "mvcStyle": "style.css"
  8. },
  9. initialize: function (container, app, data, options) {
  10. this.setOptions(options);
  11. this.container = container;
  12. this.app = app;
  13. this.lp = this.app.lp.Stat;
  14. //this.actions = this.app.restActions;
  15. this.actions = o2.Actions.load("x_teamwork_assemble_control");
  16. this.path = "../x_component_TeamWork/$Stat/";
  17. this.cssPath = this.path+this.options.style+"/css.wcss";
  18. this._loadCss();
  19. if (this.options.mvcStyle) this.stylePath = this.path + this.options.style + "/" + this.options.mvcStyle;
  20. this.data = data;
  21. },
  22. load: function () {
  23. this.container.empty();
  24. if(this.options.mvcStyle) this.container.loadCss(this.stylePath);
  25. var url = this.path+this.options.style+"/view.html";
  26. //o2.Actions.load("x_processplatform_assemble_surface").TaskAction.listMyPaging(1,20, function(json){
  27. this.container.loadHtml(url, {"bind": {"lp": this.lp, "data": {}}, "module": this}, function(){
  28. }.bind(this));
  29. // this.content.loadHtml(url, {"bind": {"lp": this.lp, "data": json}, "module": this}, function(){
  30. // this.doSomething();
  31. // }.bind(this));
  32. //
  33. // o2.load(["js1", "js2"], {}, function(){}); //js
  34. //
  35. // o2.loadCss //css
  36. // o2.loadHtml("", {"dom": this.content})
  37. // o2.loadAll //js,css,html
  38. //
  39. // o2.loadAll({
  40. // "css": [],
  41. // "js":[],
  42. // "html": []
  43. // },
  44. // )
  45. //
  46. //}.bind(this));
  47. },
  48. loadTask:function(){
  49. alert("loadtask1")
  50. },
  51. });