refactor(sliders): fix onload bug

pull/3/head
alex 9 years ago
parent 3ca2ba9bb1
commit 346a500765

@ -8,8 +8,7 @@
min="0"
max="100"
from="45"
disable="false"
timeout="350">
disable="false">
</ion-slider>
</div>
<div class="slider-box">
@ -20,8 +19,7 @@
max="1200"
prefix="$"
from="420"
disable="false"
timeout="350">
disable="false">
</ion-slider>
</div>
<div class="slider-box">
@ -32,8 +30,7 @@
max="90"
postfix="°"
from="36"
disable="false"
timeout="350">
disable="false">
</ion-slider>
</div>
<div class="slider-box">
@ -44,8 +41,7 @@
max="1200"
from="420"
to="900"
disable="false"
timeout="350">
disable="false">
</ion-slider>
</div>
<div class="slider-box">
@ -56,8 +52,7 @@
max="1000"
from="300"
step="50"
disable="false"
timeout="350">
disable="false">
</ion-slider>
</div>
<div class="slider-box">
@ -70,8 +65,7 @@
step="1000"
prettify-separator="."
prettify="true"
disable="false"
timeout="350">
disable="false">
</ion-slider>
</div>
<div class="slider-box">
@ -84,8 +78,7 @@
'April', 'May', 'June',
'July', 'August', 'September',
'October', 'November', 'December']"
disable="false"
timeout="350">
disable="false">
</ion-slider>
</div>
<div class="slider-box">
@ -95,8 +88,7 @@
min="0"
max="100"
from="45"
disable="true"
timeout="350">
disable="true">
</ion-slider>
</div>
</div>

@ -21,7 +21,7 @@
});
},
template: function(el, attrs) {
var res = '<div class="panel {{panelType}} invisible ' + (attrs.baPanelClass || '') + '" zoom-in ba-panel-blur>';
var res = '<div class="panel {{panelType}} full-invisible ' + (attrs.baPanelClass || '') + '" zoom-in ba-panel-blur>';
res += baPanel.template(el, attrs);
res += '</div>';
return res;

@ -37,9 +37,6 @@
timeout: '@'
},
link: function ($scope, $element) {
(function init() {
var timeout = $scope.timeout || 0;
$timeout(function(){
$element.ionRangeSlider({
min: $scope.min,
max: $scope.max,
@ -87,8 +84,6 @@
$element.data("ionRangeSlider").update({disable: value});
});
});
}, timeout);
})();
}
};
}

@ -19,7 +19,7 @@
}
$timeout(function () {
elem.removeClass('invisible');
elem.removeClass('full-invisible');
elem.addClass('animated zoomIn');
}, delay);
}

@ -176,3 +176,10 @@ a {
display: inline-block;
}
}
.full-invisible {
visibility: hidden!important;
* {
visibility: hidden!important;
}
}
Loading…
Cancel
Save