Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

replaced old navbar with bootstrap pagination

Michael Peter Christened7ad2ef0ae1
diff --git a/htroot/env/grafics/navd0.gif b/htroot/env/grafics/navd0.gif
deleted file mode 100644
index 41881b9ac..000000000
Binary files a/htroot/env/grafics/navd0.gif and /dev/null differ
diff --git a/htroot/env/grafics/navd1.gif b/htroot/env/grafics/navd1.gif
deleted file mode 100644
index 2ec8b8e84..000000000
Binary files a/htroot/env/grafics/navd1.gif and /dev/null differ
diff --git a/htroot/env/grafics/navd10.gif b/htroot/env/grafics/navd10.gif
deleted file mode 100644
index 945f9175f..000000000
Binary files a/htroot/env/grafics/navd10.gif and /dev/null differ
diff --git a/htroot/env/grafics/navd2.gif b/htroot/env/grafics/navd2.gif
deleted file mode 100644
index 7a21a9144..000000000
Binary files a/htroot/env/grafics/navd2.gif and /dev/null differ
diff --git a/htroot/env/grafics/navd3.gif b/htroot/env/grafics/navd3.gif
deleted file mode 100644
index 27121154c..000000000
Binary files a/htroot/env/grafics/navd3.gif and /dev/null differ
diff --git a/htroot/env/grafics/navd4.gif b/htroot/env/grafics/navd4.gif
deleted file mode 100644
index 5c3145598..000000000
Binary files a/htroot/env/grafics/navd4.gif and /dev/null differ
diff --git a/htroot/env/grafics/navd5.gif b/htroot/env/grafics/navd5.gif
deleted file mode 100644
index 6d607b561..000000000
Binary files a/htroot/env/grafics/navd5.gif and /dev/null differ
diff --git a/htroot/env/grafics/navd6.gif b/htroot/env/grafics/navd6.gif
deleted file mode 100644
index bdc6bafce..000000000
Binary files a/htroot/env/grafics/navd6.gif and /dev/null differ
diff --git a/htroot/env/grafics/navd7.gif b/htroot/env/grafics/navd7.gif
deleted file mode 100644
index 3f7e6dae1..000000000
Binary files a/htroot/env/grafics/navd7.gif and /dev/null differ
diff --git a/htroot/env/grafics/navd8.gif b/htroot/env/grafics/navd8.gif
deleted file mode 100644
index f2d5603d8..000000000
Binary files a/htroot/env/grafics/navd8.gif and /dev/null differ
diff --git a/htroot/env/grafics/navd9.gif b/htroot/env/grafics/navd9.gif
deleted file mode 100644
index 755490532..000000000
Binary files a/htroot/env/grafics/navd9.gif and /dev/null differ
diff --git a/htroot/env/grafics/navdb.gif b/htroot/env/grafics/navdb.gif
deleted file mode 100644
index bedf451ff..000000000
Binary files a/htroot/env/grafics/navdb.gif and /dev/null differ
diff --git a/htroot/env/grafics/navs0.gif b/htroot/env/grafics/navs0.gif
deleted file mode 100644
index f66228b74..000000000
Binary files a/htroot/env/grafics/navs0.gif and /dev/null differ
diff --git a/htroot/env/grafics/navs1.gif b/htroot/env/grafics/navs1.gif
deleted file mode 100644
index c8a5b34bf..000000000
Binary files a/htroot/env/grafics/navs1.gif and /dev/null differ
diff --git a/htroot/env/grafics/navs10.gif b/htroot/env/grafics/navs10.gif
deleted file mode 100644
index ce7999cda..000000000
Binary files a/htroot/env/grafics/navs10.gif and /dev/null differ
diff --git a/htroot/env/grafics/navs2.gif b/htroot/env/grafics/navs2.gif
deleted file mode 100644
index a4303af96..000000000
Binary files a/htroot/env/grafics/navs2.gif and /dev/null differ
diff --git a/htroot/env/grafics/navs3.gif b/htroot/env/grafics/navs3.gif
deleted file mode 100644
index 4a1484550..000000000
Binary files a/htroot/env/grafics/navs3.gif and /dev/null differ
diff --git a/htroot/env/grafics/navs4.gif b/htroot/env/grafics/navs4.gif
deleted file mode 100644
index d81cc1553..000000000
Binary files a/htroot/env/grafics/navs4.gif and /dev/null differ
diff --git a/htroot/env/grafics/navs5.gif b/htroot/env/grafics/navs5.gif
deleted file mode 100644
index 70740e81e..000000000
Binary files a/htroot/env/grafics/navs5.gif and /dev/null differ
diff --git a/htroot/env/grafics/navs6.gif b/htroot/env/grafics/navs6.gif
deleted file mode 100644
index cbf10c8a3..000000000
Binary files a/htroot/env/grafics/navs6.gif and /dev/null differ
diff --git a/htroot/env/grafics/navs7.gif b/htroot/env/grafics/navs7.gif
deleted file mode 100644
index 18c87d927..000000000
Binary files a/htroot/env/grafics/navs7.gif and /dev/null differ
diff --git a/htroot/env/grafics/navs8.gif b/htroot/env/grafics/navs8.gif
deleted file mode 100644
index 06b2cac20..000000000
Binary files a/htroot/env/grafics/navs8.gif and /dev/null differ
diff --git a/htroot/env/grafics/navs9.gif b/htroot/env/grafics/navs9.gif
deleted file mode 100644
index c35c29b0c..000000000
Binary files a/htroot/env/grafics/navs9.gif and /dev/null differ
diff --git a/htroot/env/grafics/navsa.gif b/htroot/env/grafics/navsa.gif
deleted file mode 100644
index dce7a9e62..000000000
Binary files a/htroot/env/grafics/navsa.gif and /dev/null differ
diff --git a/htroot/env/grafics/navsb.gif b/htroot/env/grafics/navsb.gif
deleted file mode 100644
index 527242d58..000000000
Binary files a/htroot/env/grafics/navsb.gif and /dev/null differ
diff --git a/htroot/js/yacysearch.js b/htroot/js/yacysearch.js
index dd9e03f8e..0e36fe6cf 100644
--- a/htroot/js/yacysearch.js
+++ b/htroot/js/yacysearch.js
@@ -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;
}
diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java
index ac839a73a..1a55c868a 100644
--- a/htroot/yacysearch.java
+++ b/htroot/yacysearch.java
@@ -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);