diff --git a/app/controllers/members_controller.rb b/app/controllers/members_controller.rb index a84cf50db..795709a48 100644 --- a/app/controllers/members_controller.rb +++ b/app/controllers/members_controller.rb @@ -43,6 +43,7 @@ class MembersController < ApplicationController format.js { render(:update) {|page| page.replace_html "tab-content-members", :partial => 'projects/settings/members' + page << 'hideOnLoad()' members.each {|member| page.visual_effect(:highlight, "member-#{member.id}") } } } @@ -69,6 +70,7 @@ class MembersController < ApplicationController format.js { render(:update) {|page| page.replace_html "tab-content-members", :partial => 'projects/settings/members' + page << 'hideOnLoad()' page.visual_effect(:highlight, "member-#{@member.id}") } } @@ -82,7 +84,11 @@ class MembersController < ApplicationController end respond_to do |format| format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project } - format.js { render(:update) {|page| page.replace_html "tab-content-members", :partial => 'projects/settings/members'} } + format.js { render(:update) {|page| + page.replace_html "tab-content-members", :partial => 'projects/settings/members' + page << 'hideOnLoad()' + } + } end end diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 745125047..612739f5c 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -226,8 +226,10 @@ Ajax.Responders.register({ } }); -Event.observe(window, 'load', function() { +function hideOnLoad() { $$('.hol').each(function(el) { el.hide(); }); -}); +} + +Event.observe(window, 'load', hideOnLoad);