/** * @ngdoc FbWidgetOptions * @name fasit.component.FbWidgetOptions * @function * * @description * Används för att visa en del som kollapsar vid trycking för att sen visar den andra. * */ angular.module('fasit') .directive('fbWidgetOptions', ['$compile', function ($compile) { 'use strict'; var compile: any, link: any; link = function (scope: fb.IFbWidgetOptionsScope, element: fb.IRootElementService, attrs: ng.IAttributes) { scope.isDialogShowing = function () { var cls = ''; if (scope.showDialog) { cls = 'showing'; } return cls; } scope.$watch('informationLimit', function (newVal, oldVal) { }); }; compile = function (element: fb.IRootElementService, attrs: any, linker: any): any { if(!angular.isDefined(attrs.informationLimit)) { attrs.informationLimit = 0; } return link; }; return { restrict: 'E', scope: { informationLimit: '=' }, compile: compile, templateUrl: 'app/Directives/fbWidgetOptions/fbWidgetOptions.html', }; }]); /* Flex items: *Align-self: Sets vertical alignment Top: flex-start Middle: center Bottom: flex-end Full height: stretch *Flex: Sets horizontal alignment Flex-grow: Fixed width: 0 Number: Flexible width proportional to other elements, full stretch if only element on row Flex-shrink: Fixed width: 0 Number: Flexible width proportional to other elements, full stretch if only element on row Flex-basis: Number or "auto" http://the-echoplex.net/flexyboxes/?fixed-height=on&legacy=on&display=flex&flex-direction=row&flex-wrap=wrap&justify-content=flex-start&align-items=flex-start&align-content=flex-start&order[]=0&flex-grow[]=1.5&flex-shrink[]=1&flex-basis[]=auto&align-self[]=auto&order[]=5&flex-grow[]=0&flex-shrink[]=0.5&flex-basis[]=auto&align-self[]=flex-start&order[]=0&flex-grow[]=3&flex-shrink[]=1&flex-basis[]=auto&align-self[]=auto&order[]=0&flex-grow[]=0&flex-shrink[]=1&flex-basis[]=auto&align-self[]=auto&order[]=0&flex-grow[]=0&flex-shrink[]=1&flex-basis[]=auto&align-self[]=auto */