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/03/27 17:50:16 UTC

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

Author: humbedooh
Date: Sun Mar 27 15:50:16 2016
New Revision: 1736759

URL: http://svn.apache.org/viewvc?rev=1736759&view=rev
Log:
Sort by title in bulk yna, also in admin interface. try to fix it for WebKit (STEVE-41)

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=1736759&r1=1736758&r2=1736759&view=diff
==============================================================================
--- steve/trunk/pysteve/www/htdocs/js/steve_rest.js (original)
+++ steve/trunk/pysteve/www/htdocs/js/steve_rest.js Sun Mar 27 15:50:16 2016
@@ -137,6 +137,7 @@ function renderEditElection(code, respon
         if (response.issues && response.issues.length > 0) {
             obj.innerHTML = "";
         }
+        response.issues.sort(function(a,b) { return (a.title > b.title)? 1 : -1 } )
         for (i in response.issues) {
             var issue = response.issues[i]
             s++;
@@ -933,7 +934,7 @@ function renderElectionBulk(response, el
     
     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)? 1 : -1 } )
     bulk_issues = []
     for (i in response.issues) {
         var issue = response.issues[i]