You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@steve.apache.org by hu...@apache.org on 2016/02/09 08:54:06 UTC
svn commit: r1729325 - /steve/trunk/pysteve/www/htdocs/js/steve_rest.js
Author: humbedooh
Date: Tue Feb 9 07:54:06 2016
New Revision: 1729325
URL: http://svn.apache.org/viewvc?rev=1729325&view=rev
Log:
casually mention what was voted
Modified:
steve/trunk/pysteve/www/htdocs/js/steve_rest.js
Modified: steve/trunk/pysteve/www/htdocs/js/steve_rest.js
URL: http://svn.apache.org/viewvc/steve/trunk/pysteve/www/htdocs/js/steve_rest.js?rev=1729325&r1=1729324&r2=1729325&view=diff
==============================================================================
--- steve/trunk/pysteve/www/htdocs/js/steve_rest.js (original)
+++ steve/trunk/pysteve/www/htdocs/js/steve_rest.js Tue Feb 9 07:54:06 2016
@@ -1104,14 +1104,18 @@ function castSingleVote(vote) {
},
undefined,
castSingleVoteCallback,
- null)
+ {vote: vote})
}
function castSingleVoteCallback(code, response, state) {
if (code != 200) {
alert(response.message)
} else {
- document.getElementById('ynavote').innerHTML = "<h2>Your vote has been registered!</h2><p style='text-align:center;'><big>Should you reconsider, you can always reload this page and vote again.<br/><br/><a href=\"javascript:void(location.href='election.html'+document.location.search);\">Back to election front page</a></big></p>"
+ var v = ""
+ if (state && state.vote) {
+ v = "(" + state.vote.toUpperCase() + ")"
+ }
+ document.getElementById('ynavote').innerHTML = "<h2>Your vote " + v + " has been registered!</h2><p style='text-align:center;'><big>Should you reconsider, you can always reload this page and vote again.<br/><br/><a href=\"javascript:void(location.href='election.html'+document.location.search);\">Back to election front page</a></big></p>"
}
}