summaryrefslogtreecommitdiffstats
path: root/app/controllers/members_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-05-05 15:21:18 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-05-05 15:21:18 +0000
commit3eed7e622c3856f3b2395f883b5c3bdc20a7a95d (patch)
treefcc10a79cc3afea3b2f361c8aaec547bf67f3b28 /app/controllers/members_controller.rb
parenta6a181c70c054070b687e73eb1505bfcb434b692 (diff)
downloadredmine-3eed7e622c3856f3b2395f883b5c3bdc20a7a95d.tar.gz
redmine-3eed7e622c3856f3b2395f883b5c3bdc20a7a95d.zip
Members management in project settings is now AJAXified
git-svn-id: http://redmine.rubyforge.org/svn/trunk@508 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/members_controller.rb')
-rw-r--r--app/controllers/members_controller.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/app/controllers/members_controller.rb b/app/controllers/members_controller.rb
index ad9e44ff9..dfaad7fa3 100644
--- a/app/controllers/members_controller.rb
+++ b/app/controllers/members_controller.rb
@@ -21,15 +21,19 @@ class MembersController < ApplicationController
def edit
if request.post? and @member.update_attributes(params[:member])
- flash[:notice] = l(:notice_successful_update)
- redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project
+ 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/members'} }
+ end
end
end
def destroy
@member.destroy
- flash[:notice] = l(:notice_successful_delete)
- redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project
+ 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/members'} }
+ end
end
private