summaryrefslogtreecommitdiffstats
path: root/app/views/groups
diff options
context:
space:
mode:
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') %>');