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/04/02 15:06:04 UTC
svn commit: r1670899 - /steve/trunk/pysteve/www/htdocs/js/steve_rest.js
Author: humbedooh
Date: Thu Apr 2 13:06:04 2015
New Revision: 1670899
URL: http://svn.apache.org/r1670899
Log:
show debug if requested
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=1670899&r1=1670898&r2=1670899&view=diff
==============================================================================
--- steve/trunk/pysteve/www/htdocs/js/steve_rest.js (original)
+++ steve/trunk/pysteve/www/htdocs/js/steve_rest.js Thu Apr 2 13:06:04 2015
@@ -173,6 +173,14 @@ function displayTally(code, response, is
} else {
obj.innerHTML = "Unknonwn vote type or no votes cast yet"
}
+ if (response.debug) {
+ var pre = document.createElement('pre')
+ pre.innerHTML = response.debug.join("\n")
+ pre.setAttribute("id", "debug_" + issue)
+ pre.setAttribute("style", "display: hidden")
+ obj.innerHTML += "<a href=\"javascript:void(document.getElementById('debug_" + issue + "').style.display = 'visible');\">Show debug</a>"
+ obj.appendChild(pre)
+ }
}
}
function readTally(code, response, election) {