Skip to content

Commit c6102f2

Browse files
committed
Add jqui-datepicker example
1 parent 20869a4 commit c6102f2

File tree

7 files changed

+43
-12
lines changed

7 files changed

+43
-12
lines changed

app/controllers/application.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
11
import Ember from 'ember';
22

33
export default Ember.ObjectController.extend({
4-
count: 0,
5-
text: function() {
6-
return "Clicked " + this.get('count') + " times.";
7-
}.property('count'),
8-
actions: {
9-
changeText: function() {
10-
this.incrementProperty('count');
11-
}
12-
}
134
});

app/controllers/button.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import Ember from 'ember';
2+
3+
export default Ember.ObjectController.extend({
4+
count: 0,
5+
text: function() {
6+
return "Clicked " + this.get('count') + " times.";
7+
}.property('count'),
8+
actions: {
9+
changeText: function() {
10+
this.incrementProperty('count');
11+
}
12+
}
13+
});

app/router.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ import Ember from 'ember';
22
import config from './config/environment';
33

44
var Router = Ember.Router.extend({
5-
location: config.locationType
5+
location: config.locationType
66
});
77

88
Router.map(function() {
9+
this.route('button');
10+
this.route('datepicker');
911
});
1012

1113
export default Router;

app/styles/app.css

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
11
html, body {
2-
margin: 20px;
2+
margin: 20px;
3+
}
4+
5+
nav {
6+
margin: 20px 0;
7+
}
8+
9+
nav li {
10+
display: inline-block;
11+
border-left: 1px solid #ccc;
12+
margin: 0;
13+
padding: 4px 10px;
14+
}
15+
16+
nav li:first-of-type {
17+
border-left-color: transparent;
318
}

app/templates/application.hbs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
{{#jqui-button icon="ui-icon-gear" action="changeText"}}Click me{{/jqui-button}} {{text}}
1+
<nav>
2+
<li>{{#link-to "button"}}Button{{/link-to}}</li>
3+
<li>{{#link-to "datepicker"}}Datepicker{{/link-to}}</li>
4+
</nav>
5+
6+
{{outlet}}

app/templates/button.hbs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<h2>Button</h2>
2+
3+
{{#jqui-button icon="ui-icon-gear" action="changeText"}}Click me{{/jqui-button}} {{text}}

app/templates/datepicker.hbs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<h2>Datepicker</h2>
2+
{{jqui-datepicker value=date2 yearRange="2013:2015"}} {{date2}}

0 commit comments

Comments
 (0)