mirror of https://github.com/akveo/blur-admin
refactor(sliders): draw template for slider before they created
parent
23d1277bb0
commit
9c34dc5b0c
|
@ -1,7 +1,7 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div ba-panel ba-panel-title="Ion Range Slider" ba-panel-class="with-scroll">
|
<div ba-panel ba-panel-title="Ion Range Slider" ba-panel-class="with-scroll">
|
||||||
<div>
|
<div class="slider-box">
|
||||||
<h5>Basic</h5>
|
<h5>Basic</h5>
|
||||||
<ion-slider type="single"
|
<ion-slider type="single"
|
||||||
grid="false"
|
grid="false"
|
||||||
|
@ -9,10 +9,10 @@
|
||||||
max="100"
|
max="100"
|
||||||
from="45"
|
from="45"
|
||||||
disable="false"
|
disable="false"
|
||||||
timeout="2010">
|
timeout="150">
|
||||||
</ion-slider>
|
</ion-slider>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="slider-box">
|
||||||
<h5>With prefix</h5>
|
<h5>With prefix</h5>
|
||||||
<ion-slider type="single"
|
<ion-slider type="single"
|
||||||
grid="true"
|
grid="true"
|
||||||
|
@ -21,10 +21,10 @@
|
||||||
prefix="$"
|
prefix="$"
|
||||||
from="420"
|
from="420"
|
||||||
disable="false"
|
disable="false"
|
||||||
timeout="2010">
|
timeout="150">
|
||||||
</ion-slider>
|
</ion-slider>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="slider-box">
|
||||||
<h5>With postfix</h5>
|
<h5>With postfix</h5>
|
||||||
<ion-slider type="single"
|
<ion-slider type="single"
|
||||||
grid="true"
|
grid="true"
|
||||||
|
@ -33,10 +33,10 @@
|
||||||
postfix="°"
|
postfix="°"
|
||||||
from="36"
|
from="36"
|
||||||
disable="false"
|
disable="false"
|
||||||
timeout="2010">
|
timeout="150">
|
||||||
</ion-slider>
|
</ion-slider>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="slider-box">
|
||||||
<h5>Two way range</h5>
|
<h5>Two way range</h5>
|
||||||
<ion-slider type="double"
|
<ion-slider type="double"
|
||||||
grid="true"
|
grid="true"
|
||||||
|
@ -45,10 +45,10 @@
|
||||||
from="420"
|
from="420"
|
||||||
to="900"
|
to="900"
|
||||||
disable="false"
|
disable="false"
|
||||||
timeout="2010">
|
timeout="150">
|
||||||
</ion-slider>
|
</ion-slider>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="slider-box">
|
||||||
<h5>With Steps</h5>
|
<h5>With Steps</h5>
|
||||||
<ion-slider type="single"
|
<ion-slider type="single"
|
||||||
grid="true"
|
grid="true"
|
||||||
|
@ -57,10 +57,10 @@
|
||||||
from="300"
|
from="300"
|
||||||
step="50"
|
step="50"
|
||||||
disable="false"
|
disable="false"
|
||||||
timeout="2010">
|
timeout="150">
|
||||||
</ion-slider>
|
</ion-slider>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="slider-box">
|
||||||
<h5>Decorating numbers</h5>
|
<h5>Decorating numbers</h5>
|
||||||
<ion-slider type="single"
|
<ion-slider type="single"
|
||||||
grid="true"
|
grid="true"
|
||||||
|
@ -71,10 +71,10 @@
|
||||||
prettify-separator="."
|
prettify-separator="."
|
||||||
prettify="true"
|
prettify="true"
|
||||||
disable="false"
|
disable="false"
|
||||||
timeout="2010">
|
timeout="150">
|
||||||
</ion-slider>
|
</ion-slider>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="slider-box">
|
||||||
<h5>Using custom values array</h5>
|
<h5>Using custom values array</h5>
|
||||||
<ion-slider type="single"
|
<ion-slider type="single"
|
||||||
grid="true"
|
grid="true"
|
||||||
|
@ -85,10 +85,10 @@
|
||||||
'July', 'August', 'September',
|
'July', 'August', 'September',
|
||||||
'October', 'November', 'December']"
|
'October', 'November', 'December']"
|
||||||
disable="false"
|
disable="false"
|
||||||
timeout="2010">
|
timeout="150">
|
||||||
</ion-slider>
|
</ion-slider>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="slider-box">
|
||||||
<h5>Disabled</h5>
|
<h5>Disabled</h5>
|
||||||
<ion-slider type="single"
|
<ion-slider type="single"
|
||||||
grid="false"
|
grid="false"
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
max="100"
|
max="100"
|
||||||
from="45"
|
from="45"
|
||||||
disable="true"
|
disable="true"
|
||||||
timeout="2010">
|
timeout="150">
|
||||||
</ion-slider>
|
</ion-slider>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -61,33 +61,34 @@
|
||||||
onFinish: $scope.onFinish,
|
onFinish: $scope.onFinish,
|
||||||
values: $scope.values
|
values: $scope.values
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$scope.$watch('min', function (value) {
|
||||||
|
$timeout(function () {
|
||||||
|
$element.data("ionRangeSlider").update({min: value});
|
||||||
|
});
|
||||||
|
}, true);
|
||||||
|
$scope.$watch('max', function (value) {
|
||||||
|
$timeout(function () {
|
||||||
|
$element.data("ionRangeSlider").update({max: value});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$scope.$watch('from', function (value) {
|
||||||
|
$timeout(function () {
|
||||||
|
$element.data("ionRangeSlider").update({from: value});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$scope.$watch('to', function (value) {
|
||||||
|
$timeout(function () {
|
||||||
|
$element.data("ionRangeSlider").update({to: value});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$scope.$watch('disable', function (value) {
|
||||||
|
$timeout(function () {
|
||||||
|
$element.data("ionRangeSlider").update({disable: value});
|
||||||
|
});
|
||||||
|
});
|
||||||
}, timeout);
|
}, timeout);
|
||||||
})();
|
})();
|
||||||
$scope.$watch('min', function (value) {
|
|
||||||
$timeout(function () {
|
|
||||||
$element.data("ionRangeSlider").update({min: value});
|
|
||||||
});
|
|
||||||
}, true);
|
|
||||||
$scope.$watch('max', function (value) {
|
|
||||||
$timeout(function () {
|
|
||||||
$element.data("ionRangeSlider").update({max: value});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
$scope.$watch('from', function (value) {
|
|
||||||
$timeout(function () {
|
|
||||||
$element.data("ionRangeSlider").update({from: value});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
$scope.$watch('to', function (value) {
|
|
||||||
$timeout(function () {
|
|
||||||
$element.data("ionRangeSlider").update({to: value});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
$scope.$watch('disable', function (value) {
|
|
||||||
$timeout(function () {
|
|
||||||
$element.data("ionRangeSlider").update({disable: value});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
.slider-box{
|
||||||
|
min-height: 86px;
|
||||||
|
}
|
Loading…
Reference in New Issue