From 95f4e4b0149866cb71876e5860ba7549ec3bd155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Sun, 17 Dec 2017 17:59:55 +0100 Subject: [PATCH 1/4] Update stack data after label update request has been processed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- js/controller/CardController.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/js/controller/CardController.js b/js/controller/CardController.js index 5c1c87e79..0ebb557fa 100644 --- a/js/controller/CardController.js +++ b/js/controller/CardController.js @@ -100,13 +100,15 @@ app.controller('CardController', function ($scope, $rootScope, $routeParams, $lo }; $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) { From d7da990a55ecfbaaa9740c332bd7bd2970ff9d39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Sun, 17 Dec 2017 18:00:16 +0100 Subject: [PATCH 2/4] Fix small styling bugs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- css/style.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/css/style.scss b/css/style.scss index 64dee423c..dcb76d4fc 100644 --- a/css/style.scss +++ b/css/style.scss @@ -353,6 +353,7 @@ input.input-inline { .as-sortable-placeholder { margin: 10px 10px 20px 10px; border: 1px dashed $color-darkgrey; + min-height: 96px; &:last-child { margin: 10px; @@ -360,7 +361,7 @@ input.input-inline { } - ul { + > ul { display: flex; flex-direction: column; } From 5ffef2fd3aac466f49cbb8814669874ec40573ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Sun, 17 Dec 2017 18:10:22 +0100 Subject: [PATCH 3/4] Fix section headers being shrinked MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- css/style.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/css/style.scss b/css/style.scss index dcb76d4fc..e228b4136 100644 --- a/css/style.scss +++ b/css/style.scss @@ -665,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; From d33cce3725a28d801fadef5b405ecd3e1b201e3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Sun, 17 Dec 2017 18:20:52 +0100 Subject: [PATCH 4/4] Fix remaining bug with save indicator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- js/controller/CardController.js | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/js/controller/CardController.js b/js/controller/CardController.js index 0ebb557fa..f4815f517 100644 --- a/js/controller/CardController.js +++ b/js/controller/CardController.js @@ -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 @@ -95,8 +94,8 @@ 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) {