From c581250bc80e6bdd9ca5e8755b13904ea5b02eb2 Mon Sep 17 00:00:00 2001 From: Patrick Simianer
Date: Wed, 8 Jun 2016 15:47:54 +0200 Subject: interface: don't send on enter, reset doesn't reset counts --- js/interface.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'js') diff --git a/js/interface.js b/js/interface.js index 4c9685d..ceed474 100644 --- a/js/interface.js +++ b/js/interface.js @@ -105,7 +105,7 @@ var catch_return = function (e) { if (e.keyCode == 13) { e.preventDefault(); - next(); + //next(); } return false; @@ -398,7 +398,7 @@ var request_and_process_next = function () if (data["fin"]) { target_textarea.setAttribute("disabled", "disabled"); status.style.display = "none"; - button.innerHTML = "---"; + //button.innerHTML = "-----"; $("#view_summary").toggle() $("#raw_source_textarea").html(""); $("#target_textarea").val(""); @@ -542,11 +542,11 @@ var reset = function () var ui_type = get_ui_type(); if (ui_type == "t") { if (!$("#init").val()) return; - TEXT_count_click = 0; - TEXT_count_kbd = 0; + //TEXT_count_click = 0; + //TEXT_count_kbd = 0; $("#target_textarea").val($("#original_mt").val()); } else if (ui_type == "g") { - DE_init() + DE_init(false) } } -- cgit v1.2.3 From 182cd661d04b7a76acbb4c5653b840f511811e4d Mon Sep 17 00:00:00 2001 From: Patrick Simianer
Date: Wed, 8 Jun 2016 16:29:59 +0200 Subject: fix --- js/interface.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/interface.js b/js/interface.js index ceed474..0f0b9f3 100644 --- a/js/interface.js +++ b/js/interface.js @@ -115,7 +115,7 @@ var TEXT_handle_keypress = function (e) { if (e.keyCode == 13) { e.preventDefault(); - next(); + //next(); } TEXT_count_kbd += 1; -- cgit v1.2.3 From 1a51b3797d4c3a846e47b105a5edcb8283726651 Mon Sep 17 00:00:00 2001 From: Patrick Simianer
Date: Tue, 14 Jun 2016 13:15:10 +0200 Subject: submit name, some fixes --- inc/db.inc.php | 2 +- index.php | 20 ++++++++++++++------ interface.php | 1 + js/interface.js | 1 + server.rb | 4 ++++ util/run_all | 1 + 6 files changed, 22 insertions(+), 7 deletions(-) (limited to 'js') diff --git a/inc/db.inc.php b/inc/db.inc.php index 7356076..e023c3a 100644 --- a/inc/db.inc.php +++ b/inc/db.inc.php @@ -2,7 +2,7 @@ $SESSION_DIR="/srv/postedit/sessions"; $key = $_GET["key"]; -if (preg_match('/^[a-z0-9]{4}$/', $key)) { +if (preg_match('/^[a-z0-9]{1,4}$/', $key)) { $json = file_get_contents($SESSION_DIR."/".$key."/data.json"); } $db = json_decode($json); diff --git a/index.php b/index.php index 320e653..4b7e13c 100644 --- a/index.php +++ b/index.php @@ -4,7 +4,13 @@