Skip to content

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

misc style bugfixes

Michael Peter Christen721178dc8469
diff --git a/htroot/env/templates/header.template b/htroot/env/templates/header.template
index b6ced3d6d..8e1bc06fc 100644
--- a/htroot/env/templates/header.template
+++ b/htroot/env/templates/header.template
@@ -73,7 +73,7 @@
<ul class="nav nav-sidebar menugroup">
<li><h3>Index&nbsp;Production</h3></li>
<li><a href="CrawlStartSite_p.html" class="MenuItemLink lock">Crawler / Harvester</a></li>
- <li><a href="Crawler_p.html" class="MenuItemLink lock">Creation Monitor</a></li>
+ <li><a href="Crawler_p.html" class="MenuItemLink lock">Crawler Monitor</a></li>
<li><a href="IndexControlURLs_p.html" class="MenuItemLink lock">Index Administration</a></li>
<li><a href="Blacklist_p.html" class="MenuItemLink lock">Filter &amp; Blacklists</a></li>
<li><a href="Vocabulary_p.html" class="MenuItemLink lock">Content Semantic</a></li>
diff --git a/htroot/js/yacysearch.js b/htroot/js/yacysearch.js
index e81416e22..c3994e009 100644
--- a/htroot/js/yacysearch.js
+++ b/htroot/js/yacysearch.js
@@ -16,7 +16,7 @@ function addHover() {
}
function fadeOutBar() {
- document.getElementById("progressbar").setAttribute('style',"transition:transform 0s;backgroundColor:transparent;");
+ document.getElementById("progressbar").setAttribute('style',"transition:transform 0s;-webkit-transition:-webkit-transform 0s;backgroundColor:transparent;");
}
function statistics(offset, itemscount, itemsperpage, totalcount, localResourceSize, remoteResourceSize, remoteIndexCount, remotePeerCount, navurlbase) {
@@ -34,45 +34,47 @@ function statistics(offset, itemscount, itemsperpage, totalcount, localResourceS
if (document.getElementById("progressbar").getAttribute('class') != "progress-bar progress-bar-success") {
var percent = 100 * (itemscount - offset + 1) / itemsperpage;
if (percent == 100) {
- document.getElementById("progressbar").setAttribute('style',"transition:transform 0s;");
+ document.getElementById("progressbar").setAttribute('style',"transition:transform 0s;-webkit-transition:-webkit-transform 0s;");
document.getElementById("progressbar").setAttribute('class',"progress-bar progress-bar-success");
window.setTimeout(fadeOutBar, 500);
}
document.getElementById("progressbar").setAttribute('style',"width:" + percent + "%");
}
-
- var resnav = "<ul class=\"pagination\">";
- thispage = Math.floor(offset / itemsperpage);
- if (thispage == 0) {
- resnav += "<li class=\"disabled\"><a href=\"#\">&laquo;</a></li>";
- } else {
- 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 += "<li class=\"active\"><a href=\"#\">";
- resnav += (i + 1);
- resnav += "</a></li>";
- } else {
- resnav += "<li><a href=\"";
- resnav += (navurlbase + "&amp;startRecord=" + (i * itemsperpage));
- resnav += "\">" + (i + 1) + "</a></li>";
- }
- }
- if (thispage >= numberofpages) {
- resnav += "<li><a href=\"#\">&raquo;</a></li>";
- } else {
- resnav += "<li><a id=\"nextpage\" href=\"";
- resnav += (navurlbase + "&amp;startRecord=" + ((thispage + 1) * itemsperpage));
- resnav += "\">&raquo;</a>";
+ var resnavElement = document.getElementById("resNav");
+ if (resnavElement != null) {
+ var resnav = "<ul class=\"pagination\">";
+ thispage = Math.floor(offset / itemsperpage);
+ if (thispage == 0) {
+ resnav += "<li class=\"disabled\"><a href=\"#\">&laquo;</a></li>";
+ } else {
+ 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 += "<li class=\"active\"><a href=\"#\">";
+ resnav += (i + 1);
+ resnav += "</a></li>";
+ } else {
+ resnav += "<li><a href=\"";
+ resnav += (navurlbase + "&amp;startRecord=" + (i * itemsperpage));
+ resnav += "\">" + (i + 1) + "</a></li>";
+ }
+ }
+ if (thispage >= numberofpages) {
+ resnav += "<li><a href=\"#\">&raquo;</a></li>";
+ } else {
+ resnav += "<li><a id=\"nextpage\" href=\"";
+ resnav += (navurlbase + "&amp;startRecord=" + ((thispage + 1) * itemsperpage));
+ resnav += "\">&raquo;</a>";
+ }
+ resnav += "</ul>";
+ resnavElement.innerHTML = resnav;
}
- resnav += "</ul>";
- document.getElementById("resNav").innerHTML = resnav;
}
diff --git a/htroot/yacysearch.html b/htroot/yacysearch.html
index a4daf9532..1b37a4a5a 100644
--- a/htroot/yacysearch.html
+++ b/htroot/yacysearch.html
@@ -85,7 +85,7 @@ To see a list of all APIs, please visit the <a href="http://www.yacy-websuche.de
<div class="row">
<div class="col-sm-8 col-sm-offset-4 col-md-9 col-md-offset-3 main">
-<form class="search small" action="" method="get" accept-charset="UTF-8" style="position:absolute;top:-48px;left:200;z-index:1052;max-width:500px;">
+<form class="search small" name="searchform" action="" method="get" accept-charset="UTF-8" style="position:absolute;top:-48px;left:200;z-index:1052;max-width:500px;">
<div class="input-group">
<input type="text" class="form-control searchinput typeahead" size="40" maxlength="200" placeholder="#(topmenu)##[promoteSearchPageGreeting]#::#[promoteSearchPageGreeting]##(/topmenu)#" name="query" value="#[former]#" onFocus="this.select()" id="search" onclick="document.getElementById('Enter').innerHTML = 'search'"/>
@@ -111,7 +111,7 @@ To see a list of all APIs, please visit the <a href="http://www.yacy-websuche.de
<input type="hidden" name="maximumRecords" value="#[count]#" />
<input type="hidden" name="startRecord" id="startRecord" value="0" />
<input type="hidden" name="verify" value="#[search.verify]#" />
- <input type="hidden" name="resource" value="#[resource]#" />
+ <input type="hidden" name="resource" id="resource" value="#[resource]#" />
<input type="hidden" name="nav" value="#[search.navigation]#" />
<input type="hidden" name="prefermaskfilter" value="#[prefermaskfilter]#" />
<input type="hidden" name="depth" value="#[depth]#" />
@@ -200,7 +200,6 @@ document.getElementById("Enter").innerHTML = "search again";
::
::
<span id="resNav" style="display: inline;"></span>
-</div>
::
#(/num-results)#
@@ -209,13 +208,6 @@ document.getElementById("Enter").innerHTML = "search again";
<div class="col-sm-4 col-md-3 sidebar" id="sidebar">
<!-- navigation begin -->
<!--#include virtual="yacysearchtrailer.html?eventID=#[eventID]#" -->
-<script type="text/javascript">
-//<![CDATA[
-$(function() {
- $("#sidebarTopics").tagcloud({type:"sphere",power:.25,seed:0,sizemin:10,sizemax:20,height:80,colormin:"682",colormax:"20C"}).find("li").tsort();
-});
-//]]>
-</script>
<!-- navigation end -->
</div> <!-- close sidebar -->
diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java
index b6c4a19f0..73224762b 100644
--- a/htroot/yacysearch.java
+++ b/htroot/yacysearch.java
@@ -157,7 +157,7 @@ public class yacysearch {
final boolean clustersearch = sb.isRobinsonMode() && sb.getConfig(SwitchboardConstants.CLUSTER_MODE, "").equals(SwitchboardConstants.CLUSTER_MODE_PUBLIC_CLUSTER);
final boolean indexReceiveGranted = sb.getConfigBool(SwitchboardConstants.INDEX_RECEIVE_ALLOW_SEARCH, true) || clustersearch;
boolean p2pmode = sb.peers != null && sb.peers.sizeConnected() > 0 && indexReceiveGranted;
- boolean global = post == null || (post.get("resource-switch", post.get("resource", "local")).equals("global") && p2pmode);
+ boolean global = post == null || (!post.get("resource-switch", post.get("resource", "global")).equals("local") && p2pmode);
boolean stealthmode = p2pmode && !global;
if ( post == null || indexSegment == null || env == null || !searchAllowed ) {
diff --git a/htroot/yacysearchtrailer.html b/htroot/yacysearchtrailer.html
index 874a4dea3..35b4c8610 100644
--- a/htroot/yacysearchtrailer.html
+++ b/htroot/yacysearchtrailer.html
@@ -1,7 +1,7 @@
<script>
if (document.getElementById("progressbar").getAttribute('class') != "progress-bar progress-bar-success") {
document.getElementById("progressbar").setAttribute('style',"width:100%");
- document.getElementById("progressbar").setAttribute('style',"transition:transform 0s;");
+ document.getElementById("progressbar").setAttribute('style',"transition:transform 0s;-webkit-transition:-webkit-transform 0s;");
document.getElementById("progressbar").setAttribute('class',"progress-bar progress-bar-success");
window.setTimeout(fadeOutBar, 500);
}
@@ -9,20 +9,26 @@
#(resource-select)#::
<form action="yacysearch.html" method="get" accept-charset="UTF-8">
-<input type="checkbox" name="resource-switch" value="local" data-size="large" style="width:100%" checked="checked" onchange="this.form.submit()">
-<script>$("[name='resource-switch']").bootstrapSwitch();
-$("[name='resource-switch']").bootstrapSwitch('onText', '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Peer-to-Peer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
-$("[name='resource-switch']").bootstrapSwitch('offText', '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stealth&nbsp;Mode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');</script>
+<input checked="checked"
+ data-label-text="Privacy"
+ data-on-text="<span style='padding:0 20px 0 20px;'>Peer-to-Peer</span>"
+ data-off-text="<span style='padding:0 20px 0 20px;'>Stealth&nbsp;Mode</span>"
+ type="checkbox" name="resource-switch" value="local" data-size="large" style="width:100%"
+ onchange="document.getElementById('resource').value='local';document.searchform.submit();">
+<script>$("[name='resource-switch']").bootstrapSwitch();</script>
</form>
<!--
<span>Your search is done using peers in the YaCy P2P network. You can switch to 'Stealth Mode' which will switch off P2P, giving you full privacy. Expect less results then, because then only your own search index is used.</span>
-->
::
<form action="yacysearch.html" method="get" accept-charset="UTF-8">
-<input type="checkbox" name="resource-switch" value="global" data-size="large" onchange="this.form.submit()">
-<script>$("[name='resource-switch']").bootstrapSwitch();
-$("[name='resource-switch']").bootstrapSwitch('onText', '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Peer-to-Peer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
-$("[name='resource-switch']").bootstrapSwitch('offText', '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stealth&nbsp;Mode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');</script>
+<input
+ data-label-text="Privacy"
+ data-on-text="<span style='padding:0 20px 0 20px';>Peer-to-Peer</span>"
+ data-off-text="<span style='padding:0 20px 0 20px;'>Stealth&nbsp;Mode</span>"
+ type="checkbox" name="resource-switch" value="global" data-size="large" style="width:100%"
+ onchange="document.getElementById('resource').value='global';document.searchform.submit();">
+<script>$("[name='resource-switch']").bootstrapSwitch();</script>
</form>
<!--
<span>Your search is done using only your own peer, locally. You can switch to 'Peer-to-Peer Mode' which will cause that your search is done using the other peers in the YaCy network.</span>
diff --git a/htroot/yacysearchtrailer.java b/htroot/yacysearchtrailer.java
index 3c0cebb33..e640d07df 100644
--- a/htroot/yacysearchtrailer.java
+++ b/htroot/yacysearchtrailer.java
@@ -61,6 +61,14 @@ public class yacysearchtrailer {
final Switchboard sb = (Switchboard) env;
final String eventID = post.get("eventID", "");
+ final boolean authorized = sb.verifyAuthentication(header);
+ final boolean clustersearch = sb.isRobinsonMode() && sb.getConfig(SwitchboardConstants.CLUSTER_MODE, "").equals(SwitchboardConstants.CLUSTER_MODE_PUBLIC_CLUSTER);
+ final boolean indexReceiveGranted = sb.getConfigBool(SwitchboardConstants.INDEX_RECEIVE_ALLOW_SEARCH, true) || clustersearch;
+ boolean p2pmode = sb.peers != null && sb.peers.sizeConnected() > 0 && indexReceiveGranted;
+ boolean global = post == null || (!post.get("resource-switch", post.get("resource", "global")).equals("local") && p2pmode);
+ boolean stealthmode = p2pmode && !global;
+ prop.put("resource-select", !authorized ? 0 : stealthmode ? 2 : global ? 1 : 0);
+
// find search event
final SearchEvent theSearch = SearchEventCache.getEvent(eventID);
if (theSearch == null) {
@@ -69,14 +77,6 @@ public class yacysearchtrailer {
}
final RequestHeader.FileType fileType = header.fileType();
- final boolean authorized = sb.verifyAuthentication(header);
- final boolean clustersearch = sb.isRobinsonMode() && sb.getConfig(SwitchboardConstants.CLUSTER_MODE, "").equals(SwitchboardConstants.CLUSTER_MODE_PUBLIC_CLUSTER);
- final boolean indexReceiveGranted = sb.getConfigBool(SwitchboardConstants.INDEX_RECEIVE_ALLOW_SEARCH, true) || clustersearch;
- boolean p2pmode = sb.peers != null && sb.peers.sizeConnected() > 0 && indexReceiveGranted;
- boolean global = post == null || (post.get("resource-switch", post.get("resource", "local")).equals("global") && p2pmode);
- boolean stealthmode = p2pmode && !global;
- prop.put("resource-select", !authorized ? 0 : stealthmode ? 2 : global ? 1 : 0);
-
// compose search navigation
// namespace navigators
diff --git a/locales/de.lng b/locales/de.lng
index de0d7c31f..6c14ef0e8 100644
--- a/locales/de.lng
+++ b/locales/de.lng
@@ -3877,7 +3877,7 @@ Integrated Search Configuration==Konfiguration der Integrierten Suche
### INDEX CONTROL ###
Index&nbsp;Production==Indexerzeugung
#Crawler / Harvester==Crawler / Harvester
-Creation Monitor==Crawler Überwachung
+Crawler Monitor==Crawler Überwachung
Index Administration==Indexverwaltung
Filter &amp; Blacklists==Filter &amp; Sperrlisten
Content Semantic==Inhalt Semantik
diff --git a/locales/ru.lng b/locales/ru.lng
index a5499220e..c226da71a 100644
--- a/locales/ru.lng
+++ b/locales/ru.lng
@@ -4142,7 +4142,7 @@ Integrated Search Configuration==Настройка интегрируемого
### INDEX CONTROL ###
Index&nbsp;Production==Индексирование
Crawler / Harvester==Индексирование / Сканер сети
-Creation Monitor==Монитор индексирования
+Crawler Monitor==Монитор индексирования
Index Administration==Администрирование индекса
Filter &amp; Blacklists==Фильтр и чёрный список
Content Semantic==Семантический контент
diff --git a/locales/uk.lng b/locales/uk.lng
index 14fb2ff46..c527a57ff 100644
--- a/locales/uk.lng
+++ b/locales/uk.lng
@@ -3540,7 +3540,7 @@ Peer Statistics::YaCy Statistics==Статистика::Статистика YaC
Computation==Обчислення
Tutorial==Підручник
Network Access==Мережа
-Creation Monitor==Створення
+Crawler Monitor==Створення
Crawler / Harvester==Сканер / Збирач
#-----------------------------