Edit D:\rfid\apache-tomcat-8.5.32\webapps\opac\js\solrpagination.js
; $(function() { var method = null; var maxpage = null; var pagesize = 10; var shownum = 10; /* * ?????????? * queryMethod ???????????????????????????????? page,pageSize ??ethod(page,pageSize); */ jQuery.solrpagination = function(solrBook, callMethod) { method = callMethod; var total = solrBook.foundnum; var currentpage = solrBook.page; pagesize = solrBook.pagesize; var totalpage = (total % pagesize == 0 ? total / pagesize : parseInt(total / pagesize) + 1); maxpage = totalpage; $(".paging-box .num").html("?????" + total + "??" + "/" + totalpage + "??"); var pageHtml = ""; if (currentpage > 1) { pageHtml += "<a href=\"javascript:;\" class=\"prevPage\">?????</a>"; $(".box-code-jump").show(); }else{ pageHtml += "<a href=\"javascript:return false;\" class=\"prevPage disabled\">?????</a>"; $(".box-code-jump").hide(); } /* ???10?? ????????*/ if (totalpage < (shownum + 2)) { for (var i = 0; i < totalpage; i++) { if ((i + 1) == currentpage) { pageHtml += "<span class=\"current\">" + (i + 1) + "</span>"; } else { pageHtml += "<a href=\"javascript:;\" class=\"tcdNumber\">" + (i + 1) + "</a>"; } } } else { var curshownum = 0; for (var i = 0; i < totalpage; i++) { if (currentpage <= (shownum - 3)) { if ((i + 1) == currentpage) { pageHtml += "<span class=\"current\">" + (i + 1) + "</span>"; } else { pageHtml += "<a href=\"javascript:;\" class=\"tcdNumber\">" + (i + 1) + "</a>"; if ((i + 1) == shownum) { pageHtml += "<span class=\"sufdoc\" title=\"??"+shownum+"??">...</span>"; i = totalpage - 2; } } }else if (currentpage >= (totalpage - shownum + 3)) { if ((i + 1) == currentpage) { pageHtml += "<span class=\"current\">" + (i + 1) + "</span>"; } else { pageHtml += "<a href=\"javascript:;\" class=\"tcdNumber\">" + (i + 1) + "</a>"; if ((i + 1) == 2) { pageHtml += "<span class=\"predoc\" title=\"??"+shownum+"??">...</span>"; i = totalpage - shownum; } } }else { if(curshownum <= shownum){ if ((i + 1) == currentpage) { pageHtml += "<span class=\"current\">" + (i + 1) + "</span>"; curshownum +=1; } else { pageHtml += "<a href=\"javascript:;\" class=\"tcdNumber\">" + (i + 1) + "</a>"; if ((i + 1) == 2) { pageHtml += "<span class=\"predoc\" title=\"??"+shownum+"??">...</span>"; i = currentpage - 4; } if ((i + 1) == currentpage + 2) { pageHtml += "<span class=\"sufdoc\" title=\"??"+shownum+"??">...</span>"; i = totalpage - 2; } curshownum +=1; } }else{ if(i == (totalpage - 2)){ pageHtml += "<span class=\"sufdoc\" title=\"??"+shownum+"??">...</span>"; pageHtml += "<a href=\"javascript:;\" class=\"tcdNumber\">" + totalpage + "</a>"; } } } } } if (currentpage < totalpage) { $(".box-code-jump").show(); pageHtml += "<a href=\"javascript:;\" class=\"nextPage\">?????</a>"; }else{ pageHtml += "<a href=\"javascript:return false;\" class=\"nextPage disabled\">?????</a>"; } $(".paging-box-code div").html(pageHtml); /*????????*/ $(".paging-box-code .prevPage").on("click", function() { var prevpage = parseInt($(".paging-box-code .current").html()) - 1; if (prevpage >= 1) { var func = eval(method); new func(prevpage,pagesize); } return false; }); /*????????*/ $(".paging-box-code .nextPage").on("click", function() { var nextpage = parseInt($(".paging-box-code .current").html()) + 1; if (nextpage <= maxpage) { var func = eval(method); new func(nextpage,pagesize); } return false; }); /*????????*/ $(".paging-box-code .tcdNumber").on("click",function(){ var clickpage = parseInt($(this).html()); if (clickpage >=1 && clickpage <= maxpage) { var func = eval(method); new func(clickpage,pagesize); } return false; }); /*???...??? */ $(".paging-box-code .predoc").on("click",function(){ var page = parseInt($(this).next().html()) - 8; if (page >=1 && page <= maxpage) { var func = eval(method); new func(page,pagesize); } return false; }); /*???...??? */ $(".paging-box-code .sufdoc").on("click",function(){ var page = parseInt($(this).prev().html()) + 4; if (page >=1 && page <= maxpage) { var func = eval(method); new func(page,pagesize); } return false; }); /* ??????????*/ $(".paging-box-code .turn").off("click").on("click",function(){ var turnpage = $(".paging-box-code input").val(); if(turnpage==null || $.trim(turnpage)=="" || isNaN(turnpage)){ return; }else{ var num = parseInt(turnpage); if(num>maxpage){ num = maxpage; } if(num<1){ num = 1; } $(".paging-box-code input").val(num); var func = eval(method); new func(num,pagesize); } return false; }); /* ????????? */ $(".paging-box-code input").off("keydown").on("keydown",function(e){ if(e.keyCode==13){ $(".paging-box-code .turn").trigger("click"); } }); }; });
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de