Fix stack renaming, archived card adding

This commit is contained in:
Julius Haertl
2016-10-28 01:59:59 +02:00
parent 5e7f0a044d
commit 461269d7d2
6 changed files with 30 additions and 16 deletions

View File

@@ -197,7 +197,6 @@
.stack h2 input {
padding: 0px;
width: 80%;
padding-bottom: 3px;
margin: 0;
font-size: 12pt;
font-weight: 700;

View File

@@ -40,6 +40,10 @@ app.controller('ListController', function ($scope, $location, $filter, BoardServ
};
$scope.boardCreate = function () {
if(!$scope.newBoard.title || !$scope.newBoard.color) {
$scope.status.addBoard=false;
return;
}
BoardService.create($scope.newBoard)
.then(function (response) {
$scope.newBoard = {};
@@ -65,7 +69,6 @@ app.controller('ListController', function ($scope, $location, $filter, BoardServ
};
$scope.filterData = function () {
console.log("filter");
angular.copy($scope.boardservice.getData(), $scope.boardservice.sorted);
$scope.boardservice.sorted = $filter('orderBy')($scope.boardservice.sorted, 'title');
};

View File

@@ -422,6 +422,10 @@ app.controller('ListController', ["$scope", "$location", "$filter", "BoardServic
};
$scope.boardCreate = function () {
if(!$scope.newBoard.title || !$scope.newBoard.color) {
$scope.status.addBoard=false;
return;
}
BoardService.create($scope.newBoard)
.then(function (response) {
$scope.newBoard = {};
@@ -447,7 +451,6 @@ app.controller('ListController', ["$scope", "$location", "$filter", "BoardServic
};
$scope.filterData = function () {
console.log("filter");
angular.copy($scope.boardservice.getData(), $scope.boardservice.sorted);
$scope.boardservice.sorted = $filter('orderBy')($scope.boardservice.sorted, 'title');
};

View File

@@ -65,6 +65,4 @@ class Entity extends \OCP\AppFramework\Db\Entity {
return $this->_updatedFields;
}
}

View File

@@ -34,22 +34,34 @@ class Stack extends Entity implements JsonSerializable {
protected $boardId;
protected $cards = array();
protected $order;
public function __construct() {
$this->addType('id','integer');
$this->addType('boardId','integer');
$this->addType('order','integer');
}
public function setCards($cards) {
$this->cards = $cards;
}
public function jsonSerialize() {
if(!empty($this->cards)) {
return [
'id' => $this->id,
'title' => $this->title,
'order' => $this->order,
'boardId' => $this->boardId,
'cards' => $this->cards,
'cards' => $this->cards
];
} else {
return [
'id' => $this->id,
'title' => $this->title,
'order' => $this->order,
'boardId' => $this->boardId
];
}
}
}

View File

@@ -30,7 +30,6 @@
ng-blur="s.status.editStack=false" ng-model="s.title"
ng-if="s.status.editStack" autofocus-on-insert
required/>
</form>
<div class="stack-actions">
<button class="icon icon-confirm" ng-if="s.status.editStack"
@@ -99,7 +98,7 @@
</ul>
<!-- CREATE CARD //-->
<div class="card create"
style="background-color:#{{ boardservice.getCurrent().color }};" ng-if="checkCanEdit()">
style="background-color:#{{ boardservice.getCurrent().color }};" ng-if="checkCanEdit() && filter!=='archive'">
<form ng-submit="createCard(s.id, newCard.title)">
<h3 ng-if="s.status.addCard">
<input type="text" autofocus-on-insert