From 0b2b8b8e7ef40e38d70eb3209bfde4c6833f1883 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Thu, 5 Nov 2015 20:16:29 +0100 Subject: ui fixes --- js/lfpe.js | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/lfpe.js b/js/lfpe.js index 28a5d97..d1b233a 100644 --- a/js/lfpe.js +++ b/js/lfpe.js @@ -88,6 +88,12 @@ function working() var oov_correct = document.getElementById("oov_correct"); var last_post_edit = document.getElementById("last_post_edit"); + if ($("#ui_type").val() == "t") { + $("#textboxes").fadeTo(200,0.1); + } else { + $("#derivation_editor").fadeTo(200,0.1); + } + // show 'working' message //status.style.display = "block"; $("#status").fadeToggle(); @@ -102,7 +108,7 @@ function working() * * */ -function not_working() +function not_working(fadein=true) { // elements var button = document.getElementById("next"); @@ -115,6 +121,14 @@ function not_working() var oov_correct = document.getElementById("oov_correct"); var last_post_edit = document.getElementById("last_post_edit"); + if (fadein) { + if ($("#ui_type").val() == "t") { + $("#textboxes").fadeTo(200,1); + } else { + $("#derivation_editor").fadeTo(200,1); + } + } + // hide 'working' message //status.style.display = "none"; $("#status").fadeToggle(); @@ -182,7 +196,7 @@ function Next() tgt.push(trim(document.getElementById("oov_tgt"+i).value)); if (tgt[tgt.length-1] == "") { // empty correction alert("Please provide translations for all words."); - not_working(); + //not_working(); return; } @@ -283,7 +297,7 @@ function Next() $("#oov_form").toggle("blind"); $("#next").html("Next"); $("#oov_tgt0").focus(); - not_working(); + not_working(false); // translation mode } else { -- cgit v1.2.3