whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Ruby <ru...@apache.org>
Subject [whimsy.git] [1/1] Commit 912146c: sort by public name
Date Sun, 14 Feb 2016 16:05:46 GMT
Commit 912146c0e633252069fbe6d16cc63fc372f87393:
    sort by public name


Branch: refs/heads/master
Author: Sam Ruby <rubys@intertwingly.net>
Committer: Sam Ruby <rubys@intertwingly.net>
Pusher: rubys <rubys@apache.org>

------------------------------------------------------------
www/roster/main.rb                                           | + 
www/roster/views/committee.js.rb                             | +++++++++ ------
------------------------------------------------------------
16 changes: 10 additions, 6 deletions.
------------------------------------------------------------


diff --git a/www/roster/main.rb b/www/roster/main.rb
index 952d50f..065bae0 100755
--- a/www/roster/main.rb
+++ b/www/roster/main.rb
@@ -9,6 +9,7 @@
 require 'wunderbar/sinatra'
 require 'wunderbar/bootstrap/theme'
 require 'wunderbar/react'
+require 'wunderbar/underscore'
 require 'ruby2js/filter/functions'
 require 'ruby2js/filter/require'
 
diff --git a/www/roster/views/committee.js.rb b/www/roster/views/committee.js.rb
index 524e25e..0bbded9 100644
--- a/www/roster/views/committee.js.rb
+++ b/www/roster/views/committee.js.rb
@@ -35,7 +35,6 @@ def render
 
 class PMCMembers < React
   def initialize
-    @roster = {}
     @state = :closed
   end
 
@@ -77,13 +76,15 @@ def componentWillMount()
 
   # compute roster
   def componentWillReceiveProps()
-    @roster = []
+    roster = []
     
     for id in @@committee.roster
       person = @@committee.roster[id]
       person.id = id
-      @roster << person
+      roster << person
     end
+
+    @roster = roster.sort_by {|person| person.name}
   end
 
   # open search box
@@ -127,7 +128,7 @@ def render
 
           if @@auth
             _tr onDoubleClick: self.select do
-              _td((@state == :open ? '' : '+'), colspan: 4)
+              _td((@state == :open ? '' : "\u2795"), colspan: 3)
             end
           end
         end
@@ -148,11 +149,13 @@ def componentWillMount()
 
   # compute list of committers
   def componentWillReceiveProps()
-    @committers = []
+    committers = []
     
     for id in @@committee.committers
-      @committers << {id: id, name: @@committee.committers[id]}
+      committers << {id: id, name: @@committee.committers[id]}
     end
+
+    @committers = committers.sort_by {|person| person.name}
   end
 
   # open search box

Mime
View raw message