Main.js 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. MWF.xApplication.Empty.options.multitask = true;
  2. MWF.xApplication.Empty.Main = new Class({
  3. Extends: MWF.xApplication.Common.Main,
  4. Implements: [Options, Events],
  5. options: {
  6. "style1": "default",
  7. "style": "default",
  8. "name": "Empty",
  9. "mvcStyle": "style.css",
  10. "icon": "icon.png",
  11. "title": MWF.xApplication.Empty.LP.title
  12. },
  13. onQueryLoad: function(){
  14. this.lp = MWF.xApplication.Empty.LP;
  15. },
  16. loadApplication: function(callback){
  17. var url = this.path+this.options.style+"/view.html";
  18. this.content.loadHtml(url, {"bind": {"lp": this.lp}, "module": this}, function(){
  19. this.loadTaskView();
  20. }.bind(this));
  21. },
  22. loadTaskView: function(){
  23. o2.Actions.load("x_processplatform_assemble_surface").TaskAction.listMyPaging(1,5, function(json){
  24. debugger;
  25. this.taskListView.loadHtml(this.path+this.options.style+"/taskView.html", {"bind": {"lp": this.lp, "data": json.data}, "module": this}, function(){
  26. this.doSomething();
  27. }.bind(this));
  28. }.bind(this));
  29. },
  30. doSomething: function(){
  31. },
  32. openTask: function(e, data, id){
  33. layout.openApplication(null, "process.Work", {"workid": id});
  34. },
  35. openCalendar: function(){
  36. layout.openApplication(null, "Calendar");
  37. },
  38. openOrganization: function(){
  39. layout.openApplication(null, "Org");
  40. },
  41. openInBrowser: function() {
  42. this.openInNewBrowser(true);
  43. },
  44. startProcess: function(){
  45. o2.api.page.startProcess();
  46. // const cmpt = this;
  47. // o2.requireApp([["process.TaskCenter", "lp."+o2.language], ["process.TaskCenter", ""]],"", ()=>{
  48. // var obj = {
  49. // "lp": o2.xApplication.process.TaskCenter.LP,
  50. // "content": cmpt.content,
  51. // "addEvent": function(type, fun){
  52. // cmpt.addEvent(type, fun);
  53. // },
  54. // "getAction": function (callback) {
  55. // if (!this.action) {
  56. // this.action = o2.Actions.get("x_processplatform_assemble_surface");
  57. // if (callback) callback();
  58. // } else {
  59. // if (callback) callback();
  60. // }
  61. // },
  62. // "desktop": layout.desktop,
  63. // "refreshAll": function(){},
  64. // "notice": cmpt.notice,
  65. // }
  66. // o2.JSON.get("../x_component_process_TaskCenter/$Main/default/css.wcss", function(data){
  67. // obj.css = data;
  68. // }, false);
  69. //
  70. // if (!cmpt.processStarter) cmpt.processStarter = new o2.xApplication.process.TaskCenter.Starter(obj);
  71. // cmpt.processStarter.load();
  72. // }, true, true);
  73. }
  74. });