v1.18.x
barisusakli 11 years ago
parent 3c5dd6a5e7
commit 5ddf70a671

@ -31,23 +31,29 @@ define(function() {
navigator.setCount(count); navigator.setCount(count);
navigator.update(); navigator.update();
navigator.show();
}; };
navigator.setCount = function(value) { navigator.setCount = function(value) {
count = value; count = parseInt(value, 10);
navigator.updateTextAndProgressBar(); navigator.updateTextAndProgressBar();
}; };
navigator.show = function() { navigator.show = function() {
$('.pagination-block').removeClass('hidden'); toggle(true);
}; };
navigator.hide = function() { navigator.hide = function() {
$('.pagination-block').addClass('hidden'); toggle(false);
}; };
function toggle(flag) {
$('.pagination-block').toggleClass('hidden', !flag);
}
navigator.update = function() { navigator.update = function() {
toggle(!!count);
$($(navigator.selector).get().reverse()).each(function() { $($(navigator.selector).get().reverse()).each(function() {
var el = $(this); var el = $(this);

Loading…
Cancel
Save