@@ -1,16 +1,16 | |||||
1 |
# |
|
1 | # Redmine - project management software | |
2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
2 | # Copyright (C) 2006-2011 Jean-Philippe Lang | |
3 | # |
|
3 | # | |
4 | # This program is free software; you can redistribute it and/or |
|
4 | # This program is free software; you can redistribute it and/or | |
5 | # modify it under the terms of the GNU General Public License |
|
5 | # modify it under the terms of the GNU General Public License | |
6 | # as published by the Free Software Foundation; either version 2 |
|
6 | # as published by the Free Software Foundation; either version 2 | |
7 | # of the License, or (at your option) any later version. |
|
7 | # of the License, or (at your option) any later version. | |
8 |
# |
|
8 | # | |
9 | # This program is distributed in the hope that it will be useful, |
|
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. |
|
12 | # GNU General Public License for more details. | |
13 |
# |
|
13 | # | |
14 | # You should have received a copy of the GNU General Public License |
|
14 | # You should have received a copy of the GNU General Public License | |
15 | # along with this program; if not, write to the Free Software |
|
15 | # along with this program; if not, write to the Free Software | |
16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
@@ -40,8 +40,8 class MembersController < ApplicationController | |||||
40 |
|
40 | |||
41 | format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project } |
|
41 | format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project } | |
42 |
|
42 | |||
43 |
format.js { |
|
43 | format.js { | |
44 |
render(:update) {|page| |
|
44 | render(:update) {|page| | |
45 | page.replace_html "tab-content-members", :partial => 'projects/settings/members' |
|
45 | page.replace_html "tab-content-members", :partial => 'projects/settings/members' | |
46 | page << 'hideOnLoad()' |
|
46 | page << 'hideOnLoad()' | |
47 | members.each {|member| page.visual_effect(:highlight, "member-#{member.id}") } |
|
47 | members.each {|member| page.visual_effect(:highlight, "member-#{member.id}") } | |
@@ -58,17 +58,17 class MembersController < ApplicationController | |||||
58 | page.alert(l(:notice_failed_to_save_members, :errors => errors.join(', '))) |
|
58 | page.alert(l(:notice_failed_to_save_members, :errors => errors.join(', '))) | |
59 | } |
|
59 | } | |
60 | } |
|
60 | } | |
61 |
|
61 | |||
62 | end |
|
62 | end | |
63 | end |
|
63 | end | |
64 | end |
|
64 | end | |
65 |
|
65 | |||
66 | def edit |
|
66 | def edit | |
67 | if request.post? and @member.update_attributes(params[:member]) |
|
67 | if request.post? and @member.update_attributes(params[:member]) | |
68 | respond_to do |format| |
|
68 | respond_to do |format| | |
69 | format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project } |
|
69 | format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project } | |
70 |
format.js { |
|
70 | format.js { | |
71 |
render(:update) {|page| |
|
71 | render(:update) {|page| | |
72 | page.replace_html "tab-content-members", :partial => 'projects/settings/members' |
|
72 | page.replace_html "tab-content-members", :partial => 'projects/settings/members' | |
73 | page << 'hideOnLoad()' |
|
73 | page << 'hideOnLoad()' | |
74 | page.visual_effect(:highlight, "member-#{@member.id}") |
|
74 | page.visual_effect(:highlight, "member-#{@member.id}") | |
@@ -91,7 +91,7 class MembersController < ApplicationController | |||||
91 | } |
|
91 | } | |
92 | end |
|
92 | end | |
93 | end |
|
93 | end | |
94 |
|
94 | |||
95 | def autocomplete_for_member |
|
95 | def autocomplete_for_member | |
96 | @principals = Principal.active.like(params[:q]).find(:all, :limit => 100) - @project.principals |
|
96 | @principals = Principal.active.like(params[:q]).find(:all, :limit => 100) - @project.principals | |
97 | render :layout => false |
|
97 | render :layout => false |
General Comments 0
You need to be logged in to leave comments.
Login now