Remove console output and add relative dates

This commit is contained in:
Julius Haertl
2016-10-28 11:59:31 +02:00
parent d8217edb82
commit 0191b000dc
6 changed files with 35 additions and 26 deletions

View File

@@ -53,19 +53,16 @@ app.factory('StackService', function(ApiService, $http, $q){
};
StackService.prototype.addCard = function(entity) {
console.log(this.data);
if(!this.data[entity.stackId].cards) {
this.data[entity.stackId].cards = [];
}
this.data[entity.stackId].cards.push(entity);
console.log(this.data);
};
StackService.prototype.reorder = function(entity, order) {
// assign new order
for(var i=0, j=0;i<this.data[entity.stackId].cards.length;i++) {
if(this.data[entity.stackId].cards[i].id === entity.id) {
console.log(this.data[entity.stackId].cards[i].title + " " + order);
this.data[entity.stackId].cards[i].order = order;
}
if(j === order) {