Main.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563
  1. MWF.xApplication.Attendance = MWF.xApplication.Attendance || {};
  2. MWF.require("MWF.widget.O2Identity", null, false);
  3. //MWF.xDesktop.requireApp("Attendance", "Actions.RestActions", null, false);
  4. MWF.xDesktop.requireApp("Attendance", "Common", null, false);
  5. MWF.xDesktop.requireApp("Template", "MDomItem", null, false);
  6. MWF.xApplication.Attendance.options = {
  7. multitask: false,
  8. executable: true
  9. };
  10. MWF.xApplication.Attendance.Main = new Class({
  11. Extends: MWF.xApplication.Common.Main,
  12. Implements: [Options, Events],
  13. options: {
  14. "curNaviId": null,
  15. "style": "default",
  16. "name": "Attendance",
  17. "icon": "icon.png",
  18. "width": "1400",
  19. "height": "700",
  20. "isResize": true,
  21. "isMax": true,
  22. "title": MWF.xApplication.Attendance.LP.title
  23. },
  24. onQueryLoad: function () {
  25. this.lp = MWF.xApplication.Attendance.LP;
  26. },
  27. loadApplication: function (callback) {
  28. if (!this.options.isRefresh) {
  29. this.maxSize(function () {
  30. this.loadLayout();
  31. }.bind(this));
  32. } else {
  33. this.loadLayout();
  34. }
  35. },
  36. loadLayout: function () {
  37. this.manageUnits = [];
  38. this.manageTopUnits = [];
  39. this.enableType = "";
  40. this.restActions = MWF.Actions.get("x_attendance_assemble_control");
  41. this.personActions = MWF.Actions.get("x_organization_assemble_personal");
  42. this.orgActions = MWF.Actions.get("x_organization_assemble_express");
  43. this.createNode();
  44. this.loadApplicationContent();
  45. },
  46. isAdmin: function () {
  47. return this.isTopUnitManager() || MWF.AC.isAttendanceManager() || MWF.AC.isAdministrator()
  48. },
  49. isUnitManager: function () {
  50. return this.manageUnits.length > 0;
  51. },
  52. isTopUnitManager: function () {
  53. return this.manageTopUnits.length > 0;
  54. },
  55. getNameFlag: function (name) {
  56. var t = typeOf(name);
  57. if (t === "array") {
  58. var v = [];
  59. name.each(function (id) {
  60. v.push((typeOf(id) === "object") ? (id.distinguishedName || id.id || id.unique || id.name) : id);
  61. });
  62. return v;
  63. } else {
  64. return [(t === "object") ? (name.distinguishedName || name.id || name.unique || name.name) : name];
  65. }
  66. },
  67. loadController: function (callback) {
  68. this.restActions.listPermission(function (json) {
  69. json.data = json.data || [];
  70. json.data.each(function (item) {
  71. if (item.adminLevel == "COMPANY" && item.adminName == layout.desktop.session.user.distinguishedName) {
  72. this.manageTopUnits.push(item.unitName)
  73. } else if (item.adminLevel == "DEPT" && item.adminName == layout.desktop.session.user.distinguishedName) {
  74. this.manageUnits.push(item.unitName)
  75. }
  76. }.bind(this));
  77. if (callback) callback(json);
  78. }.bind(this));
  79. },
  80. loadEnableType: function (callback) {
  81. var action = o2.Actions.load("x_attendance_assemble_control");
  82. action.AttendanceSettingAction.enableType(//平台封装好的方法
  83. function (json) { //服务调用成功的回调函数, json为服务传回的数据
  84. if (json.data && json.data.value) {
  85. debugger;
  86. this.enableType = json.data.value;
  87. }
  88. if (callback) callback(json);
  89. }.bind(this));
  90. },
  91. createNode: function () {
  92. this.content.setStyle("overflow", "hidden");
  93. this.node = new Element("div", {
  94. "styles": { "width": "100%", "height": "100%", "overflow": "hidden" }
  95. }).inject(this.content);
  96. },
  97. loadApplicationContent: function () {
  98. this.loadController(function () {
  99. this.loadEnableType(function () {
  100. this.loaNavi();
  101. }.bind(this));
  102. }.bind(this));
  103. //this.loadApplicationLayout();
  104. },
  105. loaNavi: function (callback) {
  106. this.naviNode = new Element("div.naviNode", {
  107. "styles": this.css.naviNode
  108. }).inject(this.node);
  109. var curNavi = { "id": "" };
  110. if (this.status) {
  111. curNavi.id = this.status.id
  112. }
  113. if (this.options.curNaviId) {
  114. curNavi.id = this.options.curNaviId;
  115. }
  116. this.navi = new MWF.xApplication.Attendance.Navi(this, this.naviNode, curNavi);
  117. },
  118. clearContent: function () {
  119. if (this.explorerContent) {
  120. if (this.explorer && this.explorer.destroy) {
  121. this.explorer.destroy();
  122. }
  123. this.explorerContent.destroy();
  124. this.explorerContent = null;
  125. }
  126. },
  127. openMyIndex: function () {
  128. MWF.xDesktop.requireApp("Attendance", "MyIndex", function () {
  129. this.clearContent();
  130. this.explorerContent = new Element("div", {
  131. "styles": this.css.rightContentNode
  132. }).inject(this.node);
  133. this.explorer = new MWF.xApplication.Attendance.MyIndex(this.explorerContent, this, this.restActions, { "isAdmin": this.isAdmin() });
  134. this.explorer.load();
  135. }.bind(this));
  136. },
  137. openMyDetail: function () {
  138. MWF.xDesktop.requireApp("Attendance", "MyDetail", function () {
  139. this.clearContent();
  140. this.explorerContent = new Element("div", {
  141. "styles": this.css.rightContentNode
  142. }).inject(this.node);
  143. this.explorer = new MWF.xApplication.Attendance.MyDetail(this.explorerContent, this, this.restActions, { "isAdmin": this.isAdmin() });
  144. this.explorer.load();
  145. }.bind(this));
  146. },
  147. openUnitIndex: function () {
  148. MWF.xDesktop.requireApp("Attendance", "UnitIndex", function () {
  149. this.clearContent();
  150. this.explorerContent = new Element("div", {
  151. "styles": this.css.rightContentNode
  152. }).inject(this.node);
  153. this.explorer = new MWF.xApplication.Attendance.UnitIndex(this.explorerContent, this, this.restActions, { "isAdmin": this.isAdmin() });
  154. this.explorer.load();
  155. }.bind(this));
  156. },
  157. openUnitDingdingIndex: function () {
  158. MWF.xDesktop.requireApp("Attendance", "UnitDingdingIndex", function () {
  159. this.clearContent();
  160. this.explorerContent = new Element("div", {
  161. "styles": this.css.rightContentNode
  162. }).inject(this.node);
  163. this.explorer = new MWF.xApplication.Attendance.UnitDingdingIndex(this.explorerContent, this, this.restActions, { "isAdmin": this.isAdmin() });
  164. this.explorer.load();
  165. }.bind(this));
  166. },
  167. openUnitDetail: function () {
  168. MWF.xDesktop.requireApp("Attendance", "UnitDetail", function () {
  169. this.clearContent();
  170. this.explorerContent = new Element("div", {
  171. "styles": this.css.rightContentNode
  172. }).inject(this.node);
  173. this.explorer = new MWF.xApplication.Attendance.UnitDetail(this.explorerContent, this, this.restActions, { "isAdmin": this.isAdmin() });
  174. this.explorer.load();
  175. }.bind(this));
  176. },
  177. openDingdingUnitDetail: function () {
  178. MWF.xDesktop.requireApp("Attendance", "UnitDingdingDetail", function () {
  179. this.clearContent();
  180. this.explorerContent = new Element("div", {
  181. "styles": this.css.rightContentNode
  182. }).inject(this.node);
  183. this.explorer = new MWF.xApplication.Attendance.UnitDingdingDetail(this.explorerContent, this, this.restActions, { "isAdmin": this.isAdmin() });
  184. this.explorer.load();
  185. }.bind(this));
  186. },
  187. openPeopleDetail: function () {
  188. MWF.xDesktop.requireApp("Attendance", "PeopleDetail", function () {
  189. this.clearContent();
  190. this.explorerContent = new Element("div", {
  191. "styles": this.css.rightContentNode
  192. }).inject(this.node);
  193. this.explorer = new MWF.xApplication.Attendance.PeopleDetail(this.explorerContent, this, this.restActions, { "isAdmin": this.isAdmin() });
  194. this.explorer.load();
  195. }.bind(this));
  196. },
  197. openDingdingPeopleDetail: function () {
  198. MWF.xDesktop.requireApp("Attendance", "PeopleDingdingDetail", function () {
  199. this.clearContent();
  200. this.explorerContent = new Element("div", {
  201. "styles": this.css.rightContentNode
  202. }).inject(this.node);
  203. this.explorer = new MWF.xApplication.Attendance.PeopleDingdingDetail(this.explorerContent, this, this.restActions, { "isAdmin": this.isAdmin() });
  204. this.explorer.load();
  205. }.bind(this));
  206. },
  207. openTopUnitDetail: function () {
  208. MWF.xDesktop.requireApp("Attendance", "TopUnitDetail", function () {
  209. this.clearContent();
  210. this.explorerContent = new Element("div", {
  211. "styles": this.css.rightContentNode
  212. }).inject(this.node);
  213. this.explorer = new MWF.xApplication.Attendance.TopUnitDetail(this.explorerContent, this, this.restActions, { "isAdmin": this.isAdmin() });
  214. this.explorer.load();
  215. }.bind(this));
  216. },
  217. openSelfHoliday: function () {
  218. MWF.xDesktop.requireApp("Attendance", "SelfHoliday", function () {
  219. this.clearContent();
  220. this.explorerContent = new Element("div", {
  221. "styles": this.css.rightContentNode
  222. }).inject(this.node);
  223. this.explorer = new MWF.xApplication.Attendance.SelfHoliday(this.explorerContent, this, this.restActions, { "isAdmin": this.isAdmin() });
  224. this.explorer.load();
  225. }.bind(this));
  226. },
  227. openMyAppealDeal: function () {
  228. MWF.xDesktop.requireApp("Attendance", "MyAppeal", function () {
  229. this.clearContent();
  230. this.explorerContent = new Element("div", {
  231. "styles": this.css.rightContentNode
  232. }).inject(this.node);
  233. this.explorer = new MWF.xApplication.Attendance.MyAppeal(this.explorerContent, this, this.restActions, { "isAdmin": this.isAdmin() });
  234. this.explorer.load();
  235. }.bind(this));
  236. },
  237. openAppealDeal: function () {
  238. MWF.xDesktop.requireApp("Attendance", "AppealExplorer", function () {
  239. this.clearContent();
  240. this.explorerContent = new Element("div", {
  241. "styles": this.css.rightContentNode
  242. }).inject(this.node);
  243. this.explorer = new MWF.xApplication.Attendance.AppealExplorer(this.explorerContent, this, this.restActions, { "isAdmin": this.isAdmin() });
  244. this.explorer.load();
  245. }.bind(this));
  246. },
  247. openImporting: function () {
  248. MWF.xDesktop.requireApp("Attendance", "ImportExplorer", function () {
  249. this.clearContent();
  250. this.explorerContent = new Element("div", {
  251. "styles": this.css.rightContentNode
  252. }).inject(this.node);
  253. this.explorer = new MWF.xApplication.Attendance.ImportExplorer(this.explorerContent, this, this.restActions, { "isAdmin": this.isAdmin() });
  254. this.explorer.load();
  255. }.bind(this));
  256. },
  257. openImportedInvalidInfor: function () {
  258. MWF.xDesktop.requireApp("Attendance", "InvalidInfor", function () {
  259. this.clearContent();
  260. this.explorerContent = new Element("div", {
  261. "styles": this.css.rightContentNode
  262. }).inject(this.node);
  263. this.explorer = new MWF.xApplication.Attendance.InvalidInfor(this.explorerContent, this, this.restActions, { "isAdmin": this.isAdmin() });
  264. this.explorer.load();
  265. }.bind(this));
  266. },
  267. openAbnormalExport: function () {
  268. MWF.xDesktop.requireApp("Attendance", "AbnormalExport", function () {
  269. this.clearContent();
  270. this.explorerContent = new Element("div", {
  271. "styles": this.css.rightContentNode
  272. }).inject(this.node);
  273. this.explorer = new MWF.xApplication.Attendance.AbnormalExport(this.explorerContent, this, this.restActions, { "isAdmin": this.isAdmin() });
  274. this.explorer.load();
  275. }.bind(this));
  276. },
  277. openScheduleSetting: function () {
  278. MWF.xDesktop.requireApp("Attendance", "ScheduleExplorer", function () {
  279. this.clearContent();
  280. this.explorerContent = new Element("div", {
  281. "styles": this.css.rightContentNode
  282. }).inject(this.node);
  283. this.explorer = new MWF.xApplication.Attendance.ScheduleExplorer(this.explorerContent, this, this.restActions, { "isAdmin": this.isAdmin() });
  284. this.explorer.load();
  285. }.bind(this));
  286. },
  287. openPermissionSetting: function () {
  288. MWF.xDesktop.requireApp("Attendance", "PermissionExplorer", function () {
  289. this.clearContent();
  290. this.explorerContent = new Element("div", {
  291. "styles": this.css.rightContentNode
  292. }).inject(this.node);
  293. this.explorer = new MWF.xApplication.Attendance.PermissionExplorer(this.explorerContent, this, this.restActions, { "isAdmin": this.isAdmin() });
  294. this.explorer.load();
  295. }.bind(this));
  296. },
  297. openHolidaySetting: function () {
  298. MWF.xDesktop.requireApp("Attendance", "HolidayExplorer", function () {
  299. this.clearContent();
  300. this.explorerContent = new Element("div", {
  301. "styles": this.css.rightContentNode
  302. }).inject(this.node);
  303. this.explorer = new MWF.xApplication.Attendance.HolidayExplorer(this.explorerContent, this, this.restActions, { "isAdmin": this.isAdmin() });
  304. this.explorer.load();
  305. }.bind(this));
  306. },
  307. openStaticsCycleExplorer: function () {
  308. MWF.xDesktop.requireApp("Attendance", "StatisticsCycle", function () {
  309. this.clearContent();
  310. this.explorerContent = new Element("div", {
  311. "styles": this.css.rightContentNode
  312. }).inject(this.node);
  313. this.explorer = new MWF.xApplication.Attendance.StatisticsCycle(this.explorerContent, this, this.restActions, { "isAdmin": this.isAdmin() });
  314. this.explorer.load();
  315. }.bind(this));
  316. },
  317. openAppSetting: function () {
  318. MWF.xDesktop.requireApp("Attendance", "AppSetting", function () {
  319. var setting = new MWF.xApplication.Attendance.AppSetting(this, this.restActions);
  320. setting.edit();
  321. }.bind(this));
  322. },
  323. openAddressSetting: function () {
  324. MWF.xDesktop.requireApp("Attendance", "AddressExplorer", function () {
  325. this.clearContent();
  326. this.explorerContent = new Element("div", {
  327. "styles": this.css.rightContentNode
  328. }).inject(this.node);
  329. this.explorer = new MWF.xApplication.Attendance.AddressExplorer(this.explorerContent, this, this.restActions, { "isAdmin": this.isAdmin() });
  330. this.explorer.load();
  331. }.bind(this));
  332. },
  333. openPersonSetting: function () {
  334. MWF.xDesktop.requireApp("Attendance", "PersonSetting", function () {
  335. this.clearContent();
  336. this.explorerContent = new Element("div", {
  337. "styles": this.css.rightContentNode
  338. }).inject(this.node);
  339. this.explorer = new MWF.xApplication.Attendance.PersonSetting(this.explorerContent, this, this.restActions, { "isAdmin": this.isAdmin() });
  340. this.explorer.load();
  341. }.bind(this));
  342. },
  343. recordStatus: function () {
  344. return this.navi && this.navi.currentItem ? this.navi.currentItem.retrieve("data") : {};
  345. }
  346. });
  347. MWF.xApplication.Attendance.Navi = new Class({
  348. Implements: [Options, Events],
  349. options: {
  350. "id": ""
  351. },
  352. initialize: function (app, node, options) {
  353. this.setOptions(options);
  354. this.app = app;
  355. this.node = $(node);
  356. this.css = this.app.css;
  357. this.currentMenu = null;
  358. this.currentItem = null;
  359. this.menus = {};
  360. this.items = {};
  361. this.elements = [];
  362. this.load();
  363. },
  364. load: function () {
  365. this.scrollNode = new Element("div.naviScrollNode", { "styles": this.css.naviScrollNode }).inject(this.node);
  366. this.areaNode = new Element("div.naviAreaNode", { "styles": this.css.naviAreaNode }).inject(this.scrollNode);
  367. this.setNodeScroll();
  368. var naviUrl = this.app.path + "navi.json";
  369. MWF.getJSON(naviUrl, function (json) {
  370. json.each(function (navi) {
  371. if (navi.access && navi.access == "admin") {
  372. if (this.app.isAdmin()) this.createNaviNode(navi);
  373. } else if (navi.access && navi.access == "admin_dept") {
  374. if (this.app.isUnitManager() || this.app.isAdmin()) this.createNaviNode(navi);
  375. } else if (navi.access && navi.access == "dingding") { //启用钉钉考勤同步后
  376. debugger;
  377. if ((this.app.isUnitManager() || this.app.isAdmin()) && (this.app.enableType == "dingding")) this.createNaviNode(navi);
  378. } else {
  379. this.createNaviNode(navi);
  380. }
  381. }.bind(this));
  382. if (this.options.id == "") this.elements[0].click();
  383. this.setContentSize();
  384. this.app.addEvent("resize", this.setContentSize.bind(this));
  385. }.bind(this));
  386. },
  387. setNodeScroll: function () {
  388. MWF.require("MWF.widget.DragScroll", function () {
  389. new MWF.widget.DragScroll(this.scrollNode);
  390. }.bind(this));
  391. MWF.require("MWF.widget.ScrollBar", function () {
  392. new MWF.widget.ScrollBar(this.scrollNode, { "indent": false });
  393. }.bind(this));
  394. },
  395. createNaviNode: function (data) {
  396. if (data.type == "sep") {
  397. var flag = true;
  398. if (data.access == "admin") {
  399. if (!this.app.isAdmin()) flag = false;
  400. } else if (data.access && data.access == "admin_dept") {
  401. if (!this.app.isUnitManager() && !this.app.isAdmin()) flag = false;
  402. }
  403. if (flag) {
  404. new Element("div", { "styles": this.css.viewNaviSepartorNode }).inject(this.areaNode);
  405. }
  406. } else if (data.sub && data.sub.length > 0) {
  407. this.createNaviMenuNode(data);
  408. } else {
  409. this.menus[data.id] = {};
  410. this.createNaviItemNode(data, data.id);
  411. }
  412. },
  413. createNaviMenuNode: function (data) {
  414. if (data.access == "admin") {
  415. if (!this.app.isAdmin()) return;
  416. } else if (data.access == "admin_dept") {
  417. if (!this.app.isUnitManager() && !this.app.isAdmin()) return;
  418. }
  419. var _self = this;
  420. var menuNode = new Element("div", {
  421. "styles": this.css.naviMenuNode
  422. });
  423. menuNode.store("data", data);
  424. menuNode.store("type", "menu");
  425. var textNode = new Element("div", {
  426. "styles": this.css.naviMenuTextNode,
  427. "text": data.title
  428. });
  429. textNode.inject(menuNode);
  430. menuNode.inject(this.areaNode);
  431. this.menus[data.id] = {};
  432. this.menus[data.id].node = menuNode;
  433. this.elements.push(menuNode);
  434. menuNode.addEvents({
  435. "mouseover": function () { if (_self.currentMenu != this) this.setStyles(_self.app.css.naviMenuNode_over); },
  436. "mouseout": function () { if (_self.currentMenu != this) this.setStyles(_self.app.css.naviMenuNode); },
  437. "mousedown": function () { if (_self.currentMenu != this) this.setStyles(_self.app.css.naviMenuNode_down); },
  438. "mouseup": function () { if (_self.currentMenu != this) this.setStyles(_self.app.css.naviMenuNode_over); },
  439. "click": function () {
  440. //if (_self.currentNavi!=this) _self.doAction.apply(_self, [this]);
  441. _self.clickMenu.apply(_self, [this]);
  442. }
  443. });
  444. data.sub.each(function (d) {
  445. this.createNaviItemNode(d, data.id, menuNode)
  446. }.bind(this))
  447. },
  448. clickMenu: function (naviNode) {
  449. var navi = naviNode.retrieve("data");
  450. var action = navi.action;
  451. this.closeCurrentMenu();
  452. if (this.menus[navi.id].itemNodes) {
  453. this.menus[navi.id].itemNodes.each(function (itemNode) {
  454. itemNode.setStyle("display", "block");
  455. })
  456. }
  457. var type = naviNode.retrieve("type");
  458. if (!navi.target || navi.target != "_blank") {
  459. naviNode.setStyles(this.css.naviMenuNode_current);
  460. this.currentMenu = naviNode;
  461. }
  462. },
  463. closeCurrentMenu: function () {
  464. if (this.currentMenu) {
  465. var data = this.currentMenu.retrieve("data");
  466. if (this.menus[data.id].itemNodes) {
  467. this.menus[data.id].itemNodes.each(function (itemNode) {
  468. itemNode.setStyle("display", "none");
  469. })
  470. }
  471. this.currentMenu.setStyles(this.css.naviMenuNode);
  472. }
  473. },
  474. createNaviItemNode: function (data, menuId) {
  475. if (data.access == "admin") {
  476. if (!this.app.isAdmin()) return;
  477. } else if (data.access && data.access == "admin_dept") {
  478. if (!this.app.isUnitManager() && !this.app.isAdmin()) return;
  479. }
  480. var _self = this;
  481. var items = this.menus[menuId].itemNodes = this.menus[menuId].itemNodes || [];
  482. var itemNode = new Element("div", {
  483. "styles": this.css.naviItemNode
  484. });
  485. itemNode.setStyle("display", "block");
  486. items.push(itemNode);
  487. itemNode.store("data", data);
  488. itemNode.store("type", "item");
  489. var textNode = new Element("div", {
  490. "styles": this.css.naviItemTextNode,
  491. "text": data.title
  492. });
  493. textNode.inject(itemNode);
  494. itemNode.inject(this.areaNode);
  495. this.elements.push(itemNode);
  496. this.items[data.id] = itemNode;
  497. itemNode.addEvents({
  498. "mouseover": function () { if (_self.currentItem != this) this.setStyles(_self.app.css.naviItemNode_over); },
  499. "mouseout": function () { if (_self.currentItem != this) this.setStyles(_self.app.css.naviItemNode); },
  500. "mousedown": function () { if (_self.currentItem != this) this.setStyles(_self.app.css.naviItemNode_down); },
  501. "mouseup": function () { if (_self.currentItem != this) this.setStyles(_self.app.css.naviItemNode_over); },
  502. "click": function () {
  503. _self.clickItem.apply(_self, [this]);
  504. }
  505. });
  506. if (data.id == this.options.id) {
  507. itemNode.click();
  508. }
  509. },
  510. clickItem: function (naviNode) {
  511. var navi = naviNode.retrieve("data");
  512. var action = navi.action;
  513. var type = naviNode.retrieve("type");
  514. if (!navi.target || navi.target != "_blank") {
  515. if (this.currentItem) this.currentItem.setStyles(this.css.naviItemNode);
  516. naviNode.setStyles(this.css.naviItemNode_current);
  517. this.currentItem = naviNode;
  518. }
  519. if (navi.action && this.app[navi.action]) {
  520. this.app[navi.action].call(this.app, navi);
  521. }
  522. },
  523. setContentSize: function () {
  524. var size = this.app.content.getSize();
  525. this.scrollNode.setStyle("height", size.y - 5);
  526. }
  527. //loadCalendar: function () {
  528. // var calendarArea = new Element("div#calendarArea",{
  529. // "styles" : this.css.calendarArea
  530. // }).inject(this.node)
  531. // this.calendar = new MWF.xApplication.Attendance.Calendar( calendarArea, this.app, this.actions )
  532. // this.calendar.load();
  533. //}
  534. });