HPCCPlatformMainWidget.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*##############################################################################
  2. # HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. ############################################################################## */
  16. define([
  17. "dojo/_base/declare",
  18. "dijit/registry",
  19. "hpcc/_TabContainerWidget",
  20. "dojo/text!../templates/HPCCPlatformMainWidget.html",
  21. "dijit/layout/BorderContainer",
  22. "dijit/layout/TabContainer",
  23. "dijit/layout/ContentPane",
  24. "hpcc/ActivityWidget",
  25. "hpcc/SearchResultsWidget"
  26. ], function (declare,
  27. registry,
  28. _TabContainerWidget,
  29. template) {
  30. return declare("HPCCPlatformMainWidget", [_TabContainerWidget], {
  31. templateString: template,
  32. baseClass: "HPCCPlatformMainWidget",
  33. postCreate: function (args) {
  34. this.inherited(arguments);
  35. },
  36. startup: function (args) {
  37. this.inherited(arguments);
  38. },
  39. getTitle: function () {
  40. return "HPCC Platform - Home";
  41. },
  42. // Hitched actions ---
  43. // Implementation ---
  44. init: function (params) {
  45. if (this.inherited(arguments))
  46. return;
  47. this.initTab();
  48. },
  49. initTab: function () {
  50. var currSel = this.getSelectedChild();
  51. if (currSel && !currSel.initalized) {
  52. if (currSel.init) {
  53. currSel.init({});
  54. }
  55. }
  56. }
  57. });
  58. });