HPCCPlatformECLWidget.js 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. "hpcc/WUQueryWidget",
  21. "hpcc/ECLPlaygroundWidget",
  22. "dojo/text!../templates/HPCCPlatformECLWidget.html",
  23. "dijit/layout/BorderContainer",
  24. "dijit/layout/TabContainer",
  25. "dijit/layout/ContentPane"
  26. ], function (declare,
  27. registry,
  28. _TabContainerWidget, WUQueryWidget, ECLPlaygroundWidget,
  29. template) {
  30. return declare("HPCCPlatformECLWidget", [_TabContainerWidget], {
  31. templateString: template,
  32. baseClass: "HPCCPlatformECLWidget",
  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 - ECL";
  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(currSel.params);
  54. }
  55. }
  56. }
  57. });
  58. });