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 a734c5a: remove buttons when a component is repurposed
Date Tue, 16 Feb 2016 01:58:33 GMT
Commit a734c5ae478d042b821c52134121e971ed0c7efe:
    remove buttons when a component is repurposed


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

------------------------------------------------------------
www/roster/views/pmc/committers.js.rb                        | +++++ -
www/roster/views/pmc/pmc.js.rb                               | +++ -
------------------------------------------------------------
10 changes: 8 additions, 2 deletions.
------------------------------------------------------------


diff --git a/www/roster/views/pmc/committers.js.rb b/www/roster/views/pmc/committers.js.rb
index 030464e..aeb4828 100644
--- a/www/roster/views/pmc/committers.js.rb
+++ b/www/roster/views/pmc/committers.js.rb
@@ -126,7 +126,11 @@ def componentWillMount()
   end
 
   # automatically open pending entries
-  def componentWillReceiveProps()
+  def componentWillReceiveProps(newprops)
+    if self.committee and newprops.committee.id != self.committee.id
+      @state = :closed 
+    end
+
     @state = :open if @@person.date == 'pending'
   end
 
diff --git a/www/roster/views/pmc/pmc.js.rb b/www/roster/views/pmc/pmc.js.rb
index 136d3d5..1e2402e 100644
--- a/www/roster/views/pmc/pmc.js.rb
+++ b/www/roster/views/pmc/pmc.js.rb
@@ -4,6 +4,7 @@
 
 class PMCMembers < React
   def initialize
+    @committee = {}
     @state = :closed
   end
 
@@ -166,7 +167,8 @@ def componentWillMount()
   end
 
   # automatically open pending entries
-  def componentWillReceiveProps()
+  def componentWillReceiveProps(newprops)
+    @state = :closed if @committee and newprops.committee.id != @committee.id
     @state = :open if @@person.date == 'pending'
   end
 

Mime
View raw message