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 09:15:26 UTC

svn commit: r1729088 - /steve/trunk/pysteve/www/htdocs/js/steve_rest.js

Author: humbedooh
Date: Mon Feb  8 08:15:26 2016
New Revision: 1729088

URL: http://svn.apache.org/viewvc?rev=1729088&view=rev
Log:
sort the right way, align IDs

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=1729088&r1=1729087&r2=1729088&view=diff
==============================================================================
--- steve/trunk/pysteve/www/htdocs/js/steve_rest.js (original)
+++ steve/trunk/pysteve/www/htdocs/js/steve_rest.js Mon Feb  8 08:15:26 2016
@@ -832,7 +832,7 @@ function renderElectionFrontpage(respons
     
     var s = 0;
     var ynas = 0;
-    response.issues.sort(function(a,b) { return a.title < b.title } )
+    response.issues.sort(function(a,b) { return a.title > b.title } )
     for (i in response.issues) {
         var issue = response.issues[i]
         if (issue.type == "yna") {
@@ -856,7 +856,12 @@ function renderElectionFrontpage(respons
         
         // Add issue
         var inner = document.createElement('span')
-        inner.innerHTML = issue.id + ": " + issue.title;
+        var a = issue.id
+        while (a.length < 8) {
+            a = ' ' + a
+        }
+        a = a.replace(/\s/g, "&nbsp;")
+        inner.innerHTML = a + issue.id + ": " + issue.title;
         outer.appendChild(no)
         outer.appendChild(inner)
         outer.setAttribute("onclick", "location.href='ballot_" + (issue.category ? issue.category : issue.type.match(/([a-z]+)/)[0]) + ".html?" + el[0] + "/" + issue.id + "/" + (el[1] ? el[1] : "") + "';")