Fix some code style issues
This commit is contained in:
@@ -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,})\(/;
|
||||
|
||||
@@ -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;
|
||||
|
||||
});
|
||||
@@ -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;
|
||||
});
|
||||
@@ -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;
|
||||
});
|
||||
@@ -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;
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user