From 7c179958222b95939ff1881a49126e08a38d489e Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Fri, 11 Dec 2015 16:42:43 +0100 Subject: minor js cleanup --- js/lfpe.js | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) (limited to 'js') diff --git a/js/lfpe.js b/js/lfpe.js index 154e813..4c7dc72 100644 --- a/js/lfpe.js +++ b/js/lfpe.js @@ -95,7 +95,6 @@ function working() } // show 'working' message - //status.style.display = "block"; $("#status").fadeToggle(); // disable button and textarea @@ -108,7 +107,7 @@ function working() } function not_working(fadein=true) { - document.getElementById("reset_button").removeAttribute("disabled"); + document.getElementById("reset_button").removeAttribute("disabled"); // elements var button = document.getElementById("next"); var pause_button = document.getElementById("pause_button"); @@ -129,13 +128,12 @@ function not_working(fadein=true) } // hide 'working' message - //status.style.display = "none"; $("#status").fadeToggle(); // enable buttons document.getElementById("next").removeAttribute("disabled"); document.getElementById("pause_button").removeAttribute("disabled"); - document.getElementById("reset_button").removeAttribute("disabled"); + document.getElementById("reset_button").removeAttribute("disabled"); DE_locked = false; } @@ -194,15 +192,12 @@ function Next() send_data["duration"] = Timer.get(); send_data["source_value"] = encodeURIComponent(source.value); // compose request - //next_url += "&example="+encodeURIComponent(source.value)+"%20%7C%7C%7C%20"+encodeURIComponent(post_edit)+"&duration="+Timer.get(); // no change? if (post_edit == last_post_edit.value) { - //next_url += "&nochange=1"; send_data["nochange"] = true; } - //next_url += "&example="+encodeURIComponent(JSON.stringify(send_data)); // update document overview - document.getElementById("seg_"+(current_seg_id.value)+"_t").innerHTML=post_edit; + document.getElementById("seg_"+(current_seg_id.value)+"_t").innerHTML=decodeURIComponent(post_edit); // OOV correction mode } else if (oov_correct.value=="true") { send_data["OOV"] = true; @@ -222,20 +217,15 @@ function Next() var l = document.getElementById("oov_fields").children.length; for (var i=0; i