plint

French poetry validator
git clone https://a3nm.net/git/plint/
Log | Files | Refs | README

commit c8d93eed5d5383a1a4fa0da13ccae46c67044b76
parent ba0a28d088fa41b6af2405cd3b42d1645fff6098
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Fri,  1 Aug 2014 10:45:49 +0200

disable #check while validating

Diffstat:
static/script.js | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/static/script.js b/static/script.js @@ -56,6 +56,7 @@ window.onload = resizePoem; function check() { $( "#status" ).html("Checking..."); + $('#check').prop( "disabled", true); var poem = $( '#poem' ).val(); var mydata = { 'poem': poem, @@ -70,6 +71,7 @@ function check() { data: mydata, error: function (jqxhr, stat, error) { reportError(stat + (error.length > 0 ? ": " + error : "")); + $('#check').prop( "disabled", false); }, success: function (data) { if ("error" in data) { @@ -106,6 +108,7 @@ function check() { $( "#status" ).html("<span class=\"success\">" + msg + "</span>"); } } + $('#check').prop( "disabled", false); } }); }