summaryrefslogtreecommitdiffstats
path: root/app/views/groups
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-19 16:57:59 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-19 16:57:59 +0000
commit21ee2e2cf246550436b22d5d32698d87839cad6c (patch)
treefe38d693dd720e069d97a5fe39d886f3baeaeca5 /app/views/groups
parent035805fbd04286bff0965b588b7c7dbef6652c63 (diff)
downloadredmine-21ee2e2cf246550436b22d5d32698d87839cad6c.tar.gz
redmine-21ee2e2cf246550436b22d5d32698d87839cad6c.zip
Removes RJS from GroupsController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10044 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/groups')
-rw-r--r--app/views/groups/add_users.js.erb4
-rw-r--r--app/views/groups/destroy_membership.js.erb1
-rw-r--r--app/views/groups/edit_membership.js.erb6
-rw-r--r--app/views/groups/remove_user.js.erb1
4 files changed, 12 insertions, 0 deletions
diff --git a/app/views/groups/add_users.js.erb b/app/views/groups/add_users.js.erb
new file mode 100644
index 000000000..35d432760
--- /dev/null
+++ b/app/views/groups/add_users.js.erb
@@ -0,0 +1,4 @@
+Element.update('tab-content-users', '<%= escape_javascript(render :partial => 'groups/users') %>');
+<% @users.each do |user| %>
+ new Effect.Highlight('user-<%= user.id %>');
+<% end %>
diff --git a/app/views/groups/destroy_membership.js.erb b/app/views/groups/destroy_membership.js.erb
new file mode 100644
index 000000000..3e03eb817
--- /dev/null
+++ b/app/views/groups/destroy_membership.js.erb
@@ -0,0 +1 @@
+Element.update('tab-content-memberships', '<%= escape_javascript(render :partial => 'groups/memberships') %>');
diff --git a/app/views/groups/edit_membership.js.erb b/app/views/groups/edit_membership.js.erb
new file mode 100644
index 000000000..b693a7f90
--- /dev/null
+++ b/app/views/groups/edit_membership.js.erb
@@ -0,0 +1,6 @@
+<% if @membership.valid? %>
+ Element.update('tab-content-memberships', '<%= escape_javascript(render :partial => 'groups/memberships') %>');
+ new Effect.Highlight('member-<%= @membership.id %>');
+<% else %>
+ alert('<%= escape_javascript(l(:notice_failed_to_save_members, :errors => @membership.errors.full_messages.join(', '))) %>');
+<% end %>
diff --git a/app/views/groups/remove_user.js.erb b/app/views/groups/remove_user.js.erb
new file mode 100644
index 000000000..b383830b2
--- /dev/null
+++ b/app/views/groups/remove_user.js.erb
@@ -0,0 +1 @@
+Element.update('tab-content-users', '<%= escape_javascript(render :partial => 'groups/users') %>');