Create new class for inline-editable text

Signed-off-by: Marin Treselj <marin@pixelipo.com>
This commit is contained in:
Marin Treselj
2017-05-31 15:43:30 +02:00
parent e06a2ad743
commit 2f73f0492b
2 changed files with 12 additions and 11 deletions

View File

@@ -58,6 +58,9 @@ button.button-inline:hover {
display: flex !important; display: flex !important;
} }
.editable-inline {
cursor: text;
}
/** /**
* Navigation sidebar * Navigation sidebar
*/ */
@@ -248,20 +251,19 @@ button.button-inline:hover {
width: 100%; width: 100%;
} }
.stack h2 span {
white-space: normal;
overflow: hidden;
text-overflow: ellipsis;
}
.stack h2 button { .stack h2 button {
margin-left: auto; margin-left: auto;
display: flex; display: flex;
opacity: 0.25; opacity: 0.25;
} }
.stack h2 span { .stack h2:hover button {
white-space: normal;
overflow: hidden;
text-overflow: ellipsis;
cursor: text;
}
.stack h2:hover .stack-actions {
display: flex; display: flex;
} }

View File

@@ -35,12 +35,11 @@
data-columnindex="{{$index}}" id="column{{$index}}" data-columnindex="{{$index}}" id="column{{$index}}"
style=""> style="">
<h2 data-as-sortable-item-handle> <h2 data-as-sortable-item-handle>
<span 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)"> <form ng-if="s.status.editStack" ng-submit="stackservice.update(s)">
<input type="text" placeholder="Add a new stack" <input type="text" placeholder="Add a new stack"
ng-blur="stackservice.update(s); s.status.editStack=false" ng-model="s.title" ng-blur="stackservice.update(s); s.status.editStack=false" ng-model="s.title"
ng-if="s.status.editStack" autofocus-on-insert autofocus-on-insert required maxlength="100" />
required maxlength="100"/>
</form> </form>
<button class="icon-delete button-inline stack-actions" <button class="icon-delete button-inline stack-actions"
ng-if="!s.status.editStack" ng-if="!s.status.editStack"