Puts page switch parameters in alphabetic order to support S3 (#11960)

Signed-off-by: intelkevinputnam <intelkevinputnam@github.com>

Co-authored-by: intelkevinputnam <intelkevinputnam@github.com>
This commit is contained in:
Kevin Putnam 2022-06-24 02:59:10 -07:00 committed by GitHub
parent 30bd4a905e
commit f19b4c7ae4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -265,7 +265,7 @@ function addPagination(query, selectedVersion, currentPage, previousPage, nextPa
var $previous = $('<a>', {
'text': 'Previous',
'class': 'gs-cursor-page-previous',
'href': 'search.html?query=' + query + '&page=' + previousPage + '&version=' + selectedVersion
'href': 'search.html?page=' + previousPage + '&query=' + query + '&version=' + selectedVersion
});
$cursor.append($previous);
}
@ -274,7 +274,7 @@ function addPagination(query, selectedVersion, currentPage, previousPage, nextPa
for(var i = 0; i < pageList.length; i++) {
$page = $('<a>', {
'class': 'gs-cursor-page',
'href': 'search.html?query=' + query + '&page=' + pageList[i] + '&version=' + selectedVersion,
'href': 'search.html?page=' + pageList[i] + '&query=' + query + '&version=' + selectedVersion
'text': pageList[i]
});
if (currentPage === pageList[i]) {
@ -287,7 +287,7 @@ function addPagination(query, selectedVersion, currentPage, previousPage, nextPa
var $next = $('<a>', {
'text': 'Next',
'class': 'gs-cursor-page-next',
'href': 'search.html?query=' + query + '&page=' + nextPage + '&version=' + selectedVersion
'href': 'search.html?page=' + nextPage + '&query=' + query + '&version=' + selectedVersion
});
$cursor.append($next);
}