replaced old navbar with bootstrap pagination

pull/1/head
Michael Peter Christen 11 years ago
parent a25799f735
commit ed7ad2ef0a

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 B

@ -82,43 +82,37 @@ function statistics(offset, itemscount, itemsperpage, totalcount, localResourceS
document.getElementById("resNav").firstChild.nodeValue = "X";
// compose page navigation
resnav = "";
resnav = "<ul class=\"pagination\">";
thispage = Math.floor(offset / itemsperpage);
if (thispage == 0) {
resnav += ("<img src=\"env/grafics/navdl.gif\" alt=\"arrowleft\" width=\"16\" height=\"16\" />&nbsp;");
resnav += "<li class=\"disabled\"><a href=\"#\">&laquo;</a></li>";
} else {
resnav += ("<a id=\"prevpage\" href=\"");
resnav += (navurlbase + "&amp;startRecord=" + ((thispage - 1) * itemsperpage));
resnav += ("\"><img src=\"env/grafics/navdl.gif\" alt=\"arrowleft\" width=\"16\" height=\"16\" /></a>&nbsp;");
resnav += "<li><a id=\"prevpage\" href=\"";
resnav += (navurlbase + "&amp;startRecord=" + ((thispage - 1) * itemsperpage));
resnav += "\">&laquo;</a></li>";
}
numberofpages = Math.floor(Math.min(10, 1 + ((totalcount.replace(/\./g,'') - 1) / itemsperpage)));
if (!numberofpages) numberofpages = 10;
for (i = 0; i < numberofpages; i++) {
if (i == thispage) {
resnav += "<img src=\"env/grafics/navs";
resnav += "<li class=\"active\"><a href=\"#\">";
resnav += (i + 1);
resnav += (".gif\" alt=\"page");
resnav += (i + 1);
resnav += ("\" width=\"16\" height=\"16\" />&nbsp;");
resnav += "</a></li>";
} else {
resnav += ("<a href=\"");
resnav += "<li><a href=\"";
resnav += (navurlbase + "&amp;startRecord=" + (i * itemsperpage));
resnav += ("\"><img src=\"env/grafics/navd");
resnav += (i + 1);
resnav += (".gif\" alt=\"page");
resnav += (i + 1);
resnav += ("\" title=\"use the TAB key to navigate to next page\" width=\"16\" height=\"16\" /></a>&nbsp;");
resnav += "\">" + (i + 1) + "</a></li>";
}
}
if (thispage >= numberofpages) {
resnav += ("<img src=\"env/grafics/navdr.gif\" alt=\"arrowright\" title=\"use the TAB key to navigate to next page\" width=\"16\" height=\"16\" />");
resnav += "<li><a href=\"#\">&raquo;</a></li>";
} else {
resnav += ("<a id=\"nextpage\" href=\"");
resnav += "<li><a id=\"nextpage\" href=\"";
resnav += (navurlbase + "&amp;startRecord=" + ((thispage + 1) * itemsperpage));
resnav += ("\"><img src=\"env/grafics/navdr.gif\" alt=\"arrowright\" title=\"use the TAB key to navigate to next page\" width=\"16\" height=\"16\" /></a>");
resnav += "\">&raquo;</a>";
}
resnav += "</ul>";
document.getElementById("resNav").innerHTML = resnav;
}

@ -835,44 +835,38 @@ public class yacysearch {
// compose page navigation
final StringBuilder resnav = new StringBuilder(200);
resnav.append("<ul class=\"pagination\">");
final int thispage = startRecord / theQuery.itemsPerPage();
if ( thispage == 0 ) {
resnav
.append("<img src=\"env/grafics/navdl.gif\" alt=\"arrowleft\" width=\"16\" height=\"16\" />&nbsp;");
if (thispage == 0) {
resnav.append("<li class=\"disabled\"><a href=\"#\">&laquo;</a></li>");
} else {
resnav.append("<a id=\"prevpage\" href=\"");
resnav.append(QueryParams.navurl("html", thispage - 1, theQuery, null).toString());
resnav
.append("\"><img src=\"env/grafics/navdl.gif\" alt=\"arrowleft\" width=\"16\" height=\"16\" /></a>&nbsp;");
resnav.append("<li><a id=\"prevpage\" href=\"");
resnav.append(QueryParams.navurl("html", thispage - 1, theQuery, null).toString());
resnav.append("\">&laquo;</a></li>");
}
final int numberofpages = Math.min(10, 1 + ((theSearch.getResultCount() - 1) / theQuery.itemsPerPage()));
for ( int i = 0; i < numberofpages; i++ ) {
if ( i == thispage ) {
resnav.append("<img src=\"env/grafics/navs");
resnav.append(i + 1);
resnav.append(".gif\" alt=\"page");
resnav.append(i + 1);
resnav.append("\" width=\"16\" height=\"16\" />&nbsp;");
final int numberofpages = Math.min(10, 1 + ((theSearch.getResultCount() - 1) / theQuery.itemsPerPage()));
for (int i = 0; i < numberofpages; i++) {
if (i == thispage) {
resnav.append("<li class=\"active\"><a href=\"#\">");
resnav.append(i + 1);
resnav.append("</a></li>");
} else {
resnav.append("<a href=\"");
resnav.append(QueryParams.navurl("html", i, theQuery, null).toString());
resnav.append("\"><img src=\"env/grafics/navd");
resnav.append(i + 1);
resnav.append(".gif\" alt=\"page");
resnav.append(i + 1);
resnav.append("\" width=\"16\" height=\"16\" /></a>&nbsp;");
resnav.append("<li><a href=\"");
resnav.append(QueryParams.navurl("html", i, theQuery, null).toString());
resnav.append("\">" + (i + 1) + "</a></li>");
}
}
if ( thispage >= numberofpages ) {
resnav
.append("<img src=\"env/grafics/navdr.gif\" alt=\"arrowright\" width=\"16\" height=\"16\" />");
if (thispage >= numberofpages) {
resnav.append("<li><a href=\"#\">&raquo;</a></li>");
} else {
resnav.append("<a id=\"nextpage\" href=\"");
resnav.append("<li><a id=\"nextpage\" href=\"");
resnav.append(QueryParams.navurl("html", thispage + 1, theQuery, null).toString());
resnav.append("\"><img src=\"env/grafics/navdr.gif\" alt=\"arrowright\" width=\"16\" height=\"16\" /></a>");
resnav.append("\">&raquo;</a>");
}
resnav.append("</ul>");
final String resnavs = resnav.toString();
prop.put("num-results_resnav", resnavs);
prop.put("pageNavBottom", (theSearch.getResultCount() - startRecord > 6) ? 1 : 0); // if there are more results than may fit on the page we add a navigation at the bottom
prop.put("pageNavBottom_resnav", resnavs);

Loading…
Cancel
Save