Merge pull request #6256 from RoiEXLab/patch-1

Start reading progress at 0
This commit is contained in:
Andrew Rodrigues
2018-01-31 12:55:10 -05:00
committed by GitHub

View File

@@ -193,7 +193,7 @@ define('navigator', ['forum/pagination', 'components'], function (pagination, co
index = index > count ? count : index; index = index > count ? count : index;
var relIndex = getRelativeIndex(); var relIndex = getRelativeIndex();
$('.pagination-block .pagination-text').translateHtml('[[global:pagination.out_of, ' + relIndex + ', ' + count + ']]'); $('.pagination-block .pagination-text').translateHtml('[[global:pagination.out_of, ' + relIndex + ', ' + count + ']]');
var fraction = relIndex / count; var fraction = (relIndex - 1) / (count - 1 || 1);
$('.pagination-block meter').val(fraction); $('.pagination-block meter').val(fraction);
$('.pagination-block .progress-bar').width((fraction * 100) + '%'); $('.pagination-block .progress-bar').width((fraction * 100) + '%');
}; };