Commit 204606ab1ae8ff6f5252131489cdf163b3960e7c
1 parent
8cc28b0a
Exists in
master
and in
10 other branches
hide proposal message by default
Showing
2 changed files
with
6 additions
and
2 deletions
Show diff stats
index.html
... | ... | @@ -201,7 +201,7 @@ |
201 | 201 | <div class='send-proposal-button send-button'><a href='#'><span>Envie Sua Proposta</span></a></div> |
202 | 202 | <div class="login-container hide">Login</div> |
203 | 203 | <form class='make-proposal-form save-article-form hide' id='make-proposal-form-{{id}}'> |
204 | - <div class="message"></div> | |
204 | + <div class="message hide"></div> | |
205 | 205 | <div> |
206 | 206 | <div><label for="article_abstract">Descrição</label></div> |
207 | 207 | <textarea id="article_abstract" class="countdown" name="article[abstract]" placeholder="Descrição" maxlength="200"></textarea> | ... | ... |
js/main.js
... | ... | @@ -155,6 +155,9 @@ $.getJSON(noosferoAPI) |
155 | 155 | e.preventDefault(); |
156 | 156 | var proposal_id = this.id.split('-').pop(); |
157 | 157 | var form = this; |
158 | + var message = $(form).find('.message'); | |
159 | + message.hide(); | |
160 | + message.text(''); | |
158 | 161 | $.ajax({ |
159 | 162 | type: 'post', |
160 | 163 | url: host + '/api/v1/articles/' + proposal_id + '/children', |
... | ... | @@ -168,7 +171,8 @@ $.getJSON(noosferoAPI) |
168 | 171 | .fail(function( jqxhr, textStatus, error ) { |
169 | 172 | var err = textStatus + ", " + error; |
170 | 173 | console.log( "Request Failed: " + err ); |
171 | - $(form).find('.message').text('Não foi possível enviar.'); | |
174 | + message.show(); | |
175 | + message.text('Não foi possível enviar.'); | |
172 | 176 | }); |
173 | 177 | }); |
174 | 178 | ... | ... |