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/08 13:33:39 UTC
svn commit: r1729150 - /steve/trunk/pysteve/www/htdocs/js/steve_stv.js
Author: humbedooh
Date: Mon Feb 8 12:33:38 2016
New Revision: 1729150
URL: http://svn.apache.org/viewvc?rev=1729150&view=rev
Log:
fix for tablets
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=1729150&r1=1729149&r2=1729150&view=diff
==============================================================================
--- steve/trunk/pysteve/www/htdocs/js/steve_stv.js (original)
+++ steve/trunk/pysteve/www/htdocs/js/steve_stv.js Mon Feb 8 12:33:38 2016
@@ -609,9 +609,18 @@ function displayIssueSTV(code, response,
reset.setAttribute("value", "Reset")
reset.setAttribute("onclick", "resetList();")
+
stvdiv.appendChild(vote)
stvdiv.appendChild(reset)
+ stvdiv.appendChild(document.createElement('br'))
+
+ var mbox = document.createElement('input')
+ mbox.setAttribute("type", "text")
+ mbox.setAttribute("id", "mbox")
+ mbox.setAttribute("placeholder", "Or enter the list manually here")
+ stvdiv.appendChild(mbox)
+
shuffleCandidates();
drawCandidates();
@@ -627,9 +636,13 @@ function castVotes(args) {
election = l[0];
issue = l.length > 1 ? l[l.length-2] : "";
uid = l.length > 2 ? l[l.length-1] : "";
+ var v = ballotChars.join("")
+ if (v.length == 0 && document.getElementById('mbox').value.length > 0) {
+ v = document.getElementById('mbox').value
+ }
postREST("/steve/voter/vote/" + election + "/" + issue, {
uid: uid,
- vote: ballotChars.join("")
+ vote: v
},
undefined,
castVotesCallback,