HPCCPlatformMainWidget.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. "dojo/_base/lang",
  19. "dojo/i18n",
  20. "dojo/i18n!./nls/common",
  21. "dojo/i18n!./nls/HPCCPlatformMainWidget",
  22. "hpcc/_TabContainerWidget",
  23. "dojo/text!../templates/HPCCPlatformMainWidget.html",
  24. "dijit/layout/BorderContainer",
  25. "dijit/layout/TabContainer",
  26. "dijit/layout/ContentPane",
  27. "hpcc/ActivityWidget",
  28. "hpcc/SearchResultsWidget",
  29. "hpcc/EventScheduleWorkunitWidget"
  30. ], function (declare, lang, i18n, nlsCommon, nlsSpecific,
  31. _TabContainerWidget,
  32. template) {
  33. return declare("HPCCPlatformMainWidget", [_TabContainerWidget], {
  34. templateString: template,
  35. baseClass: "HPCCPlatformMainWidget",
  36. i18n: lang.mixin(nlsCommon, nlsSpecific),
  37. postCreate: function (args) {
  38. this.inherited(arguments);
  39. },
  40. startup: function (args) {
  41. this.inherited(arguments);
  42. },
  43. getTitle: function () {
  44. return this.i18n.title;
  45. },
  46. // Hitched actions ---
  47. // Implementation ---
  48. init: function (params) {
  49. if (this.inherited(arguments))
  50. return;
  51. this.initTab();
  52. },
  53. initTab: function () {
  54. var currSel = this.getSelectedChild();
  55. if (currSel && !currSel.initalized) {
  56. if (currSel.init) {
  57. currSel.init({});
  58. }
  59. }
  60. }
  61. });
  62. });