Author: humbedooh
Date: Fri Mar 20 19:20:26 2015
New Revision: 1668123

URL: http://svn.apache.org/r1668123
Log:
we've had our fun, let data show up faster.

Modified:
    steve/trunk/pytest/www/htdocs/bulk_yna.html
    steve/trunk/pytest/www/htdocs/election.html
    steve/trunk/pytest/www/htdocs/js/steve_rest.js

Modified: steve/trunk/pytest/www/htdocs/bulk_yna.html
URL: 
http://svn.apache.org/viewvc/steve/trunk/pytest/www/htdocs/bulk_yna.html?rev=1668123&r1=1668122&r2=1668123&view=diff
==============================================================================
--- steve/trunk/pytest/www/htdocs/bulk_yna.html (original)
+++ steve/trunk/pytest/www/htdocs/bulk_yna.html Fri Mar 20 19:20:26 2015
@@ -1,7 +1,7 @@
  <!DOCTYPE HTML>
 <html>
 <head>
-<meta charset="utf8">
+<meta charset="utf-8">
 <link rel="stylesheet" href="css/steve_interactive.css">
 <link rel="stylesheet" href="css/jquery-ui.css">
 <script src="js/steve_rest.js" type="text/javascript"></script>
@@ -10,12 +10,12 @@
 <title>Apache STeVe: Bulk voting</title>
 
 </head>
-<body onload="window.setTimeout(loadElection, 1000, null, null, 
renderElectionBulk);">
+<body onload="window.setTimeout(loadElection, 500, null, null, 
renderElectionBulk);">
     <div id="popups"></div>
     <p style="text-align: center;">
         <img src="/images/steve_logo.png"/>
     </p>
-    <a href="javascript:void(location.href='election.html' + 
document.location.search);">Back to election</a>
+    <a href="javascript:void(location.href='election.html' + 
document.location.search);">Back to election front page</a>
 <div class="formbox">
 <p>
     Here you can perform a quick vote for each of the yes/no issues in this 
election.

Modified: steve/trunk/pytest/www/htdocs/election.html
URL: 
http://svn.apache.org/viewvc/steve/trunk/pytest/www/htdocs/election.html?rev=1668123&r1=1668122&r2=1668123&view=diff
==============================================================================
--- steve/trunk/pytest/www/htdocs/election.html (original)
+++ steve/trunk/pytest/www/htdocs/election.html Fri Mar 20 19:20:26 2015
@@ -10,7 +10,7 @@
 <title>Apache STeVe: Election viewer</title>
 
 </head>
-<body onload="window.setTimeout(loadElection, 1000, null, null, 
renderElectionFrontpage);">
+<body onload="window.setTimeout(loadElection, 500, null, null, 
renderElectionFrontpage);">
     <div id="popups"></div>
     <p style="text-align: center;">
         <img src="/images/steve_logo.png"/>

Modified: steve/trunk/pytest/www/htdocs/js/steve_rest.js
URL: 
http://svn.apache.org/viewvc/steve/trunk/pytest/www/htdocs/js/steve_rest.js?rev=1668123&r1=1668122&r2=1668123&view=diff
==============================================================================
--- steve/trunk/pytest/www/htdocs/js/steve_rest.js (original)
+++ steve/trunk/pytest/www/htdocs/js/steve_rest.js Fri Mar 20 19:20:26 2015
@@ -173,7 +173,7 @@ function createIssue(election) {
 }
 
 
-var step = 0;
+var step = -1;
 var election_data = null
 function loadElection(election, uid, callback) {
        
@@ -181,9 +181,9 @@ function loadElection(election, uid, cal
        if (!election || !uid) {
                var l = document.location.search.substr(1).split("/");
                election = l[0];
-               uid = l[1] ? l[1] : "";
+               uid = l.length > 1 ? l[l.length-1] : "";
        }
-       if (step == 0) {
+       if (step == -1) {
                getJSON("/steve/voter/view/" + election + "?uid=" + uid, 
[election,uid, callback], displayElection)
        }
        
@@ -207,7 +207,7 @@ function loadElection(election, uid, cal
 function displayElection(code, response, el) {
        election_data = response
        if (code == 200) {
-               window.setTimeout(el[2], 1000, response, el);
+               window.setTimeout(el[2], 100, response, el);
        } else {
                document.getElementById('preloaderWrapper').innerHTML = 
"<h1>Sorry, an error occured while fetching election data:</h1><h2>" + 
response.message + "</h2>"
        }
@@ -323,7 +323,7 @@ function renderElectionBulk(response, el
             
             var popuph = document.createElement("div")
             popuph.setAttribute("class", "modal-header")
-            popuph.innerHTML = '<h2>Details about issue #' + issue.id + ": " + 
issue.title + '</h2><a href="#close" class="btn-close" aria-hidden="true">×</a>'
+            popuph.innerHTML = '<h2>Details about issue #' + issue.id + ": " + 
issue.title + '</h2><a href="#close" class="btn-close" 
aria-hidden="true">&#215;</a>'
             
                        details = "<b>Nominated by: </b>" + issue.nominatedby + 
"<br/>"
                        details += "<b>Seconded by: </b>" + (issue.seconds ? 
issue.seconds : "no-one") + "<br/>"
@@ -400,5 +400,9 @@ function castVote(election, issue, uid,
 }
 
 function castVoteCallback(code, response, issue) {
-       
+       if (code == 200) {
+               //code
+       } else {
+               //alert(response.message)
+       }
 }
\ No newline at end of file


Reply via email to