TimingPageWidget.js 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*##############################################################################
  2. # Copyright (C) 2011 HPCC Systems.
  3. #
  4. # All rights reserved. This program is free software: you can redistribute it and/or modify
  5. # it under the terms of the GNU Affero General Public License as
  6. # published by the Free Software Foundation, either version 3 of the
  7. # License, or (at your option) any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU Affero General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU Affero General Public License
  15. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. ############################################################################## */
  17. define([
  18. "dojo/_base/declare",
  19. "dijit/registry",
  20. "dijit/layout/BorderContainer",
  21. "hpcc/_Widget",
  22. "hpcc/TimingGridWidget",
  23. "dojo/text!../templates/TimingPageWidget.html"
  24. ],
  25. function (declare,
  26. registry, BorderContainer,
  27. _Widget, TimingGridWidget,
  28. template) {
  29. return declare("TimingPageWidget", [_Widget], {
  30. templateString: template,
  31. baseClass: "TimingPageWidget",
  32. borderContainer: null,
  33. timingGrid: null,
  34. buildRendering: function (args) {
  35. this.inherited(arguments);
  36. },
  37. postCreate: function (args) {
  38. this.inherited(arguments);
  39. this.borderContainer = registry.byId(this.id + "BorderContainer");
  40. this.timingGrid = registry.byId(this.id + "Grid");
  41. },
  42. startup: function (args) {
  43. this.inherited(arguments);
  44. },
  45. resize: function (args) {
  46. this.inherited(arguments);
  47. this.borderContainer.resize();
  48. },
  49. layout: function (args) {
  50. this.inherited(arguments);
  51. },
  52. // Plugin wrapper ---
  53. init: function (params) {
  54. if (this.inherited(arguments))
  55. return;
  56. var context = this;
  57. this.timingGrid.init(params);
  58. }
  59. });
  60. });