Files
alfresco-ng2-components/ng2-components/ng2-alfresco-core/src/components/view/adf-card-view-textitem.component.html
Popovics András 66a60acac7 [ADF-112] Change task details feature (due date) (#2071)
* Add Assignee to readonly mode

* Style adoption and first steps to editable mode

* Switch between mode coverage

* Rebase fix

* Because of design and requirement changes, revert unnecessary parts

* Small refactoring before the introduction of CardViewDateItem

* Fix AdfCardView tests

* Editable Card date item

* Do not allow edit on task details after the task is completed.

* Update task details request

* Login footer switch fix

* Login customisable copyright text

* Card text item (first sketches)

* Small fix for supported card items' template

* Dynamic component loading for card view items

* Test and linting fixes

* Updating Readme.md

* Update Readme.md

* Fix Readme.md errors

* CardViewTextItemComponent tests

* Rebase fix
2017-07-13 15:49:21 +01:00

39 lines
2.1 KiB
HTML

<div class="adf-property-label">{{ property.label }}</div>
<div class="adf-property-value">
<span *ngIf="!isEditble()">
<span [attr.data-automation-id]="'card-textitem-value-' + property.key">{{ property.displayValue }}</span>
</span>
<span *ngIf="isEditble()">
<div *ngIf="!inEdit" (click)="setEditMode(true)" class="adf-textitem-readonly" [attr.data-automation-id]="'card-textitem-edit-toggle-' + property.key">
<span [attr.data-automation-id]="'card-textitem-value-' + property.key">{{ property.displayValue }}</span>
<md-icon [attr.data-automation-id]="'card-textitem-edit-icon-' + property.key" class="adf-textitem-icon">create</md-icon>
</div>
<div *ngIf="inEdit" class="adf-textitem-editable">
<md-input-container floatPlaceholder="never" class="adf-input-container">
<input *ngIf="!property.multiline" #editorInput
mdInput
class="adf-input"
[placeholder]="property.default"
[(ngModel)]="editedValue"
[attr.data-automation-id]="'card-textitem-editinput-' + property.key">
<textarea *ngIf="property.multiline" #editorInput
mdInput
mdTextareaAutosize
mdAutosizeMaxRows="1"
mdAutosizeMaxRows="5"
class="adf-textarea"
[placeholder]="property.default"
[(ngModel)]="editedValue"
[attr.data-automation-id]="'card-textitem-edittextarea-' + property.key"></textarea>
</md-input-container>
<md-icon
class="adf-textitem-icon adf-update-icon"
(click)="update()"
[attr.data-automation-id]="'card-textitem-update-' + property.key">done</md-icon>
<md-icon
class="adf-textitem-icon adf-reset-icon"
(click)="reset()"
[attr.data-automation-id]="'card-textitem-reset-' + property.key">clear</md-icon>
</div>
</span>
</div>