eslint auto fix

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2017-11-11 12:42:35 +01:00
committed by Julius Härtl
parent 47b51c512d
commit afec4f211c
19 changed files with 315 additions and 305 deletions

View File

@@ -101,7 +101,7 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
// filter cards here, as ng-sortable will not work nicely with html-inline filters
$scope.filterData = function (order, text) {
if ($scope.stacks === undefined)
return;
{return;}
angular.copy(StackService.getData(), $scope.stacks);
$scope.stacks = $filter('orderBy')($scope.stacks, 'order');
angular.forEach($scope.stacks, function (value, key) {

View File

@@ -46,7 +46,7 @@ app.controller('CardController', function ($scope, $rootScope, $routeParams, $lo
$scope.cardRenameShow = function () {
if ($scope.archived || !BoardService.canEdit())
return false;
{return false;}
else {
$scope.status.cardRename = true;
}
@@ -104,7 +104,7 @@ app.controller('CardController', function ($scope, $rootScope, $routeParams, $lo
};
$scope.labelRemove = function (element, model) {
CardService.removeLabel($scope.cardId, element.id)
CardService.removeLabel($scope.cardId, element.id);
};
$scope.setDuedate = function (duedate) {

View File

@@ -23,26 +23,26 @@
/* global app angular */
app.controller('ListController', function ($scope, $location, $filter, BoardService, $element, $timeout, $stateParams, $state) {
function calculateNewColor() {
var boards = BoardService.getAll();
var boardKeys = Object.keys(boards);
var colorOccurrences = [];
function calculateNewColor() {
var boards = BoardService.getAll();
var boardKeys = Object.keys(boards);
var colorOccurrences = [];
for (var i = 0; i < $scope.colors.length; i++) {
colorOccurrences.push(0);
}
for (var i = 0; i < $scope.colors.length; i++) {
colorOccurrences.push(0);
}
for (var j = 0; j < boardKeys.length; j++) {
var key = boardKeys[j];
var board = boards[key];
for (var j = 0; j < boardKeys.length; j++) {
var key = boardKeys[j];
var board = boards[key];
if (board && $scope.colors.indexOf(board.color) !== -1) {
colorOccurrences[$scope.colors.indexOf(board.color)]++;
}
}
if (board && $scope.colors.indexOf(board.color) !== -1) {
colorOccurrences[$scope.colors.indexOf(board.color)]++;
}
}
return $scope.colors[colorOccurrences.indexOf(Math.min.apply(Math, colorOccurrences))];
}
return $scope.colors[colorOccurrences.indexOf(Math.min.apply(Math, colorOccurrences))];
}
$scope.boards = [];
$scope.newBoard = {};