Moar work
This commit is contained in:
@@ -54,7 +54,19 @@ app.factory('CardService', function(ApiService, $http, $q){
|
||||
CardService.prototype.archive = function (card) {
|
||||
var deferred = $q.defer();
|
||||
var self = this;
|
||||
$http.put(this.baseUrl + '/' + card.id + '/archive').then(function (response) {
|
||||
$http.put(this.baseUrl + '/' + card.id + '/archive', {}).then(function (response) {
|
||||
deferred.resolve(response.data);
|
||||
}, function (error) {
|
||||
deferred.reject('Error while update ' + self.endpoint);
|
||||
});
|
||||
return deferred.promise;
|
||||
|
||||
};
|
||||
|
||||
CardService.prototype.unarchive = function (card) {
|
||||
var deferred = $q.defer();
|
||||
var self = this;
|
||||
$http.put(this.baseUrl + '/' + card.id + '/unarchive', {}).then(function (response) {
|
||||
deferred.resolve(response.data);
|
||||
}, function (error) {
|
||||
deferred.reject('Error while update ' + self.endpoint);
|
||||
|
||||
@@ -3,6 +3,7 @@ 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;
|
||||
@@ -50,6 +51,7 @@ app.factory('StackService', function(ApiService, $http, $q){
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
service = new StackService($http, 'stacks', $q);
|
||||
return service;
|
||||
});
|
||||
|
||||
@@ -3,8 +3,8 @@ app.factory('StatusService', function(){
|
||||
var StatusService = function() {
|
||||
this.active = true;
|
||||
this.icon = 'loading';
|
||||
this.title = 'Please wait';
|
||||
this.text = 'Es dauert noch einen kleinen Moment';
|
||||
this.title = '';
|
||||
this.text = '';
|
||||
this.counter = 0;
|
||||
}
|
||||
|
||||
@@ -36,8 +36,8 @@ app.factory('StatusService', function(){
|
||||
StatusService.prototype.retainWaiting = function() {
|
||||
this.active = true;
|
||||
this.icon = 'loading';
|
||||
this.title = 'Please wait';
|
||||
this.text = 'Es dauert noch einen kleinen Moment';
|
||||
this.title = '';
|
||||
this.text = '';
|
||||
this.counter++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user