Skip to content

Commit

Permalink
Merge branch 'master' into prepare-0.3.0-beta1
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusknorr authored Dec 17, 2017
2 parents 66cfa72 + d33cce3 commit cd81192
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
6 changes: 4 additions & 2 deletions css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -353,14 +353,15 @@ input.input-inline {
.as-sortable-placeholder {
margin: 10px 10px 20px 10px;
border: 1px dashed $color-darkgrey;
min-height: 96px;

&:last-child {
margin: 10px;
}
}


ul {
> ul {
display: flex;
flex-direction: column;
}
Expand Down Expand Up @@ -664,8 +665,9 @@ input.input-inline {
.section-header {
border-bottom: 1px solid $color-lightgrey;
display: flex;
flex-shrink: 0;
margin-bottom: 5px;
margin-top: 20px;
margin-top: 10px;
h4 {
padding-top: 5px;
padding-bottom: 5px;
Expand Down
37 changes: 19 additions & 18 deletions js/controller/CardController.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,18 @@ app.controller('CardController', function ($scope, $rootScope, $routeParams, $lo
header.find('.save-indicator.saved').hide();
};
$interval(function() {
$scope.cardEditDescriptionAutosave = function() {
var currentTime = Date.now();
var timeSinceEdit = currentTime-$scope.status.lastEdit;
if (timeSinceEdit > 1000 && $scope.status.lastEdit > $scope.status.lastSave) {
$scope.status.lastSave = currentTime;
var header = $('.section-content.card-description');
header.find('.save-indicator.unsaved').fadeIn(500);
CardService.update(CardService.getCurrent()).then(function (data) {
header.find('.save-indicator.unsaved').hide();
header.find('.save-indicator.saved').fadeIn(250).fadeOut(1000);
});
}
};
var currentTime = Date.now();
var timeSinceEdit = currentTime-$scope.status.lastEdit;
if (timeSinceEdit > 1000 && $scope.status.lastEdit > $scope.status.lastSave) {
$scope.status.lastSave = currentTime;
var header = $('.section-header.card-description');
header.find('.save-indicator.unsaved').fadeIn(500);
CardService.update(CardService.getCurrent()).then(function (data) {
var header = $('.section-header.card-description');
header.find('.save-indicator.unsaved').hide();
header.find('.save-indicator.saved').fadeIn(250).fadeOut(1000);
});
}
}, 500);

// handle rename to update information on the board as well
Expand All @@ -95,18 +94,20 @@ app.controller('CardController', function ($scope, $rootScope, $routeParams, $lo
var header = $('.section-content.card-description');
header.find('.save-indicator.unsaved').hide();
header.find('.save-indicator.saved').fadeIn(500).fadeOut(1000);
StackService.updateCard(card);
});
StackService.updateCard(card);
};

$scope.labelAssign = function (element, model) {
CardService.assignLabel($scope.cardId, element.id);
var card = CardService.getCurrent();
StackService.updateCard(card);
CardService.assignLabel($scope.cardId, element.id).then(function (data) {
StackService.updateCard(CardService.getCurrent());
});
};

$scope.labelRemove = function (element, model) {
CardService.removeLabel($scope.cardId, element.id);
CardService.removeLabel($scope.cardId, element.id).then(function (data) {
StackService.updateCard(CardService.getCurrent());
});
};

$scope.setDuedate = function (duedate) {
Expand Down

0 comments on commit cd81192

Please sign in to comment.