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 2015/10/12 12:03:23 UTC
svn commit: r1708072 - /steve/trunk/pysteve/www/htdocs/js/steve_stv.js
Author: humbedooh
Date: Mon Oct 12 10:03:23 2015
New Revision: 1708072
URL: http://svn.apache.org/viewvc?rev=1708072&view=rev
Log:
rename var
Modified:
steve/trunk/pysteve/www/htdocs/js/steve_stv.js
Modified: steve/trunk/pysteve/www/htdocs/js/steve_stv.js
URL: http://svn.apache.org/viewvc/steve/trunk/pysteve/www/htdocs/js/steve_stv.js?rev=1708072&r1=1708071&r2=1708072&view=diff
==============================================================================
--- steve/trunk/pysteve/www/htdocs/js/steve_stv.js (original)
+++ steve/trunk/pysteve/www/htdocs/js/steve_stv.js Mon Oct 12 10:03:23 2015
@@ -18,7 +18,7 @@
var candidates = []
var statements = []
-var seconds = []
+var seconds_txt = []
var ballotNames = []
var ballotChars = []
var chars;
@@ -193,7 +193,7 @@ function drawCandidates() {
}
// Does the candidate have a nomination and/or seconds? if so, put it on there
- if (seconds[char]) {
+ if (seconds_txt[char]) {
var seconds = document.createElement('div')
seconds.setAttribute("class", "statement_marker")
seconds.setAttribute("title", "Click to read " + name + "'s nomination and/or seconds")
@@ -544,6 +544,7 @@ function displayIssueSTV(code, response,
document.getElementById('preloaderWrapper').innerHTML = "<h1>Could not load issue:</h1><h2>" + response.message + "</h2>";
} else {
candidates = []
+ seconds_txt = []
statements = {}
var m = response.issue.type.match(/(\d+)/);
if (m) {
@@ -556,7 +557,7 @@ function displayIssueSTV(code, response,
var candidate = response.issue.candidates[c];
candidates.push(candidate.name);
statements[chars[c]] = candidate.statement;
- seconds[chars[c]] = candidate.seconds_txt; // don't use .seconds, that's for arrays!
+ seconds_txt[chars[c]] = candidate.seconds_txt; // don't use .seconds, that's for arrays!
}
document.getElementById('cnum').innerHTML = candidates.length
document.getElementById('snum').innerHTML = seats