From 1532ef84bd536a3ae4a7641367ab5d34f9215049 Mon Sep 17 00:00:00 2001 From: Mike Weaver Date: Tue, 15 Sep 2015 17:53:43 -0600 Subject: [PATCH 1/3] update script to "sending" --- piratebox/piratebox/www/scripts.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/piratebox/piratebox/www/scripts.js b/piratebox/piratebox/www/scripts.js index 92e1216..2642ebf 100755 --- a/piratebox/piratebox/www/scripts.js +++ b/piratebox/piratebox/www/scripts.js @@ -105,11 +105,17 @@ function refresh_time_sb () { } function post_shoutbox () { - $.post("/cgi-bin/psowrte.py" , $("#sb_form").serialize()) - .success(function() { - refresh_shoutbox(); - }); - $('#shoutbox-input .message').val(''); + $("#send-button").prop('value', 'Sending...'); + $("#send-button").prop('disabled', true); + + $.post("/cgi-bin/psowrte.py" , $("#sb_form").serialize()) + .success(function() { + refresh_shoutbox(); + }); + $('#shoutbox-input .message').val(''); + + $("#send-button").prop('value', 'Send') + $("#send-button").prop('disabled', false); } function display_shoutbox() { From 887490455ae5c160cbb828389ec46162e1a03cb4 Mon Sep 17 00:00:00 2001 From: Mike Weaver Date: Tue, 15 Sep 2015 17:54:19 -0600 Subject: [PATCH 2/3] update index button with id --- piratebox/piratebox/www/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piratebox/piratebox/www/index.html b/piratebox/piratebox/www/index.html index 08af48c..1a5cbb3 100644 --- a/piratebox/piratebox/www/index.html +++ b/piratebox/piratebox/www/index.html @@ -58,7 +58,7 @@
- +

Text Color:

From 4f6eb00c2752b9df01c4638c6d185bd852a32d9a Mon Sep 17 00:00:00 2001 From: Mike Weaver Date: Thu, 17 Sep 2015 17:28:06 -0600 Subject: [PATCH 3/3] fix javascript bug --- piratebox/piratebox/www/scripts.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/piratebox/piratebox/www/scripts.js b/piratebox/piratebox/www/scripts.js index 2642ebf..d97afd6 100755 --- a/piratebox/piratebox/www/scripts.js +++ b/piratebox/piratebox/www/scripts.js @@ -111,11 +111,10 @@ function post_shoutbox () { $.post("/cgi-bin/psowrte.py" , $("#sb_form").serialize()) .success(function() { refresh_shoutbox(); + $("#send-button").prop('value', 'Send') + $("#send-button").prop('disabled', false); }); $('#shoutbox-input .message').val(''); - - $("#send-button").prop('value', 'Send') - $("#send-button").prop('disabled', false); } function display_shoutbox() {