Hide the role forms when editing or adding Project members. #5452

Contributed by Yuki Kita

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3784 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis 2010-06-19 19:51:43 +00:00
parent d48eb2de47
commit 2562bc5bcd
2 changed files with 11 additions and 3 deletions

View File

@ -43,6 +43,7 @@ class MembersController < ApplicationController
format.js { format.js {
render(:update) {|page| render(:update) {|page|
page.replace_html "tab-content-members", :partial => 'projects/settings/members' page.replace_html "tab-content-members", :partial => 'projects/settings/members'
page << 'hideOnLoad()'
members.each {|member| page.visual_effect(:highlight, "member-#{member.id}") } members.each {|member| page.visual_effect(:highlight, "member-#{member.id}") }
} }
} }
@ -69,6 +70,7 @@ class MembersController < ApplicationController
format.js { format.js {
render(:update) {|page| render(:update) {|page|
page.replace_html "tab-content-members", :partial => 'projects/settings/members' page.replace_html "tab-content-members", :partial => 'projects/settings/members'
page << 'hideOnLoad()'
page.visual_effect(:highlight, "member-#{@member.id}") page.visual_effect(:highlight, "member-#{@member.id}")
} }
} }
@ -82,7 +84,11 @@ class MembersController < ApplicationController
end end
respond_to do |format| respond_to do |format|
format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project } 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
end end

View File

@ -226,8 +226,10 @@ Ajax.Responders.register({
} }
}); });
Event.observe(window, 'load', function() { function hideOnLoad() {
$$('.hol').each(function(el) { $$('.hol').each(function(el) {
el.hide(); el.hide();
}); });
}); }
Event.observe(window, 'load', hideOnLoad);