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