UNPKG

my-test123

Version:
81 lines (80 loc) 3.63 kB
<div class="form-group"> <label class="col-sm-2 control-label" id="area_label"> Description </label> <div class="col-sm-10 detail-text-wrap" #detailWrapper [class.show-less]="!markdownViewExpanded"> <div class="col-sm-12 detail-text" #detailText *ngIf="loggedIn"> <div class="text-switcher"> <ul class="nav nav-tabs"> <li *ngIf="loggedIn && tabBarVisible" (click)="onClickMarkdownTab()" [ngClass]="{'active': textViewType === 'markdown'}"> <a class="view-switch-btn">Markdown</a> </li> <li *ngIf="loggedIn && tabBarVisible" (click)="onClickPreviewTab()" [ngClass]="{'active': textViewType === 'preview'}"> <a class="view-switch-btn">Preview</a> </li> </ul> </div> <div class="markdown-test-element detail-text-div-wrap" (click)="onClickMarkdownField()"> <div class="detail-text-div" [class.text-editable]="tabBarVisible" [class.text-not-found]="!textEditable && !markdownText"> <!-- The following condition for innerHTML might look little confusing. So, here is the explanation - If there is some text it should show up If there is none, then it should check if the text field is editable or not. If it's editable then it should stay empty as in the default value of text. If it's not editable and there is no text as well, it should show up the message 'Work item text.' --> <p almEditable [editable]="textEditable" #editTextPara (onUpdate)="onTextUpdate($event)" (keydown.enter)="onKeyEnter()" (keyup.enter)="$event.preventDefault()" class="text markdown-test-text" [hidden]="textViewType!='markdown'" [innerText]="markdownText"> </p> <div class="text-html-view" [innerHTML]="renderedText" [hidden]="textViewType!='preview'"> </div> <p *ngIf="!renderedText && !tabBarVisible && !markdownText">Add a Description</p> <div class="edit-icon"> <span class="pficon-edit markdown-test-btn-edit" (click)='onClickEditIcon()'></span> </div> </div> </div> </div> <div class="col-md-12 text" *ngIf="!loggedIn" [innerHTML]="renderedText"> </div> </div> <div class="col-sm-10 col-sm-offset-2 detail-text-action"> <span class="col-md-4"> <small *ngIf="loggedIn && tabBarVisible"> <!-- TODO: REALLY: we need to get this under control at last!! <img src="../../../../../assets/img/markdown-solid.png" class="markdown-mark" /> --> <b>Markdown Supported</b> </small> </span> <span *ngIf="showMore" (click)="toggleMarkdownViewExpanded()" [ngClass]="{'arrow-down': markdownViewExpanded === true, 'arrow-up': markdownViewExpanded === false}" class="btn btn-link show-more-state col-md-4"></span> <span class="col-md-4" [class.col-md-8]="!showMore"> <div *ngIf="loggedIn && tabBarVisible" class="fl btn btn-default btn-cancel pull-right detail-action-btn markdown-test-btn-cancel" (click)="onClickCancelIcon()"> <span class="fa fa-close"></span> </div> <div *ngIf="loggedIn && tabBarVisible" class="fl btn btn-primary pull-right detail-action-btn markdown-test-btn-save" (click)="onClickSaveIcon()"> <span class="fa fa-check"></span> </div> </span> </div> </div>