You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by Sebastian Bazley <se...@apache.org> on 2016/02/16 03:16:39 UTC

[whimsy.git] [2/2] Commit c09e17f: Merge branch 'master' of https://github.com/apache/whimsy

Commit c09e17fbdf648bc4ceac4f3108f63f92831cf111:
    Merge branch 'master' of https://github.com/apache/whimsy


Branch: refs/heads/master
Author: Sebb <se...@apache.org>
Committer: Sebb <se...@apache.org>
Pusher: sebb <se...@apache.org>

------------------------------------------------------------
www/roster/views/pmc/committers.js.rb                        | +++++ -
www/roster/views/pmc/main.js.rb                              | + --
www/roster/views/pmc/pmc.js.rb                               | +++ -
------------------------------------------------------------
13 changes: 9 additions, 4 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/main.js.rb b/www/roster/views/pmc/main.js.rb
index a9940c5..44ffe51 100644
--- a/www/roster/views/pmc/main.js.rb
+++ b/www/roster/views/pmc/main.js.rb
@@ -61,8 +61,7 @@ def update(committee)
     if @attic == nil and not committee.established and defined? fetch
       @attic = []
 
-      console.log 'issuing fetch'
-      fetch('/attic/issues.json', credentials: 'include').then {|response|
+      fetch('attic/issues.json', credentials: 'include').then {|response|
         if response.status == 200
           response.json().then do |json|
             @attic = json
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