Skip to content

Commit

Permalink
Merge pull request #592 from nextcloud/251-card-title-inline
Browse files Browse the repository at this point in the history
editable inline card titles
  • Loading branch information
juliushaertl committed Aug 24, 2018
2 parents abb5290 + d17d0ec commit 939f5fa
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
12 changes: 12 additions & 0 deletions css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* @author Artem Anufrij <artem.anufrij@live.de>
* @author Marin Treselj <marin@pixelipo.com>
* @author Oskar Kurz <oskar.kurz@gmail.com>
* @author Ryan Fletcher <ryan.fletcher@codepassion.ca>
*
* @license GNU AGPL version 3 or any later version
*
Expand Down Expand Up @@ -513,6 +514,17 @@ input.input-inline {
margin: 0 5px;
overflow: hidden;
text-overflow: ellipsis;

span {
padding: 6px 0;
padding-top: 7px;
display: block;
}

input {
width: 100%;
margin: 0;
}
}

.labels {
Expand Down
17 changes: 15 additions & 2 deletions templates/part.board.mainView.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
data-columnindex="{{$index}}" id="column{{$index}}"
style="">
<h3 data-as-sortable-item-handle>
<span class="editable-inline" ng-show="!s.status.editStack" ng-click="s.status.editStack=true">{{ s.title }}</span>
<span class="editable-inline"
ng-show="!s.status.editStack"
ng-click="s.status.editStack=true">{{ s.title }}</span>

<form ng-if="s.status.editStack" ng-submit="stackservice.update(s); s.status.editStack=false">
<input type="text" placeholder="<?php p($l->t('Add a new stack')); ?>"
ng-blur="stackservice.update(s); s.status.editStack=false" ng-model="s.title"
Expand All @@ -67,7 +70,17 @@
</div>
<div data-as-sortable-item-handle>
<div class="card-upper">
<h4>{{ cardservice.get(c.id).title }}</h4>
<h4>
<span class="editable-inline"
ng-show="!c.status.editCard"
ng-click="c.status.editCard=true">{{cardservice.get(c.id).title}}</span>

<form ng-if="c.status.editCard" ng-submit="cardservice.update(c); c.status.editCard=false">
<input class="input-inline" type="text" placeholder="<?php p($l->t('Add a new card')); ?>"
ng-blur="cardservice.update(c); c.status.editCard=false" ng-model="c.title"
autofocus-on-insert required maxlength="100" />
</form>
</h4>
<ul class="labels">
<li ng-repeat="label in cardservice.get(c.id).labels"
ng-style="labelStyle(label.color)" title="{{ label.title }}">
Expand Down

0 comments on commit 939f5fa

Please sign in to comment.