From e1ad2537b67eac931fb51ac03ae3c57c0ac01fa6 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 28 May 2014 13:13:29 -0400 Subject: [PATCH] fixes navigator progress bar --- public/src/modules/navigator.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/public/src/modules/navigator.js b/public/src/modules/navigator.js index 044a586c68..3c8baa6244 100644 --- a/public/src/modules/navigator.js +++ b/public/src/modules/navigator.js @@ -59,9 +59,6 @@ define(function() { if (elementInView(el)) { index = parseInt(el.attr('data-index'), 10) + 1; - if(index > count) { - index = count; - } navigator.updateTextAndProgressBar(); @@ -75,6 +72,7 @@ define(function() { }; navigator.updateTextAndProgressBar = function() { + index = index > count ? count : index; translator.translate('[[global:pagination.out_of, ' + index + ', ' + count + ']]', function(translated) { $('#pagination').html(translated); });