summaryrefslogtreecommitdiff
path: root/lfpe.js
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2015-05-27 19:19:06 +0200
committerPatrick Simianer <p@simianer.de>2015-05-27 19:19:06 +0200
commit4e5ead06642714990b054ecf68f88b79dbd7b489 (patch)
treeabdc8976504d48533daced3001fecc9eb469388e /lfpe.js
parente820e38159390093cdcbf08b2f1a8b7eb0632278 (diff)
bits & pieces
Diffstat (limited to 'lfpe.js')
-rw-r--r--lfpe.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/lfpe.js b/lfpe.js
index bf7aa0e..c6cd97f 100644
--- a/lfpe.js
+++ b/lfpe.js
@@ -28,7 +28,7 @@ function Next()
url = "http://coltrane.cl.uni-heidelberg.de:60666/next";
var pe = document.getElementById("trgt").value;
if (pe != "") {
- var src = document.getElementById("src").value;
+ var src = document.getElementById("src_pp").value;
url += "?example="+src+" %7C%7C%7C "+pe;
}
document.getElementById("translating_status").style.display = "block";
@@ -47,10 +47,14 @@ function Next()
document.getElementById("next").innerHTML = "Thank you!";
document.getElementById("next").disabled = true;
} else {
- document.getElementById("src").value = x[0];
- document.getElementById("src").cols = x[0].length;
- document.getElementById("trgt").value = x[1];
- document.getElementById("trgt").cols = x[1].length;
+ document.getElementById("src_pp").value = x[0];
+ document.getElementById("src").value = x[2];
+ document.getElementById("src").rows = Math.round(x[2].length/80)+1;
+ var firstLetter = x[1][0].toUpperCase();
+ var rest = x[1].substring(1);
+ var t = firstLetter + rest;
+ document.getElementById("trgt").value = t;
+ document.getElementById("trgt").rows = Math.round(x[1].length/80)+1;
document.getElementById("translating_status").style.display = "none";
document.getElementById("trgt").focus();
document.getElementById("trgt").selectionStart = 0;