Fix label assignment issues

This commit is contained in:
Julius Haertl
2016-07-05 00:01:05 +02:00
parent 6feacc12a4
commit 68ff6571bd
6 changed files with 37 additions and 14 deletions

View File

@@ -4,7 +4,16 @@
#app-navigation .app-navigation-entry-edit { #app-navigation .app-navigation-entry-edit {
height: auto; height: auto;
} }
.board-bullet { #app-navigation .active,
#app-navigation .active a,
#app-navigation li:hover > a,
#app-navigation li:focus > a,
#app-navigation a:focus,
#app-navigation .selected,
#app-navigation .selected a {
background-color:#fafafa;
}
#app-navigation .board-bullet {
position: absolute; position: absolute;
margin-left: 17px; margin-left: 17px;
margin-top: 16px; margin-top: 16px;
@@ -31,6 +40,7 @@
top:-40px; top:-40px;
padding-top:40px; padding-top:40px;
z-index:100; z-index:100;
width:100%;
} }
#board #innerBoard { #board #innerBoard {
padding:10px; padding:10px;
@@ -419,12 +429,19 @@
} }
#boardlist { #boardlist {
width:100%;
height: 100%;
overflow: scroll;
} }
#boardlist td .board-bullet { #boardlist td .board-bullet {
width:30px; width:30px;
height:30px; height:30px;
margin-top: -15px; border: none;
border-radius: 50%;
position: relative;
cursor: pointer;
display: block;
} }
#boardlist td { #boardlist td {
padding:10px; padding:10px;
@@ -572,3 +589,11 @@ margin-bottom:2px; width:100%;
padding-right:10px; padding-right:10px;
width:100%; width:100%;
} }
@media (max-width: 480px) {
/* hide board actions on mobile */
#board-actions {
display:none !important;
}
}

View File

@@ -157,7 +157,7 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
CardService.update(card); CardService.update(card);
CardService.reorder(card, order).then(function(data) { CardService.reorder(card, order).then(function(data) {
StackService.data[newStack].cards = data; StackService.data[newStack].addCard(card);
}); });
}, },
orderChanged: function (event) { orderChanged: function (event) {

View File

@@ -38,8 +38,9 @@ app.controller('CardController', function ($scope, $rootScope, $routeParams, $lo
} }
$scope.labelAssign = function(element, model) { $scope.labelAssign = function(element, model) {
CardService.assignLabel($scope.cardId, element.id) CardService.assignLabel($scope.cardId, element.id);
var card = CardService.getCurrent();
StackService.updateCard(card);
} }
$scope.labelRemove = function(element, model) { $scope.labelRemove = function(element, model) {
CardService.removeLabel($scope.cardId, element.id) CardService.removeLabel($scope.cardId, element.id)

View File

@@ -259,7 +259,7 @@ app.controller('BoardController', ["$rootScope", "$scope", "$stateParams", "Stat
CardService.update(card); CardService.update(card);
CardService.reorder(card, order).then(function(data) { CardService.reorder(card, order).then(function(data) {
StackService.data[newStack].cards = data; StackService.data[newStack].addCard(card);
}); });
}, },
orderChanged: function (event) { orderChanged: function (event) {
@@ -334,8 +334,9 @@ app.controller('CardController', ["$scope", "$rootScope", "$routeParams", "$loca
} }
$scope.labelAssign = function(element, model) { $scope.labelAssign = function(element, model) {
CardService.assignLabel($scope.cardId, element.id) CardService.assignLabel($scope.cardId, element.id);
var card = CardService.getCurrent();
StackService.updateCard(card);
} }
$scope.labelRemove = function(element, model) { $scope.labelRemove = function(element, model) {
CardService.removeLabel($scope.cardId, element.id) CardService.removeLabel($scope.cardId, element.id)

View File

@@ -17,11 +17,7 @@
<td> <a href="#/board/{{b.id}}">{{ b.title }}</a></td> <td> <a href="#/board/{{b.id}}">{{ b.title }}</a></td>
<td> <td>
<div id="assigned-users"> <div id="assigned-users">
<div class="avatardiv" style="height: 30px; width: 30px; color: rgb(255, 255, 255); font-weight: normal; text-align: center; line-height: 30px; font-size: 17px; background-color: rgb(213, 231, 116);">D</div> <!--<div class="avatardiv" style="height: 30px; width: 30px; color: rgb(255, 255, 255); font-weight: normal; text-align: center; line-height: 30px; font-size: 17px; background-color: rgb(213, 231, 116);">D</div>//-->
<div class="avatardiv" style="height: 30px; width: 30px; color: rgb(255, 255, 255); font-weight: normal; text-align: center; line-height: 30px; font-size: 17px; background-color: rgb(213, 120, 220);">E</div>
<div class="avatardiv" style="height: 30px; width: 30px; color: rgb(255, 255, 255); font-weight: normal; text-align: center; line-height: 30px; font-size: 17px; background-color: rgb(120, 120, 220);">C</div>
<div class="avatardiv" style="height: 30px; width: 30px; color: rgb(255, 255, 255); font-weight: normal; text-align: center; line-height: 30px; font-size: 17px; background-color: rgb(120, 220, 220);">K</div>
<div class="avatardiv" style="height: 30px; width: 30px; color: rgb(255, 255, 255); font-weight: normal; text-align: center; line-height: 30px; font-size: 17px; background-color: rgb(220, 220, 220);">+</div>
</div> </div>
</td> </td>

View File

@@ -22,7 +22,7 @@
by <span>{{ cardservice.getCurrent().owner }}</span> by <span>{{ cardservice.getCurrent().owner }}</span>
</div> </div>
<ui-select multiple tagging tagging-label="(custom 'new' label)" ng-model="card.labels" theme="bootstrap" style="width:100%;" title="Choose a label" placeholder="Add a label" <ui-select multiple tagging="" ng-model="card.labels" theme="bootstrap" style="width:100%;" title="Choose a label" placeholder="Add a label"
on-select="labelAssign($item, $model)" on-remove="labelRemove($item, $model)"> on-select="labelAssign($item, $model)" on-remove="labelRemove($item, $model)">
<ui-select-match placeholder="Select labels..."><span class="select-label" style="background-color:#{{$item.color}}">{{$item.title}}</span></ui-select-match> <ui-select-match placeholder="Select labels..."><span class="select-label" style="background-color:#{{$item.color}}">{{$item.title}}</span></ui-select-match>
<ui-select-choices repeat="label in boardservice.getCurrent().labels | filter:$select.search"> <ui-select-choices repeat="label in boardservice.getCurrent().labels | filter:$select.search">