Commit 3f6c1f9f7c8124aadb2bb33fe41cff5970a8ec36
1 parent
9e99a0e7
Exists in
master
and in
5 other branches
Fix vote success
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
js/main.js
@@ -99,7 +99,6 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F | @@ -99,7 +99,6 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F | ||
99 | }); | 99 | }); |
100 | $body.off('click', '.vote-actions .vote-action'); | 100 | $body.off('click', '.vote-actions .vote-action'); |
101 | $body.on('click', '.vote-actions .vote-action', function(e) { | 101 | $body.on('click', '.vote-actions .vote-action', function(e) { |
102 | - Main.displaySuccess($(this).closest('.support-proposal .section-content'), 'Voto realizado com sucesso', 800); | ||
103 | //Helps to prevent more than one vote per proposal | 102 | //Helps to prevent more than one vote per proposal |
104 | if(ProposalApp.hasProposalbeenVoted(article.id)){ | 103 | if(ProposalApp.hasProposalbeenVoted(article.id)){ |
105 | console.log("Proposta " + article.id + " já havia sido votada"); | 104 | console.log("Proposta " + article.id + " já havia sido votada"); |
@@ -122,6 +121,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F | @@ -122,6 +121,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F | ||
122 | private_token: Main.private_token | 121 | private_token: Main.private_token |
123 | } | 122 | } |
124 | }).done(function( /*data*/ ) { | 123 | }).done(function( /*data*/ ) { |
124 | + Main.displaySuccess($(this).closest('.support-proposal .section-content'), 'Voto realizado com sucesso', 800); | ||
125 | ProposalApp.addVotedProposal(article.id); | 125 | ProposalApp.addVotedProposal(article.id); |
126 | contextMain.loadRandomProposal(topic_id); | 126 | contextMain.loadRandomProposal(topic_id); |
127 | }); | 127 | }); |