Main.js 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. MWF.xApplication.Report = MWF.xApplication.Report || {};
  2. MWF.xApplication.ReportMinder = MWF.xApplication.ReportMinder || {};
  3. MWF.require("MWF.widget.O2Identity", null,false);
  4. //MWF.xDesktop.requireApp("Report", "Actions.RestActions", null, false);
  5. MWF.xDesktop.requireApp("Report", "lp."+MWF.language, null, false);
  6. MWF.xDesktop.requireApp("Report", "Common", null, false);
  7. MWF.xApplication.ReportMinder.options = {
  8. multitask: true,
  9. executable: true
  10. };
  11. MWF.xApplication.ReportMinder.Main = new Class({
  12. Extends: MWF.xApplication.Common.Main,
  13. Implements: [Options, Events],
  14. options: {
  15. "style": "default",
  16. "name": "ReportMinder",
  17. "icon": "icon.png",
  18. "width": "1324",
  19. "height": "720",
  20. "isResize": true,
  21. "isMax": true,
  22. "isNew" : false,
  23. "isEdited" : true,
  24. "title": MWF.xApplication.ReportMinder.LP.title,
  25. "id" : ""
  26. },
  27. onQueryLoad: function(){
  28. this.lp = MWF.xApplication.Report.LP;
  29. },
  30. onQueryClose: function(){
  31. },
  32. loadApplication: function(callback){
  33. this.userData = layout.desktop.session.user;
  34. this.userName = this.userData.distinguishedName;
  35. this.restActions = this.actions = MWF.Actions.get("x_report_assemble_control"); //new MWF.xApplication.Report.Actions.RestActions();
  36. this.common = new MWF.xApplication.Report.Common(this);
  37. this.path = "/x_component_ReportMinder/$Main/"+this.options.style+"/";
  38. if( this.status ){
  39. this.setOptions( this.status )
  40. }
  41. this.createNode();
  42. this.loadApplicationLayout();
  43. },
  44. createNode: function(){
  45. this.content.setStyle("overflow", "hidden");
  46. //this.node = new Element("div", {
  47. // "styles": this.css.node
  48. //}).inject(this.content);
  49. },
  50. clearContent : function(){
  51. this.content.empty();
  52. },
  53. reload : function(oldid, appid){
  54. this.content.empty();
  55. this.loadApplicationLayout();
  56. },
  57. loadApplicationLayout : function(){
  58. if( this.options.mindType == "department" ){
  59. MWF.xDesktop.requireApp("Report", "DepartmentMinder", null, false);
  60. this.minder = new MWF.xApplication.Report.DepartmentMinder(this.content, this, this.restActions, {
  61. department : this.options.department,
  62. year : this.options.year
  63. });
  64. this.minder.load();
  65. }else{
  66. MWF.xDesktop.requireApp("Report", "KeyWorkMinder", null, false);
  67. this.minder = new MWF.xApplication.Report.KeyWorkMinder(this.content, this, this.restActions, {
  68. id : this.options.id,
  69. year : this.options.year
  70. });
  71. this.minder.load();
  72. }
  73. },
  74. recordStatus: function(){
  75. return this.options;
  76. }
  77. });