options.ts 926 B

12345678910111213141516171819202122232425262728293031323334353637
  1. ///<reference path="../../../headers/common.d.ts" />
  2. import _ from 'lodash';
  3. import config from 'app/core/config';
  4. import {coreModule} from 'app/core/core';
  5. // import VirtualScroll from 'virtual-scroll';
  6. // console.log(VirtualScroll);
  7. export class RowOptionsCtrl {
  8. row: any;
  9. dashboard: any;
  10. rowCtrl: any;
  11. fontSizes = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
  12. /** @ngInject */
  13. constructor(private $scope, private $timeout, private $rootScope) {
  14. this.row = this.rowCtrl.row;
  15. this.dashboard = this.rowCtrl.dashboard;
  16. this.row.titleSize = this.row.titleSize || 'h6';
  17. }
  18. }
  19. export function rowOptionsDirective() {
  20. return {
  21. restrict: 'E',
  22. templateUrl: 'public/app/features/dashboard/row/options.html',
  23. controller: RowOptionsCtrl,
  24. bindToController: true,
  25. controllerAs: 'ctrl',
  26. scope: {
  27. rowCtrl: "=",
  28. },
  29. };
  30. }
  31. coreModule.directive('dashRowOptions', rowOptionsDirective);