|
|
|
@@ -810,17 +810,21 @@ var repoAndOrgEN={ |
|
|
|
function page(current){ |
|
|
|
|
|
|
|
currentPage=current; |
|
|
|
startIndex = currentPage -1; |
|
|
|
if(startIndex < 1){ |
|
|
|
startIndex = 1; |
|
|
|
} |
|
|
|
endIndex = currentPage + 1; |
|
|
|
if(endIndex >= totalPage){ |
|
|
|
endIndex = totalPage; |
|
|
|
} |
|
|
|
doSearch(currentSearchTableName,currentSearchKeyword,current,pageSize,false,currentSearchSortBy,OnlySearchLabel); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
function nextPage(){ |
|
|
|
currentPage = currentPage+1; |
|
|
|
console.log("currentPage=" + currentPage); |
|
|
|
if(currentPage >= endIndex){ |
|
|
|
startIndex=startIndex+1; |
|
|
|
endIndex = endIndex +1; |
|
|
|
} |
|
|
|
|
|
|
|
page(currentPage); |
|
|
|
} |
|
|
|
|
|
|
|
@@ -828,10 +832,6 @@ function page(current){ |
|
|
|
console.log("currentPage=" + currentPage); |
|
|
|
if(currentPage > 1){ |
|
|
|
currentPage = currentPage-1; |
|
|
|
if(currentPage <= startIndex && startIndex > 1){ |
|
|
|
startIndex = startIndex -1; |
|
|
|
endIndex = endIndex - 1; |
|
|
|
} |
|
|
|
console.log("currentPage=" + (currentPage)); |
|
|
|
page(currentPage); |
|
|
|
} |
|
|
|
@@ -912,6 +912,11 @@ function getYPosition(e){ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (endIndex < totalPage-1){ |
|
|
|
html += "..."; |
|
|
|
html += "<a id=\"page_" + totalPage+ "\" class=\"item\" href=\"javascript:page(" + totalPage +")\">" + totalPage + "</a>"; |
|
|
|
} |
|
|
|
|
|
|
|
if(currentPage >=totalPage){ |
|
|
|
html += "<a class=\"disabled item navigation\" href=\"javascript:nextPage()\"><i class=\"icon right arrow\"></i></a>"; |
|
|
|
html += "<a class=\"disabled item navigation\" href=\"javascript:page(" + totalPage + ")\"><span class=\"navigation_label\">" + getLabel(isZh,"search_last_page") + "</span></a>"; |
|
|
|
|