No Description

Toolbar.js 894B

1234567891011121314151617181920212223
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var ToolbarButton_1 = require("./ToolbarButton");
  4. var Toolbar = (function () {
  5. function Toolbar(toolbarItems, clickHandler) {
  6. var _this = this;
  7. this.getUI = function () {
  8. _this.toolbarUI = document.createElement('div');
  9. _this.toolbarUI.className = 'fc-whiteboardtoolbar';
  10. for (var _i = 0, _a = _this.toolbarItems; _i < _a.length; _i++) {
  11. var toolbarItem = _a[_i];
  12. var toolbarButton = new ToolbarButton_1.ToolbarButton(toolbarItem, _this.clickHandler);
  13. _this.toolbarUI.appendChild(toolbarButton.getElement());
  14. }
  15. return _this.toolbarUI;
  16. };
  17. this.toolbarItems = toolbarItems;
  18. this.clickHandler = clickHandler;
  19. }
  20. return Toolbar;
  21. }());
  22. exports.Toolbar = Toolbar;