summaryrefslogtreecommitdiff
path: root/htroot
diff options
context:
space:
mode:
authormikeworks <mikeworks@6c8d7289-2bf4-0310-a012-ef5d649a1542>2010-09-26 22:28:32 +0000
committermikeworks <mikeworks@6c8d7289-2bf4-0310-a012-ef5d649a1542>2010-09-26 22:28:32 +0000
commit190de644ddbd387e060d160d5e81e9c7d7fbec72 (patch)
tree9b214a8804177761852fbbe7eade1550d13cc5a0 /htroot
parentd5dc88a351368af74d8a31e4292a4a3b494da096 (diff)
de.lng: Added German translations for some missing table content on Network view
WatchWebStructure_p.html: Added JS verification of RGB color codes (currently only RGB value is checked but this could be enhanced to also check for websafe colors) git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7195 6c8d7289-2bf4-0310-a012-ef5d649a1542
Diffstat (limited to 'htroot')
-rw-r--r--htroot/WatchWebStructure_p.html2
-rw-r--r--htroot/js/WatchWebStructure.js35
-rw-r--r--htroot/proxymsg/error.html2
3 files changed, 37 insertions, 2 deletions
diff --git a/htroot/WatchWebStructure_p.html b/htroot/WatchWebStructure_p.html
index 077f64083..acee9b72d 100644
--- a/htroot/WatchWebStructure_p.html
+++ b/htroot/WatchWebStructure_p.html
@@ -35,7 +35,7 @@ To see a list of all APIs, please visit the <a href="http://www.yacy-websuche.de
<h2>Web Structure</h2>
<div id="left">
-<form action="/WatchWebStructure_p.html">
+<form action="/WatchWebStructure_p.html" onSubmit="return checkform(this);">
<fieldset>
<dl>
<dt>host</dt>
diff --git a/htroot/js/WatchWebStructure.js b/htroot/js/WatchWebStructure.js
index 9c9cb6d1a..7c9c6c8bd 100644
--- a/htroot/js/WatchWebStructure.js
+++ b/htroot/js/WatchWebStructure.js
@@ -5,4 +5,39 @@ function keydown(ev){
if(ev.which==13){
changeHost();
}
+}
+
+/* Check if the input matches some RGB hex values */
+function isValidColor(hexcolor) {
+ var strPattern = /^[0-9a-f]{3,6}$/i;
+ return strPattern.test(hexcolor);
+}
+
+function checkform(form) {
+ if (isValidColor(form.colorback.value)) {
+ if (isValidColor(form.colortext.value)) {
+ if (isValidColor(form.colorline.value)) {
+ if (isValidColor(form.colordot.value)) {
+ if (isValidColor(form.colorlineend.value)) {
+ return true;
+ } else {
+ alert("Invalid Dot-end value: " + form.colorlineend.value);
+ return false;
+ }
+ } else {
+ alert("Invalid Dot value: " + form.colordot.value);
+ return false;
+ }
+ } else {
+ alert("Invalid Line value: " + form.colorline.value);
+ return false;
+ }
+ } else {
+ alert("Invalid Text value: " + form.colortext.value);
+ return false;
+ }
+ } else {
+ alert("Invalid Background value: " + form.colorback.value);
+ return false;
+ }
} \ No newline at end of file
diff --git a/htroot/proxymsg/error.html b/htroot/proxymsg/error.html
index 2ccb15555..0f2c50229 100644
--- a/htroot/proxymsg/error.html
+++ b/htroot/proxymsg/error.html
@@ -23,7 +23,7 @@
#(printStackTrace)#::
<hr />
- <p class="tt error"><em>Exception occured</em>: <strong>#[exception]#</strong></p>
+ <p class="tt error"><em>Exception occurred</em>: <strong>#[exception]#</strong></p>
<pre class="tt error"><em>TRACE</em>:
#[stacktrace]#</pre>
#(/printStackTrace)#