Commit a238bd47 authored by Valentin Hervieu's avatar Valentin Hervieu

Update demo site

parent 66430654
...@@ -95,6 +95,22 @@ app.controller('MainCtrl', function($scope, $rootScope, $timeout, $modal) { ...@@ -95,6 +95,22 @@ app.controller('MainCtrl', function($scope, $rootScope, $timeout, $modal) {
} }
}; };
//Slider with selection bar
$scope.color_slider_pointer = {
value: 12,
options: {
getPointerColor: function(value) {
if (value <= 3)
return 'red';
if (value <= 6)
return 'orange';
if (value <= 9)
return 'yellow';
return '#2AE02A';
}
}
};
//Slider config with floor, ceil and step //Slider config with floor, ceil and step
$scope.slider_floor_ceil = { $scope.slider_floor_ceil = {
value: 12, value: 12,
...@@ -105,6 +121,17 @@ app.controller('MainCtrl', function($scope, $rootScope, $timeout, $modal) { ...@@ -105,6 +121,17 @@ app.controller('MainCtrl', function($scope, $rootScope, $timeout, $modal) {
} }
}; };
//Slider config with rtl
$scope.slider_rtl = {
value: 20,
options: {
floor: 10,
ceil: 100,
step: 5,
rightToLeft: true
}
};
//Slider config with floating values //Slider config with floating values
$scope.slider_float = { $scope.slider_float = {
value: 0.5, value: 0.5,
...@@ -427,7 +454,8 @@ app.controller('MainCtrl', function($scope, $rootScope, $timeout, $modal) { ...@@ -427,7 +454,8 @@ app.controller('MainCtrl', function($scope, $rootScope, $timeout, $modal) {
readOnly: false, readOnly: false,
disabled: false, disabled: false,
showTicks: false, showTicks: false,
showTicksValues: false showTicksValues: false,
rightToLeft: false
} }
}; };
$scope.toggleHighValue = function() { $scope.toggleHighValue = function() {
......
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
</article> </article>
<article> <article>
<h2>Slider with dynamic selection bar colors</h2> <h2>Slider with dynamic selection bar color</h2>
<rzslider <rzslider
rz-slider-model="color_slider_bar.value" rz-slider-model="color_slider_bar.value"
rz-slider-options="color_slider_bar.options" rz-slider-options="color_slider_bar.options"
...@@ -117,6 +117,15 @@ ...@@ -117,6 +117,15 @@
<show-code js-file="color_slider_bar" html-file="singleSlider"></show-code> <show-code js-file="color_slider_bar" html-file="singleSlider"></show-code>
</article> </article>
<article>
<h2>Slider with dynamic pointer color</h2>
<rzslider
rz-slider-model="color_slider_pointer.value"
rz-slider-options="color_slider_pointer.options"
></rzslider>
<show-code js-file="color_slider_pointer" html-file="singleSlider"></show-code>
</article>
<article> <article>
<h2>Slider with custom floor/ceil/step</h2> <h2>Slider with custom floor/ceil/step</h2>
<rzslider <rzslider
...@@ -126,6 +135,15 @@ ...@@ -126,6 +135,15 @@
<show-code js-file="slider_floor_ceil" html-file="singleSlider"></show-code> <show-code js-file="slider_floor_ceil" html-file="singleSlider"></show-code>
</article> </article>
<article>
<h2>Right to left slider</h2>
<rzslider
rz-slider-model="slider_rtl.value"
rz-slider-options="slider_rtl.options"
></rzslider>
<show-code js-file="slider_rtl" html-file="singleSlider"></show-code>
</article>
<article> <article>
<h2>Slider with floating values</h2> <h2>Slider with floating values</h2>
<rzslider <rzslider
...@@ -361,7 +379,8 @@ ...@@ -361,7 +379,8 @@
<label>Show ticks values <input type="checkbox" <label>Show ticks values <input type="checkbox"
ng-model="slider_all_options.options.showTicksValues"></label><br/> ng-model="slider_all_options.options.showTicksValues"></label><br/>
<label>Disabled <input type="checkbox" ng-model="slider_all_options.options.disabled"></label><br/> <label>Disabled <input type="checkbox" ng-model="slider_all_options.options.disabled"></label><br/>
<label>Read-Only <input type="checkbox" ng-model="slider_all_options.options.readOnly"></label> <label>Read-Only <input type="checkbox" ng-model="slider_all_options.options.readOnly"></label><br/>
<label>Right to left <input type="checkbox" ng-model="slider_all_options.options.rightToLeft"></label>
</div> </div>
</div> </div>
<rzslider <rzslider
......
$scope.slider = {
value: 12,
options: {
showSelectionBar: true,
getPointerColor: function(value) {
if (value <= 3)
return 'red';
if (value <= 6)
return 'orange';
if (value <= 9)
return 'yellow';
return '#2AE02A';
}
}
};
$scope.slider = {
value: 20,
options: {
floor: 10,
ceil: 100,
step: 5,
rightToLeft: true
}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment