Fix card options menu

This commit is contained in:
Julius Haertl
2016-10-28 01:35:28 +02:00
parent 9bbe4b9137
commit 5e7f0a044d
4 changed files with 81 additions and 7 deletions

View File

@@ -119,7 +119,7 @@ app.controller('BoardController', ["$rootScope", "$scope", "$stateParams", "Stat
$scope.sidebar = $rootScope.sidebar;
$scope.id = $stateParams.boardId;
$scope.status={};
$scope.status={},
$scope.newLabel={};
$scope.status.boardtab = $stateParams.detailTab;
@@ -642,6 +642,32 @@ app.directive('appNavigationEntryUtils', function () {
});
app.directive('appPopoverMenuUtils', function () {
'use strict';
return {
restrict: 'C',
link: function (scope, elm) {
var menu = elm.find('.popovermenu');
var button = elm.find('button');
button.click(function () {
menu.toggleClass('hidden');
if(!menu.hasClass('hidden')) {
button.css('display','block');
} else {
button.css('display','');
}
});
scope.$on('documentClicked', function (scope, event) {
if (event.target !== button) {
menu.addClass('hidden');
}
button.css('display','');
});
}
};
});
app.directive('autofocusOnInsert', function () {
'use strict';
return function (scope, elm) {