Skip to content

Commit 48c2b2d

Browse files
author
Joey Arnold
committed
ionList basic components working
1 parent e282bec commit 48c2b2d

File tree

5 files changed

+15
-26
lines changed

5 files changed

+15
-26
lines changed

.meteor/versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ iron:router@1.0.9
5252
iron:url@1.0.9
5353
jandres:ionic@0.1.24
5454
jandres:mutation-summary@0.0.1
55-
jandres:template-children@0.0.3
55+
jandres:template-children@0.0.4
5656
jquery@1.11.4
5757
launch-screen@1.0.4
5858
livedata@1.0.15

client/templates/index/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ <h1 class="title">Meteor Ionic</h1>
103103
{{/ionItemContent}}
104104
{{/ionItem}}
105105

106-
{{#ionItem path="slideBox"}}
107-
{{#ionItemContent class="item-icon-left item-icon-right"}}
106+
{{#ionItem path="slideBox" class="item-icon-left item-icon-right"}}
107+
{{#ionItemContent}}
108108
{{> ionIcon icon="ios-checkmark" class="positive"}}
109109
Slide Box
110110
{{> ionIcon icon="ios-arrow-right"}}

client/templates/lists/lists-sortable.html

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,13 @@
55
{{#contentFor "headerTitle"}}
66
<h1 class="title">Lists</h1>
77
{{/contentFor}}
8+
{{#contentFor "headerButtonRight"}}
9+
<button class="button button-clear" id="button-reorder">Reorder</button>
10+
{{/contentFor}}
811

912
{{#ionView}}
1013
{{#ionContent}}
11-
<li class="item item-toggle">
12-
Sortable
13-
<label class="toggle">
14-
<input type="checkbox" id="sortable-checkbox">
15-
<div class="track">
16-
<div class="handle"></div>
17-
</div>
18-
</label>
19-
</li>
20-
{{#ionList ionSortable=sortable onReorder=onReorder showDelete=deletable}}
14+
{{#ionList onReorder=onReorder showDelete=deletable showReorder=sortable canSwipe=true}}
2115
{{#each times}}
2216
{{#ionItem class="item-button-right item-avatar-right" index=this}}
2317
{{#ionItemContent}}
@@ -36,6 +30,7 @@ <h2>John Smith {{..}}</h2>
3630
{{/ionItemOptions}}
3731

3832
{{#ionDeleteButton class="ion-minus-circled"}}{{/ionDeleteButton}}
33+
{{#ionReorderButton class="ion-navicon"}}{{/ionReorderButton}}
3934
{{/ionItem}}
4035
{{/each}}
4136
{{/ionList}}

client/templates/lists/lists-sortable.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Template.listsSortable.onCreated(function(){
77

88
Template.listsSortable.onRendered(function(){
99
$("#button-delete").click(() => this.deletable.set(!this.deletable.get()));
10+
$("#button-reorder").click(() => this.sortable.set(!this.sortable.get()));
1011
});
1112

1213
Template.listsSortable.helpers({
@@ -31,11 +32,4 @@ Template.listsSortable.helpers({
3132
deletable: function () {
3233
return Template.instance().deletable.get();
3334
}
34-
});
35-
36-
Template.listsSortable.events({
37-
"change #sortable-checkbox": function(e, template) {
38-
let sortable = e.target.checked;
39-
template.sortable.set(sortable);
40-
}
4135
});

client/templates/lists/lists.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ <h1 class="title">Lists</h1>
1515

1616
{{#each times}}
1717
{{#ionItem buttonRight=true avatar=true index=this}}
18-
<img src="https://randomuser.me/api/portraits/thumb/men/27.jpg">
19-
<h2>John Smith {{{this}}}</h2>
20-
<p>
21-
(555) 555-1212
22-
</p>
23-
<button class="button button-positive">{{> ionIcon icon="ios-telephone"}}</button>
18+
{{#ionItemContent}}
19+
<img src="https://randomuser.me/api/portraits/thumb/men/27.jpg">
20+
<h2>John Smith {{{..}}}</h2>
21+
<p>(555) 555-1212</p>
22+
<button class="button button-positive">{{> ionIcon icon="ios-telephone"}}</button>
23+
{{/ionItemContent}}
2424
{{/ionItem}}
2525
{{/each}}
2626

0 commit comments

Comments
 (0)