options.ts 811 B

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