-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore basic and compound example, add a new one to showcase trackBy…
… usage
- Loading branch information
1 parent
a196c47
commit 00e7e3d
Showing
9 changed files
with
367 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
159 changes: 159 additions & 0 deletions
159
src/app/list/basic-list/example/list-polling-example.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
<div class="padding-15"> | ||
<div class="row"> | ||
<div class="col-sm-12"> | ||
<div class="form-group"> | ||
<pfng-list id="myList" | ||
[actionTemplate]="actionTemplate" | ||
[config]="listConfig" | ||
[expandTemplate]="expandTemplate" | ||
[items]="items" | ||
[itemTemplate]="itemTemplate" | ||
[trackBy]="trackByIndex" | ||
(onActionSelect)="handleAction($event, null)" | ||
(onClick)="handleClick($event)" | ||
(onDblClick)="handleDblClick($event)" | ||
(onSelectionChange)="handleSelectionChange($event)"> | ||
<ng-template #itemTemplate let-item="item" let-index="index"> | ||
<div class="list-pf-left"> | ||
<span class="fa {{item.typeIcon}} list-pf-icon list-pf-icon-bordered list-pf-icon-small"></span> | ||
</div> | ||
<div class="list-pf-content-wrapper"> | ||
<div class="list-pf-main-content"> | ||
<div class="list-pf-title">{{item.name}}</div> | ||
<div class="list-pf-description text-overflow-pf">{{item.address}}</div> | ||
</div> | ||
<div class="list-pf-additional-content"> | ||
<div> | ||
<span class="pficon pficon-screen"></span> | ||
<strong>{{item.hostCount}}</strong> Hosts | ||
</div> | ||
<div> | ||
<span class="pficon pficon-cluster"></span> | ||
<strong>{{item.clusterCount}}</strong> Clusters | ||
</div> | ||
<div> | ||
<span class="pficon pficon-container-node"></span> | ||
<strong>{{item.nodeCount}}</strong> Nodes | ||
</div> | ||
<div> | ||
<span class="pficon pficon-image"></span> | ||
<strong>{{item.imageCount}}</strong> Images | ||
</div> | ||
</div> | ||
</div> | ||
</ng-template> | ||
<ng-template #actionTemplate let-item="item" let-index="index"> | ||
<pfng-action class="list-pf-actions" | ||
[config]="actionConfig" | ||
(onActionSelect)="handleAction($event, item)"> | ||
</pfng-action> | ||
</ng-template> | ||
<ng-template #expandTemplate let-item="item" let-index="index"> | ||
<p>This should stay open while the list updates.</p> | ||
<basic-content [item]="item"></basic-content> | ||
</ng-template> | ||
</pfng-list> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="row padding-top-10"> | ||
<div class="col-sm-12"> | ||
<h4 class="actions-label">Settings</h4> | ||
<hr/> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-sm-12"> | ||
<form role="form"> | ||
<div class="form-group"> | ||
<label class="radio-inline"> | ||
<input id="selectType1" name="selectType" type="radio" | ||
[(ngModel)]="selectType" value="checkbox" (ngModelChange)="updateSelectionType()">Checkbox | ||
</label> | ||
<label class="radio-inline"> | ||
<input id="selectType2" name="selectType" type="radio" | ||
[(ngModel)]="selectType" value="radio" (ngModelChange)="updateSelectionType()">Radio Button | ||
</label> | ||
<label class="radio-inline"> | ||
<input id="selectType3" name="selectType" type="radio" | ||
[(ngModel)]="selectType" value="row" (ngModelChange)="updateSelectionType()">Row | ||
</label> | ||
<label class="radio-inline"> | ||
<input id="selectType4" name="selectType" type="radio" | ||
[(ngModel)]="selectType" value="none" (ngModelChange)="updateSelectionType()">None | ||
</label> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-sm-12"> | ||
<form role="form"> | ||
<div class="form-group"> | ||
<label class="checkbox-inline"> | ||
<input id="dblClick" name="dblClick" type="checkbox" | ||
[(ngModel)]="listConfig.dblClick" | ||
(ngModelChange)="listConfig.multiSelect = false">Double Click | ||
</label> | ||
<label class="checkbox-inline"> | ||
<input id="multiSelect" name="multiSelect" type="checkbox" | ||
[(ngModel)]="listConfig.multiSelect" | ||
[disabled]="listConfig.dblClick">Multi Select | ||
</label> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-sm-12"> | ||
<form role="form"> | ||
<div class="form-group"> | ||
<label class="checkbox-inline"> | ||
<input id="useExpandingRows" name="useExpandingRows" type="checkbox" | ||
[(ngModel)]="listConfig.useExpandItems">Simple Expansion | ||
</label> | ||
<label class="checkbox-inline"> | ||
<input id="itemsAvailable" name="itemsAvailable" type="checkbox" | ||
[(ngModel)]="itemsAvailable" | ||
(ngModelChange)="updateItemsAvailable()">Items Available | ||
</label> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-sm-12"> | ||
<button (click)="resetItems()">Reset items</button> | ||
</div> | ||
</div> | ||
<div class="row padding-top-10"> | ||
<div class="col-sm-12"> | ||
<h4 class="actions-label">Actions</h4> | ||
<hr/> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-sm-12"> | ||
<textarea rows="3" class="col-sm-12">{{actionsText}}</textarea> | ||
</div> | ||
</div> | ||
<div class="row padding-top-10"> | ||
<div class="col-sm-12"> | ||
<h4>Code</h4> | ||
<hr/> | ||
</div> | ||
</div> | ||
<div> | ||
<tabset> | ||
<tab heading="api"> | ||
<iframe class="demoframe" src="docs/classes/listcomponent.html"></iframe> | ||
</tab> | ||
<tab heading="html"> | ||
<include-content src="src/app/list/basic-list/example/list-basic-example.component.html"></include-content> | ||
</tab> | ||
<tab heading="typescript"> | ||
<include-content src="src/app/list/basic-list/example/list-basic-example.component.ts"></include-content> | ||
</tab> | ||
</tabset> | ||
</div> | ||
</div> |
Oops, something went wrong.