diff --git a/js/app/Config.js b/js/app/Config.js index 7e74fb27f..a65263388 100644 --- a/js/app/Config.js +++ b/js/app/Config.js @@ -38,8 +38,8 @@ app.config(function ($provide, $routeProvider, $interpolateProvider, $httpProvid .state('list', { url: "/", templateUrl: "/boardlist.mainView.html", - controller: 'ListController', - }) + controller: 'ListController' + }) .state('board', { url: "/board/:boardId/:filter", templateUrl: "/board.html", @@ -53,10 +53,10 @@ app.config(function ($provide, $routeProvider, $interpolateProvider, $httpProvid reloadOnSearch : false, views: { "sidebarView": { - templateUrl: "/board.sidebarView.html", - } - }, - }) + templateUrl: "/board.sidebarView.html" + } + } + }) .state('board.card', { url: "/card/:cardId", views: { diff --git a/js/controller/BoardController.js b/js/controller/BoardController.js index b5a3cb11d..16e97b7ae 100644 --- a/js/controller/BoardController.js +++ b/js/controller/BoardController.js @@ -25,8 +25,8 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St $scope.sidebar = $rootScope.sidebar; $scope.id = $stateParams.boardId; - $scope.status = {}, - $scope.newLabel = {}; + $scope.status = {}; + $scope.newLabel = {}; $scope.status.boardtab = $stateParams.detailTab; $scope.stackservice = StackService; @@ -78,11 +78,9 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St } }; $scope.checkCanEdit = function () { - if ($scope.archived) { - return false; - } - return true; - } + return !$scope.archived; + + }; // filter cards here, as ng-sortable will not work nicely with html-inline filters $scope.filterData = function (order, text) { @@ -90,8 +88,7 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St return; angular.copy(StackService.getAll(), $scope.stacks); angular.forEach($scope.stacks, function (value, key) { - var cards = []; - cards = $filter('cardSearchFilter')(value.cards, text); + var cards = $filter('cardSearchFilter')(value.cards, text); cards = $filter('orderBy')(cards, order); $scope.stacks[key].cards = cards; }); @@ -128,7 +125,7 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St search = "%25"; } BoardService.searchUsers(search); - } + }; $scope.newStack = {'boardId': $scope.id}; $scope.newCard = {}; @@ -144,19 +141,19 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St var newCard = { 'title': title, 'stackId': stack, - 'type': 'plain', + 'type': 'plain' }; CardService.create(newCard).then(function (data) { // FIXME: called here reorders $scope.stackservice.addCard(data); $scope.newCard.title = ""; }); - } + }; $scope.cardDelete = function (card) { CardService.delete(card.id); StackService.deleteCard(card); - } + }; $scope.cardArchive = function (card) { CardService.archive(card); StackService.deleteCard(card); @@ -164,7 +161,7 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St $scope.cardUnarchive = function (card) { CardService.unarchive(card); StackService.deleteCard(card); - } + }; $scope.labelDelete = function (label) { LabelService.delete(label.id); @@ -172,30 +169,30 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St var i = BoardService.getCurrent().labels.indexOf(label); BoardService.getCurrent().labels.splice(i, 1); // TODO: remove from cards - } + }; $scope.labelCreate = function (label) { label.boardId = $scope.id; LabelService.create(label); BoardService.getCurrent().labels.push(label); $scope.status.createLabel = false; $scope.newLabel = {}; - } + }; $scope.labelUpdate = function (label) { label.edit = false; LabelService.update(label); - } + }; $scope.aclAdd = function (sharee) { sharee.boardId = $scope.id; BoardService.addAcl(sharee); $scope.status.addSharee = null; - } + }; $scope.aclDelete = function (acl) { BoardService.deleteAcl(acl); - } + }; $scope.aclUpdate = function (acl) { BoardService.updateAcl(acl); - } + }; // settings for card sorting @@ -234,8 +231,8 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St if (eventObj) { var container = $("#board"); var offset = container.offset(); - targetX = eventObj.pageX - (offset.left || container.scrollLeft()); - targetY = eventObj.pageY - (offset.top || container.scrollTop()); + var targetX = eventObj.pageX - (offset.left || container.scrollLeft()); + var targetY = eventObj.pageY - (offset.top || container.scrollTop()); if (targetX < offset.left) { container.scrollLeft(container.scrollLeft() - 50); } else if (targetX > container.width()) { diff --git a/js/controller/CardController.js b/js/controller/CardController.js index 18e5f8668..d165de4eb 100644 --- a/js/controller/CardController.js +++ b/js/controller/CardController.js @@ -64,15 +64,15 @@ app.controller('CardController', function ($scope, $rootScope, $routeParams, $lo $scope.cardUpdate = function(card) { CardService.update(CardService.getCurrent()).then(function(data) { $scope.status.cardEditDescription = false; - $('#card-description .save-indicator').fadeIn(500).fadeOut(1000); + $('#card-description').find('.save-indicator').fadeIn(500).fadeOut(1000); }); - } + }; $scope.labelAssign = function(element, model) { CardService.assignLabel($scope.cardId, element.id); var card = CardService.getCurrent(); StackService.updateCard(card); - } + }; $scope.labelRemove = function(element, model) { CardService.removeLabel($scope.cardId, element.id) diff --git a/js/directive/cardActionUtils.js b/js/directive/cardActionUtils.js deleted file mode 100644 index 1145fc231..000000000 --- a/js/directive/cardActionUtils.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * @copyright Copyright (c) 2016 Julius Härtl - * - * @author Julius Härtl - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -// OwnCloud Click Handling -// https://doc.owncloud.org/server/8.0/developer_manual/app/css.html -app.directive('cardActionUtils', function () { - 'use strict'; - return { - restrict: 'C', - scope: { - ngModel : '=', - }, - link: function (scope, elm) { - console.log(scope); -/* - var menu = elm.siblings('.popovermenu'); - var button = $(elm) - .find('li a'); - - button.click(function () { - menu.toggleClass('open'); - }); - scope.$on('documentClicked', function (scope, event) { - if (event.target !== button[0]) { - menu.removeClass('open'); - } - }); - */ - } - }; -}); - diff --git a/js/directive/search.js b/js/directive/search.js index 46fef5f9f..c358d7229 100644 --- a/js/directive/search.js +++ b/js/directive/search.js @@ -37,7 +37,7 @@ app.directive('search', function ($document, $location) { scope.$apply(function () { scope.onSearch(value); }); - } + }; box.on('search keyup', function (event) { if (event.type === 'search' || event.keyCode === 13 ) { diff --git a/js/filters/cardSearchFilter.js b/js/filters/cardSearchFilter.js index 499e9c7f1..7556dd5c3 100644 --- a/js/filters/cardSearchFilter.js +++ b/js/filters/cardSearchFilter.js @@ -36,10 +36,8 @@ app.filter('cardSearchFilter', function() { }); }); - var arrayResult = $.map(_result, function(value, index) { + return $.map(_result, function(value, index) { return [value]; }); - - return arrayResult; }; }); \ No newline at end of file diff --git a/js/filters/iconWhiteFilter.js b/js/filters/iconWhiteFilter.js index 8fe0e294b..13fcac7c8 100644 --- a/js/filters/iconWhiteFilter.js +++ b/js/filters/iconWhiteFilter.js @@ -31,9 +31,9 @@ app.filter('iconWhiteFilter', function() { b: parseInt(result[3], 16) } : null; if(result !== null) { - r = color.r/255; - g = color.g/255; - b = color.b/255; + var r = color.r/255; + var g = color.g/255; + var b = color.b/255; var max = Math.max(r, g, b), min = Math.min(r, g, b); var h, s, l = (max + min) / 2; diff --git a/js/filters/lightenColorFilter.js b/js/filters/lightenColorFilter.js index 3c5650770..cd2225b6d 100644 --- a/js/filters/lightenColorFilter.js +++ b/js/filters/lightenColorFilter.js @@ -29,8 +29,7 @@ app.filter('lightenColorFilter', function() { b: parseInt(result[3], 16) } : null; if (result !== null) { - var rgba = "rgba(" + color.r + "," + color.g + "," + color.b + ",0.7)"; - return rgba; + return "rgba(" + color.r + "," + color.g + "," + color.b + ",0.7)"; } else { return "#" + hex; } diff --git a/js/filters/textColorFilter.js b/js/filters/textColorFilter.js index c73d298dd..c11b4eb7c 100644 --- a/js/filters/textColorFilter.js +++ b/js/filters/textColorFilter.js @@ -31,9 +31,9 @@ app.filter('textColorFilter', function() { b: parseInt(result[3], 16) } : null; if(result !== null) { - r = color.r/255; - g = color.g/255; - b = color.b/255; + var r = color.r/255; + var g = color.g/255; + var b = color.b/255; var max = Math.max(r, g, b), min = Math.min(r, g, b); var h, s, l = (max + min) / 2; diff --git a/js/public/app.js b/js/public/app.js index 2ebeecd5a..2761ffbc7 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -46,8 +46,8 @@ app.config(["$provide", "$routeProvider", "$interpolateProvider", "$httpProvider .state('list', { url: "/", templateUrl: "/boardlist.mainView.html", - controller: 'ListController', - }) + controller: 'ListController' + }) .state('board', { url: "/board/:boardId/:filter", templateUrl: "/board.html", @@ -61,10 +61,10 @@ app.config(["$provide", "$routeProvider", "$interpolateProvider", "$httpProvider reloadOnSearch : false, views: { "sidebarView": { - templateUrl: "/board.sidebarView.html", - } - }, - }) + templateUrl: "/board.sidebarView.html" + } + } + }) .state('board.card', { url: "/card/:cardId", views: { @@ -119,8 +119,8 @@ app.controller('BoardController', ["$rootScope", "$scope", "$stateParams", "Stat $scope.sidebar = $rootScope.sidebar; $scope.id = $stateParams.boardId; - $scope.status = {}, - $scope.newLabel = {}; + $scope.status = {}; + $scope.newLabel = {}; $scope.status.boardtab = $stateParams.detailTab; $scope.stackservice = StackService; @@ -172,11 +172,9 @@ app.controller('BoardController', ["$rootScope", "$scope", "$stateParams", "Stat } }; $scope.checkCanEdit = function () { - if ($scope.archived) { - return false; - } - return true; - } + return !$scope.archived; + + }; // filter cards here, as ng-sortable will not work nicely with html-inline filters $scope.filterData = function (order, text) { @@ -184,8 +182,7 @@ app.controller('BoardController', ["$rootScope", "$scope", "$stateParams", "Stat return; angular.copy(StackService.getAll(), $scope.stacks); angular.forEach($scope.stacks, function (value, key) { - var cards = []; - cards = $filter('cardSearchFilter')(value.cards, text); + var cards = $filter('cardSearchFilter')(value.cards, text); cards = $filter('orderBy')(cards, order); $scope.stacks[key].cards = cards; }); @@ -222,7 +219,7 @@ app.controller('BoardController', ["$rootScope", "$scope", "$stateParams", "Stat search = "%25"; } BoardService.searchUsers(search); - } + }; $scope.newStack = {'boardId': $scope.id}; $scope.newCard = {}; @@ -238,19 +235,19 @@ app.controller('BoardController', ["$rootScope", "$scope", "$stateParams", "Stat var newCard = { 'title': title, 'stackId': stack, - 'type': 'plain', + 'type': 'plain' }; CardService.create(newCard).then(function (data) { // FIXME: called here reorders $scope.stackservice.addCard(data); $scope.newCard.title = ""; }); - } + }; $scope.cardDelete = function (card) { CardService.delete(card.id); StackService.deleteCard(card); - } + }; $scope.cardArchive = function (card) { CardService.archive(card); StackService.deleteCard(card); @@ -258,7 +255,7 @@ app.controller('BoardController', ["$rootScope", "$scope", "$stateParams", "Stat $scope.cardUnarchive = function (card) { CardService.unarchive(card); StackService.deleteCard(card); - } + }; $scope.labelDelete = function (label) { LabelService.delete(label.id); @@ -266,30 +263,30 @@ app.controller('BoardController', ["$rootScope", "$scope", "$stateParams", "Stat var i = BoardService.getCurrent().labels.indexOf(label); BoardService.getCurrent().labels.splice(i, 1); // TODO: remove from cards - } + }; $scope.labelCreate = function (label) { label.boardId = $scope.id; LabelService.create(label); BoardService.getCurrent().labels.push(label); $scope.status.createLabel = false; $scope.newLabel = {}; - } + }; $scope.labelUpdate = function (label) { label.edit = false; LabelService.update(label); - } + }; $scope.aclAdd = function (sharee) { sharee.boardId = $scope.id; BoardService.addAcl(sharee); $scope.status.addSharee = null; - } + }; $scope.aclDelete = function (acl) { BoardService.deleteAcl(acl); - } + }; $scope.aclUpdate = function (acl) { BoardService.updateAcl(acl); - } + }; // settings for card sorting @@ -328,8 +325,8 @@ app.controller('BoardController', ["$rootScope", "$scope", "$stateParams", "Stat if (eventObj) { var container = $("#board"); var offset = container.offset(); - targetX = eventObj.pageX - (offset.left || container.scrollLeft()); - targetY = eventObj.pageY - (offset.top || container.scrollTop()); + var targetX = eventObj.pageX - (offset.left || container.scrollLeft()); + var targetY = eventObj.pageY - (offset.top || container.scrollTop()); if (targetX < offset.left) { container.scrollLeft(container.scrollLeft() - 50); } else if (targetX > container.width()) { @@ -388,15 +385,15 @@ app.controller('CardController', ["$scope", "$rootScope", "$routeParams", "$loca $scope.cardUpdate = function(card) { CardService.update(CardService.getCurrent()).then(function(data) { $scope.status.cardEditDescription = false; - $('#card-description .save-indicator').fadeIn(500).fadeOut(1000); + $('#card-description').find('.save-indicator').fadeIn(500).fadeOut(1000); }); - } + }; $scope.labelAssign = function(element, model) { CardService.assignLabel($scope.cardId, element.id); var card = CardService.getCurrent(); StackService.updateCard(card); - } + }; $scope.labelRemove = function(element, model) { CardService.removeLabel($scope.cardId, element.id) @@ -494,11 +491,9 @@ app.filter('cardSearchFilter', function() { }); }); - var arrayResult = $.map(_result, function(value, index) { + return $.map(_result, function(value, index) { return [value]; }); - - return arrayResult; }; }); app.filter('iconWhiteFilter', function() { @@ -512,9 +507,9 @@ app.filter('iconWhiteFilter', function() { b: parseInt(result[3], 16) } : null; if(result !== null) { - r = color.r/255; - g = color.g/255; - b = color.b/255; + var r = color.r/255; + var g = color.g/255; + var b = color.b/255; var max = Math.max(r, g, b), min = Math.min(r, g, b); var h, s, l = (max + min) / 2; @@ -554,8 +549,7 @@ app.filter('lightenColorFilter', function() { b: parseInt(result[3], 16) } : null; if (result !== null) { - var rgba = "rgba(" + color.r + "," + color.g + "," + color.b + ",0.7)"; - return rgba; + return "rgba(" + color.r + "," + color.g + "," + color.b + ",0.7)"; } else { return "#" + hex; } @@ -594,9 +588,9 @@ app.filter('textColorFilter', function() { b: parseInt(result[3], 16) } : null; if(result !== null) { - r = color.r/255; - g = color.g/255; - b = color.b/255; + var r = color.r/255; + var g = color.g/255; + var b = color.b/255; var max = Math.max(r, g, b), min = Math.min(r, g, b); var h, s, l = (max + min) / 2; @@ -700,36 +694,6 @@ app.directive('avatar', function() { } }; }); -// OwnCloud Click Handling -// https://doc.owncloud.org/server/8.0/developer_manual/app/css.html -app.directive('cardActionUtils', function () { - 'use strict'; - return { - restrict: 'C', - scope: { - ngModel : '=', - }, - link: function (scope, elm) { - console.log(scope); -/* - var menu = elm.siblings('.popovermenu'); - var button = $(elm) - .find('li a'); - - button.click(function () { - menu.toggleClass('open'); - }); - scope.$on('documentClicked', function (scope, event) { - if (event.target !== button[0]) { - menu.removeClass('open'); - } - }); - */ - } - }; -}); - - // original idea from blockloop: http://stackoverflow.com/a/24090733 app.directive('elastic', [ '$timeout', @@ -778,7 +742,7 @@ app.directive('search', ["$document", "$location", function ($document, $locatio scope.$apply(function () { scope.onSearch(value); }); - } + }; box.on('search keyup', function (event) { if (event.type === 'search' || event.keyCode === 13 ) { @@ -816,7 +780,7 @@ app.factory('ApiService', ["$http", "$q", function($http, $q){ }); return deferred.promise; - } + }; ApiService.prototype.fetchOne = function (id) { @@ -888,7 +852,7 @@ app.factory('ApiService', ["$http", "$q", function($http, $q){ // methods for managing data ApiService.prototype.clear = function() { this.data = {}; - } + }; ApiService.prototype.add = function (entity) { var element = this.data[entity.id]; if(element===undefined) { @@ -915,7 +879,7 @@ app.factory('ApiService', ["$http", "$q", function($http, $q){ ApiService.prototype.getCurrent = function () { return this.data[this.id]; - } + }; ApiService.prototype.getData = function() { return $.map(this.data, function(value, index) { @@ -925,7 +889,7 @@ app.factory('ApiService', ["$http", "$q", function($http, $q){ ApiService.prototype.getAll = function () { return this.data; - } + }; ApiService.prototype.getName = function() { var funcNameRegex = /function (.{1,})\(/; @@ -1017,7 +981,7 @@ app.factory('BoardService', ["ApiService", "$http", "$q", function(ApiService, $ return deferred.promise; }; - service = new BoardService($http, 'boards', $q) + service = new BoardService($http, 'boards', $q); return service; }]); @@ -1036,7 +1000,7 @@ app.factory('CardService', ["ApiService", "$http", "$q", function(ApiService, $h deferred.reject('Error while update ' + self.endpoint); }); return deferred.promise; - } + }; CardService.prototype.rename = function(card) { var deferred = $q.defer(); @@ -1048,7 +1012,7 @@ app.factory('CardService', ["ApiService", "$http", "$q", function(ApiService, $h deferred.reject('Error while renaming ' + self.endpoint); }); return deferred.promise; - } + }; CardService.prototype.assignLabel = function(card, label) { var url = this.baseUrl + '/' + card + '/label/' + label; @@ -1060,7 +1024,7 @@ app.factory('CardService', ["ApiService", "$http", "$q", function(ApiService, $h deferred.reject('Error while update ' + self.endpoint); }); return deferred.promise; - } + }; CardService.prototype.removeLabel = function(card, label) { var url = this.baseUrl + '/' + card + '/label/' + label; var deferred = $q.defer(); @@ -1071,7 +1035,7 @@ app.factory('CardService', ["ApiService", "$http", "$q", function(ApiService, $h deferred.reject('Error while update ' + self.endpoint); }); return deferred.promise; - } + }; CardService.prototype.archive = function (card) { var deferred = $q.defer(); @@ -1097,7 +1061,7 @@ app.factory('CardService', ["ApiService", "$http", "$q", function(ApiService, $h }; - service = new CardService($http, 'cards', $q) + service = new CardService($http, 'cards', $q); return service; }]); app.factory('LabelService', ["ApiService", "$http", "$q", function(ApiService, $http, $q){ @@ -1105,7 +1069,7 @@ app.factory('LabelService', ["ApiService", "$http", "$q", function(ApiService, $ ApiService.call(this, $http, ep, $q); }; LabelService.prototype = angular.copy(ApiService.prototype); - service = new LabelService($http, 'labels', $q) + service = new LabelService($http, 'labels', $q); return service; }]); app.factory('StackService', ["ApiService", "$http", "$q", function(ApiService, $http, $q){ @@ -1113,7 +1077,6 @@ app.factory('StackService', ["ApiService", "$http", "$q", function(ApiService, $ ApiService.call(this, $http, ep, $q); }; StackService.prototype = angular.copy(ApiService.prototype); - StackService.prototype.dataFiltered = {}; StackService.prototype.fetchAll = function(boardId) { var deferred = $q.defer(); var self=this; @@ -1202,7 +1165,7 @@ app.factory('StatusService', function(){ this.title = ''; this.text = ''; this.counter = 0; - } + }; StatusService.prototype.setStatus = function($icon, $title, $text) { @@ -1210,7 +1173,7 @@ app.factory('StatusService', function(){ this.icon = $icon; this.title = $title; this.text = $text; - } + }; StatusService.prototype.setError = function($title, $text) { this.active = true; @@ -1218,7 +1181,7 @@ app.factory('StatusService', function(){ this.title = $title; this.text = $text; this.counter = 0; - } + }; StatusService.prototype.releaseWaiting = function() { if(this.counter>0) @@ -1227,7 +1190,7 @@ app.factory('StatusService', function(){ this.active = false; this.counter = 0; } - } + }; StatusService.prototype.retainWaiting = function() { this.active = true; @@ -1235,11 +1198,11 @@ app.factory('StatusService', function(){ this.title = ''; this.text = ''; this.counter++; - } + }; StatusService.prototype.unsetStatus = function() { this.active = false; - } + }; return { getInstance: function() { diff --git a/js/service/ApiService.js b/js/service/ApiService.js index f65dda515..6cfd58b30 100644 --- a/js/service/ApiService.js +++ b/js/service/ApiService.js @@ -46,7 +46,7 @@ app.factory('ApiService', function($http, $q){ }); return deferred.promise; - } + }; ApiService.prototype.fetchOne = function (id) { @@ -118,7 +118,7 @@ app.factory('ApiService', function($http, $q){ // methods for managing data ApiService.prototype.clear = function() { this.data = {}; - } + }; ApiService.prototype.add = function (entity) { var element = this.data[entity.id]; if(element===undefined) { @@ -145,7 +145,7 @@ app.factory('ApiService', function($http, $q){ ApiService.prototype.getCurrent = function () { return this.data[this.id]; - } + }; ApiService.prototype.getData = function() { return $.map(this.data, function(value, index) { @@ -155,7 +155,7 @@ app.factory('ApiService', function($http, $q){ ApiService.prototype.getAll = function () { return this.data; - } + }; ApiService.prototype.getName = function() { var funcNameRegex = /function (.{1,})\(/; diff --git a/js/service/BoardService.js b/js/service/BoardService.js index 73b39a5ea..9bafa26e9 100644 --- a/js/service/BoardService.js +++ b/js/service/BoardService.js @@ -100,7 +100,7 @@ app.factory('BoardService', function(ApiService, $http, $q){ return deferred.promise; }; - service = new BoardService($http, 'boards', $q) + service = new BoardService($http, 'boards', $q); return service; }); \ No newline at end of file diff --git a/js/service/CardService.js b/js/service/CardService.js index 58558c8e0..7de28a7a1 100644 --- a/js/service/CardService.js +++ b/js/service/CardService.js @@ -35,7 +35,7 @@ app.factory('CardService', function(ApiService, $http, $q){ deferred.reject('Error while update ' + self.endpoint); }); return deferred.promise; - } + }; CardService.prototype.rename = function(card) { var deferred = $q.defer(); @@ -47,7 +47,7 @@ app.factory('CardService', function(ApiService, $http, $q){ deferred.reject('Error while renaming ' + self.endpoint); }); return deferred.promise; - } + }; CardService.prototype.assignLabel = function(card, label) { var url = this.baseUrl + '/' + card + '/label/' + label; @@ -59,7 +59,7 @@ app.factory('CardService', function(ApiService, $http, $q){ deferred.reject('Error while update ' + self.endpoint); }); return deferred.promise; - } + }; CardService.prototype.removeLabel = function(card, label) { var url = this.baseUrl + '/' + card + '/label/' + label; var deferred = $q.defer(); @@ -70,7 +70,7 @@ app.factory('CardService', function(ApiService, $http, $q){ deferred.reject('Error while update ' + self.endpoint); }); return deferred.promise; - } + }; CardService.prototype.archive = function (card) { var deferred = $q.defer(); @@ -96,6 +96,6 @@ app.factory('CardService', function(ApiService, $http, $q){ }; - service = new CardService($http, 'cards', $q) + service = new CardService($http, 'cards', $q); return service; }); \ No newline at end of file diff --git a/js/service/LabelService.js b/js/service/LabelService.js index b3428a311..c116c1880 100644 --- a/js/service/LabelService.js +++ b/js/service/LabelService.js @@ -25,6 +25,6 @@ app.factory('LabelService', function(ApiService, $http, $q){ ApiService.call(this, $http, ep, $q); }; LabelService.prototype = angular.copy(ApiService.prototype); - service = new LabelService($http, 'labels', $q) + service = new LabelService($http, 'labels', $q); return service; }); \ No newline at end of file diff --git a/js/service/StackService.js b/js/service/StackService.js index 55468c690..3f4321c22 100644 --- a/js/service/StackService.js +++ b/js/service/StackService.js @@ -25,7 +25,6 @@ app.factory('StackService', function(ApiService, $http, $q){ ApiService.call(this, $http, ep, $q); }; StackService.prototype = angular.copy(ApiService.prototype); - StackService.prototype.dataFiltered = {}; StackService.prototype.fetchAll = function(boardId) { var deferred = $q.defer(); var self=this; diff --git a/js/service/StatusService.js b/js/service/StatusService.js index b4e218e6b..368747d77 100644 --- a/js/service/StatusService.js +++ b/js/service/StatusService.js @@ -28,7 +28,7 @@ app.factory('StatusService', function(){ this.title = ''; this.text = ''; this.counter = 0; - } + }; StatusService.prototype.setStatus = function($icon, $title, $text) { @@ -36,7 +36,7 @@ app.factory('StatusService', function(){ this.icon = $icon; this.title = $title; this.text = $text; - } + }; StatusService.prototype.setError = function($title, $text) { this.active = true; @@ -44,7 +44,7 @@ app.factory('StatusService', function(){ this.title = $title; this.text = $text; this.counter = 0; - } + }; StatusService.prototype.releaseWaiting = function() { if(this.counter>0) @@ -53,7 +53,7 @@ app.factory('StatusService', function(){ this.active = false; this.counter = 0; } - } + }; StatusService.prototype.retainWaiting = function() { this.active = true; @@ -61,11 +61,11 @@ app.factory('StatusService', function(){ this.title = ''; this.text = ''; this.counter++; - } + }; StatusService.prototype.unsetStatus = function() { this.active = false; - } + }; return { getInstance: function() {