Commit 6efd33cb1e5042db7319662eab1d1d5e4a5764ee
Exists in
master
and in
10 other branches
Merge remote-tracking branch 'upstream/master' into fix-65
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
... | ... | @@ -164,6 +164,9 @@ $.getJSON(noosferoAPI) |
164 | 164 | e.preventDefault(); |
165 | 165 | var proposal_id = this.id.split('-').pop(); |
166 | 166 | var form = this; |
167 | + var message = $(form).find('.message'); | |
168 | + message.hide(); | |
169 | + message.text(''); | |
167 | 170 | $.ajax({ |
168 | 171 | type: 'post', |
169 | 172 | url: host + '/api/v1/articles/' + proposal_id + '/children', |
... | ... | @@ -177,7 +180,8 @@ $.getJSON(noosferoAPI) |
177 | 180 | .fail(function( jqxhr, textStatus, error ) { |
178 | 181 | var err = textStatus + ", " + error; |
179 | 182 | console.log( "Request Failed: " + err ); |
180 | - $(form).find('.message').text('Não foi possível enviar.'); | |
183 | + message.show(); | |
184 | + message.text('Não foi possível enviar.'); | |
181 | 185 | }); |
182 | 186 | }); |
183 | 187 | ... | ... |