Skip to content

Commit 020c366

Browse files
author
Ihor Khomiak
committed
implement list header
1 parent 0437871 commit 020c366

File tree

2 files changed

+55
-27
lines changed

2 files changed

+55
-27
lines changed

app/components/list/list.component.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,11 @@
1717
.indicator-container {
1818
width: 100%;
1919
height: 100%;
20+
}
21+
22+
.header-label {
23+
color: #909da6;
24+
font-weight: bold;
25+
font-size: 9pt;
26+
vertical-align: center;
2027
}

app/components/list/list.component.html

Lines changed: 48 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,53 @@
11
<AbsoluteLayout class="main-container">
2-
<PullToRefresh (refresh)="reloadList($event)"
2+
<StackLayout class="main-container">
3+
<GridLayout height="15"
4+
columns="*, 80, 100, 80">
5+
<Label col="0"
6+
text="Quantity"
7+
textAlignment="center"
8+
class="header-label"></Label>
9+
<Label col="1"
10+
text="Date"
11+
textAlignment="center"
12+
class="header-label"></Label>
13+
<Label col="2"
14+
text="Tag"
15+
textAlignment="center"
16+
class="header-label"></Label>
17+
<Label col="3"
18+
text="Is Faforite"
19+
textAlignment="center"
20+
class="header-label"></Label>
21+
</GridLayout>
22+
<PullToRefresh (refresh)="reloadList($event)"
323
class="main-container">
4-
<ListView [items]="items"
5-
#list
6-
class="list-group">
7-
<ng-template let-item="item">
8-
<GridLayout row="0"
9-
columns="*, 80, 100, 80">
10-
<Label [nsRouterLink]="['/cost', item.id]"
11-
[text]="item.quantity"
12-
class="list-group-item"
13-
col="0"></Label>
14-
<Label [nsRouterLink]="['/cost', item.id]"
15-
[text]="getDateValue(item)"
16-
class="list-group-item-date"
17-
col="1"></Label>
18-
<Label [nsRouterLink]="['/cost', item.id]"
19-
[text]="item.type"
20-
class="tag-item"
21-
col="2"></Label>
22-
<Label [nsRouterLink]="['/cost', item.id]"
23-
[text]="item.isFavorite === true ? 'Favorite' : 'Not Favorite'"
24-
class="list-group-item-favorite"
25-
col="3"></Label>
26-
</GridLayout>
27-
</ng-template>
28-
</ListView>
29-
</PullToRefresh>
24+
<ListView [items]="items"
25+
#list
26+
class="list-group">
27+
<ng-template let-item="item">
28+
<GridLayout row="0"
29+
columns="*, 80, 100, 80">
30+
<Label [nsRouterLink]="['/cost', item.id]"
31+
[text]="item.quantity"
32+
class="list-group-item"
33+
col="0"></Label>
34+
<Label [nsRouterLink]="['/cost', item.id]"
35+
[text]="getDateValue(item)"
36+
class="list-group-item-date"
37+
col="1"></Label>
38+
<Label [nsRouterLink]="['/cost', item.id]"
39+
[text]="item.type"
40+
class="tag-item"
41+
col="2"></Label>
42+
<Label [nsRouterLink]="['/cost', item.id]"
43+
[text]="item.isFavorite === true ? 'Favorite' : 'Not Favorite'"
44+
class="list-group-item-favorite"
45+
col="3"></Label>
46+
</GridLayout>
47+
</ng-template>
48+
</ListView>
49+
</PullToRefresh>
50+
</StackLayout>
3051
<StackLayout verticalAlignment="center"
3152
class="indicator-container">
3253
<ActivityIndicator [busy]="isLoading"

0 commit comments

Comments
 (0)