diff --git a/app/controllers/org_member_controller.rb b/app/controllers/org_member_controller.rb index 642a100c3..2eaa790cd 100644 --- a/app/controllers/org_member_controller.rb +++ b/app/controllers/org_member_controller.rb @@ -54,4 +54,8 @@ class OrgMemberController < ApplicationController def index end + + def deleteOrgMember + destroy + end end diff --git a/app/views/org_member/deleteOrgMember.js.erb b/app/views/org_member/deleteOrgMember.js.erb new file mode 100644 index 000000000..d87e62c17 --- /dev/null +++ b/app/views/org_member/deleteOrgMember.js.erb @@ -0,0 +1,3 @@ +$("#org_members_count_id").html(""); +$("#org_members_count_id").html("<%= @org.org_members.count %>") +$("#org_member_list").html('<%= escape_javascript( render :partial=>"organizations/org_member_list",:locals=> {:members=>@org.org_members}) %>'); \ No newline at end of file diff --git a/app/views/organizations/_org_member_list.html.erb b/app/views/organizations/_org_member_list.html.erb index 8e8a23b60..8af7986fc 100644 --- a/app/views/organizations/_org_member_list.html.erb +++ b/app/views/organizations/_org_member_list.html.erb @@ -1,6 +1,7 @@ <% members.each do |member|%>
diff --git a/config/routes.rb b/config/routes.rb index ec8fa2337..189c2671d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -116,6 +116,7 @@ RedmineApp::Application.routes.draw do end collection do get 'org_member_autocomplete' + get 'deleteOrgMember' end end