Fix archived card editing
This commit is contained in:
@@ -19,6 +19,20 @@ app.controller('CardController', function ($scope, $rootScope, $routeParams, $lo
|
|||||||
}, function(error) {
|
}, function(error) {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$scope.cardRenameShow = function() {
|
||||||
|
if($scope.archived)
|
||||||
|
return false;
|
||||||
|
else {
|
||||||
|
$scope.status.cardRename=true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
$scope.cardEditDescriptionShow = function() {
|
||||||
|
if($scope.archived)
|
||||||
|
return false;
|
||||||
|
else {
|
||||||
|
$scope.status.cardEditDescription=true;
|
||||||
|
}
|
||||||
|
};
|
||||||
// handle rename to update information on the board as well
|
// handle rename to update information on the board as well
|
||||||
$scope.cardRename = function(card) {
|
$scope.cardRename = function(card) {
|
||||||
CardService.rename(card).then(function(data) {
|
CardService.rename(card).then(function(data) {
|
||||||
@@ -31,10 +45,6 @@ app.controller('CardController', function ($scope, $rootScope, $routeParams, $lo
|
|||||||
$scope.status.description = false;
|
$scope.status.description = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.cardEditDescription = function() {
|
|
||||||
$scope.status.cardEditDescription = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
$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();
|
var card = CardService.getCurrent();
|
||||||
|
|||||||
@@ -362,6 +362,20 @@ app.controller('CardController', ["$scope", "$rootScope", "$routeParams", "$loca
|
|||||||
}, function(error) {
|
}, function(error) {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$scope.cardRenameShow = function() {
|
||||||
|
if($scope.archived)
|
||||||
|
return false;
|
||||||
|
else {
|
||||||
|
$scope.status.cardRename=true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
$scope.cardEditDescriptionShow = function() {
|
||||||
|
if($scope.archived)
|
||||||
|
return false;
|
||||||
|
else {
|
||||||
|
$scope.status.cardEditDescription=true;
|
||||||
|
}
|
||||||
|
};
|
||||||
// handle rename to update information on the board as well
|
// handle rename to update information on the board as well
|
||||||
$scope.cardRename = function(card) {
|
$scope.cardRename = function(card) {
|
||||||
CardService.rename(card).then(function(data) {
|
CardService.rename(card).then(function(data) {
|
||||||
@@ -374,10 +388,6 @@ app.controller('CardController', ["$scope", "$rootScope", "$routeParams", "$loca
|
|||||||
$scope.status.description = false;
|
$scope.status.description = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.cardEditDescription = function() {
|
|
||||||
$scope.status.cardEditDescription = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
$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();
|
var card = CardService.getCurrent();
|
||||||
|
|||||||
@@ -8,15 +8,15 @@
|
|||||||
<div id="card-header">
|
<div id="card-header">
|
||||||
<a class="icon-close" ui-sref="board" ng-click="sidebar.show=!sidebar.show"> </a>
|
<a class="icon-close" ui-sref="board" ng-click="sidebar.show=!sidebar.show"> </a>
|
||||||
<h2>
|
<h2>
|
||||||
<form ng-submit="cardRename(cardservice.getCurrent())">
|
|
||||||
<!-- TODO: change to textarea elastic //-->
|
<!-- TODO: change to textarea elastic //-->
|
||||||
|
<form ng-submit="cardRename(cardservice.getCurrent())">
|
||||||
<input class="input-inline" type="text" ng-if="status.cardRename"
|
<input class="input-inline" type="text" ng-if="status.cardRename"
|
||||||
ng-model="cardservice.getCurrent().title"
|
ng-model="cardservice.getCurrent().title"
|
||||||
ng-blur="cardRename(cardservice.getCurrent())"
|
ng-blur="cardRename(cardservice.getCurrent())"
|
||||||
autofocus-on-insert required>
|
autofocus-on-insert required>
|
||||||
</form>
|
</form>
|
||||||
<div ng-click="status.cardRename=true" ng-show="!status.cardRename">{{
|
<div ng-click="cardRenameShow()" ng-show="!status.cardRename">
|
||||||
cardservice.getCurrent().title }}
|
{{ cardservice.getCurrent().title }}
|
||||||
</div>
|
</div>
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
style="width:100%;" title="Choose a label"
|
style="width:100%;" title="Choose a label"
|
||||||
placeholder="Add a label"
|
placeholder="Add a label"
|
||||||
on-select="labelAssign($item, $model)"
|
on-select="labelAssign($item, $model)"
|
||||||
on-remove="labelRemove($item, $model)">
|
on-remove="labelRemove($item, $model)" ng-disabled="archived">
|
||||||
<ui-select-match placeholder="Select labels..."><span
|
<ui-select-match placeholder="Select labels..."><span
|
||||||
class="select-label"
|
class="select-label"
|
||||||
style="background-color:#{{$item.color}}">{{$item.title}}</span>
|
style="background-color:#{{$item.color}}">{{$item.title}}</span>
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
title="Choose a user to assign"
|
title="Choose a user to assign"
|
||||||
placeholder="Assign users ..."
|
placeholder="Assign users ..."
|
||||||
on-select="userAssign($item, $model)"
|
on-select="userAssign($item, $model)"
|
||||||
on-remove="userRemove($item, $model)">
|
on-remove="userRemove($item, $model)" ng-disabled="archived">
|
||||||
<ui-select-match placeholder="Select users...">{{$item.title}}
|
<ui-select-match placeholder="Select users...">{{$item.title}}
|
||||||
</ui-select-match>
|
</ui-select-match>
|
||||||
<ui-select-choices
|
<ui-select-choices
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
ng-blur="cardUpdate(cardservice.getCurrent())"
|
ng-blur="cardUpdate(cardservice.getCurrent())"
|
||||||
ng-model="cardservice.getCurrent().description"
|
ng-model="cardservice.getCurrent().description"
|
||||||
autofocus-on-insert> </textarea>
|
autofocus-on-insert> </textarea>
|
||||||
<div class="container" ng-click="cardEditDescription()"
|
<div class="container" ng-click="cardEditDescriptionShow()"
|
||||||
ng-show="!status.cardEditDescription" ng-animate>
|
ng-show="!status.cardEditDescription" ng-animate>
|
||||||
<div ng-bind-html="cardservice.getCurrent().description | markdown"
|
<div ng-bind-html="cardservice.getCurrent().description | markdown"
|
||||||
id="markdown"></div>
|
id="markdown"></div>
|
||||||
|
|||||||
Reference in New Issue
Block a user