Skip to content

Commit 0426e09

Browse files
committed
Slider fixes
1 parent 2912af8 commit 0426e09

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

app/controllers/slider.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import Ember from 'ember';
2+
3+
export default Ember.ObjectController.extend({
4+
num: 50,
5+
vals: [10, 90]
6+
});

app/templates/slider.hbs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
<h2>Basic Slider</h2>
22
{{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>
3+
<p>Just add <code>\{{jqui-slider value=num min=0 max=100 step=10}} \{{num}}</code> to any template in your application.</p>
4+
5+
<h2>Range Slider</h2>
6+
{{jqui-slider values=vals min=0 max=100 step=10 range=true}} &nbsp; {{vals.firstObject}} - {{vals.lastObject}}
7+
<p>Just add <code>\{{jqui-slider values=vals min=0 max=100 step=10 range=true}} \{{vals.firstObject}} - \{{vals.lastObject}}</code> to any template in your application.</p>

tests/unit/controllers/slider-test.js

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

0 commit comments

Comments
 (0)