Sha256: 37796d462fbb2bdcf672b54f6c46e578242d495ebd4f4d82421fa3c9bf9ba94c
Contents?: true
Size: 1.4 KB
Versions: 207
Compression:
Stored size: 1.4 KB
Contents
(function () { 'use strict'; /** * @ngdoc directive * @name Bastion.common.directive:selectActionDropdown * * @description * Used to create a dropdown menu with a list of actions in it and the words "Select Action" on the button. * * Necessary because of https://github.com/angular-ui/bootstrap/issues/5841 * * @example * <span select-action-dropdown> * <ul>...</ul> * </span> */ function selectActionDropdown() { return { restrict: 'AE', transclude: true, scope: true, templateUrl: 'common/views/select-action-dropdown.html', compile: function (tElement, tAttribute, transclude) { return function (scope, element) { scope.status = { isOpen: false }; scope.toggleDropdown = function (event) { event.preventDefault(); event.stopPropagation(); scope.status.isOpen = !scope.status.isOpen; }; transclude(scope, function(clone) { element.find('.btn-group').append(clone); }); }; } }; } angular.module('Bastion.common').directive('selectActionDropdown', selectActionDropdown); })();
Version data entries
207 entries across 207 versions & 1 rubygems