From b0ca0333b2c1112e0a8b5c4c0fad5584c46ae532 Mon Sep 17 00:00:00 2001 From: Leandro Nunes dos Santos Date: Fri, 17 Apr 2015 11:02:55 -0300 Subject: [PATCH] adding success proposal creation --- index.html | 6 +++++- js/main.js | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 78c9a6b..97e744e 100644 --- a/index.html +++ b/index.html @@ -80,7 +80,7 @@
Qual a sua sugestão para melhorar este programa?
Ela se tornará pública em até 24 horas após o envio e poderá ser apoiada por outros participantes.
Envie Sua Proposta
-
+
@@ -93,6 +93,10 @@ +
+

Sua proposta foi encaminhada com sucesso!

+ Encaminhar Nova Proposta +
diff --git a/js/main.js b/js/main.js index f47cb0c..e9b161d 100644 --- a/js/main.js +++ b/js/main.js @@ -82,6 +82,18 @@ $.getJSON(noosferoAPI) } event.preventDefault(); }); + $( '.send-proposal-button a' ).click(function(event){ + //Display Topics or Discussion by category + $('.make-proposal-form').show(); + $('.send-proposal-button').hide(); + event.preventDefault(); + }); + $( '.success-proposal-sent a' ).click(function(event){ + //Display Topics or Discussion by category + $('.make-proposal-form').show(); + $('.success-proposal-sent').hide(); + event.preventDefault(); + }); $('.make-proposal-form').submit(function (e) { e.preventDefault(); @@ -92,6 +104,9 @@ $.getJSON(noosferoAPI) data: $('#'+this.id).serialize() }) .done(function( data ) { + this.reset(); + $('.make-proposal-form').hide(); + $('.success-proposal-sent').show(); }) .fail(function( jqxhr, textStatus, error ) { var err = textStatus + ", " + error; -- libgit2 0.21.2