Fix some styling issues

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2018-09-05 14:39:58 +02:00
parent 790ea6ff63
commit 8d384c7c5c
9 changed files with 23 additions and 12 deletions

View File

@@ -434,6 +434,14 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
};
};
$scope.colorValue = function(color) {
const re = /^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/;
if (re.test(color)) {
return color;
}
return '';
};
$scope.attachmentCount = function(card) {
if (Array.isArray(card.attachments)) {
return card.attachments.filter((obj) => obj.deletedAt === 0).length;