Always select first color fixes #19

This commit is contained in:
Julius Haertl
2017-02-01 19:09:28 +01:00
parent 2085e9b300
commit b6d057a284

View File

@@ -27,6 +27,7 @@ app.controller('ListController', function ($scope, $location, $filter, BoardServ
$scope.status = {};
$scope.colors = ['0082c9', '00c9c6','00c906', 'c92b00', 'F1DB50', '7C31CC', '3A3B3D', 'CACBCD'];
$scope.boardservice = BoardService;
$scope.newBoard.color = $scope.colors[0];
// FIXME: not nice, but we want to load this only once
if($element.attr('id') === 'app-navigation') {
@@ -54,6 +55,7 @@ app.controller('ListController', function ($scope, $location, $filter, BoardServ
BoardService.create($scope.newBoard)
.then(function (response) {
$scope.newBoard = {};
$scope.newBoard.color = $scope.colors[0];
$scope.status.addBoard=false;
$scope.filterData();
}, function(error) {