Skip to content

Commit 2912af8

Browse files
committed
Add slider widget
1 parent 3ad3ae5 commit 2912af8

File tree

5 files changed

+24
-0
lines changed

5 files changed

+24
-0
lines changed

app/router.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Router.map(function() {
1010
this.route('datepicker');
1111
this.route('progressBar');
1212
this.route('spinner');
13+
this.route('slider');
1314
});
1415

1516
export default Router;

app/styles/app.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,8 @@ nav li:first-of-type {
3232
line-height: 35px;
3333
text-align: center;
3434
}
35+
36+
.ui-slider {
37+
width: 50%;
38+
display: inline-block;
39+
}

app/templates/application.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<li>{{#link-to "datepicker"}}Datepicker{{/link-to}}</li>
44
<li>{{#link-to "progressBar"}}Progress Bar{{/link-to}}</li>
55
<li>{{#link-to "spinner"}}Spinner{{/link-to}}</li>
6+
<li>{{#link-to "slider"}}Slider{{/link-to}}</li>
67
</nav>
78

89
{{outlet}}

app/templates/slider.hbs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<h2>Basic Slider</h2>
2+
{{jqui-slider value=num min=0 max=100 step=10}} &nbsp; {{num}}
3+
<p>Just add <code>\{{jqui-slider value=num min=0 max=100 step=10}} \{{num}}</code> to any template in your application.</p>

tests/unit/routes/slider-test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import {
2+
moduleFor,
3+
test
4+
} from 'ember-qunit';
5+
6+
moduleFor('route:slider', 'SliderRoute', {
7+
// Specify the other units that are required for this test.
8+
// needs: ['controller:foo']
9+
});
10+
11+
test('it exists', function() {
12+
var route = this.subject();
13+
ok(route);
14+
});

0 commit comments

Comments
 (0)