修改删除组织成员跨域的BUG
This commit is contained in:
parent
f1682edf64
commit
5c2ac3e02f
|
@ -54,4 +54,8 @@ class OrgMemberController < ApplicationController
|
|||
def index
|
||||
|
||||
end
|
||||
|
||||
def deleteOrgMember
|
||||
destroy
|
||||
end
|
||||
end
|
||||
|
|
|
@ -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}) %>');
|
|
@ -1,6 +1,7 @@
|
|||
<% members.each do |member|%>
|
||||
<ul class="orgListRow">
|
||||
<li class="orgListUser hidden"><a href="<%= user_url_in_org(member.user_id) %>" class="linkBlue"><%= User.find(member.user_id).realname.blank? ? User.find(member.user_id).login : User.find(member.user_id).realname %></a></li>
|
||||
<% username = User.find(member.user_id).realname.blank? ? User.find(member.user_id).login : User.find(member.user_id).realname %>
|
||||
<li class="orgListUser hidden"><a href="<%= user_url_in_org(member.user_id) %>" class="linkBlue"><%= username %></a></li>
|
||||
<li class="orgListRole">
|
||||
<%= get_org_member_role_name member %>
|
||||
<%= form_for(member, {:as => :org_member, :remote => true, :url => Setting.protocol + "://" + Setting.host_name + "/org_member/" + member.id.to_s,
|
||||
|
@ -32,7 +33,8 @@
|
|||
</li>
|
||||
<% if ( (User.current.id == member.organization.creator_id || User.current.admin_of_org?(member.organization) ) && member.user_id != member.organization.creator_id )%>
|
||||
<a href="javascript:void(0);" style="color: #0781B4;margin-left: 30px;float: left" onclick="$(this).parent().height();$('#org-member-<%= member.id%>-roles-form').show();">编辑</a>
|
||||
<%= link_to '删除', Setting.protocol + "://" + Setting.host_name + "/org_member/" + member.id.to_s,:method=>'delete',:style=>'color: #0781B4;margin-left: 30px;float: left',:confirm=>'您确定要删除么?', :remote => true %><% end %>
|
||||
<a href="javascript:void(0)" style = "color: #0781B4;margin-left: 30px;float: left" onclick = "ifDeleteOrgMember('<%= member.id %>','<%= username %>')" >删除</a>
|
||||
<%#= link_to '删除', Setting.protocol + "://" + Setting.host_name + "/org_member/" + member.id.to_s,:method=>'delete',:style=>'color: #0781B4;margin-left: 30px;float: left',:confirm=>'您确定要删除么?', :remote => true %><% end %>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -116,6 +116,7 @@ RedmineApp::Application.routes.draw do
|
|||
end
|
||||
collection do
|
||||
get 'org_member_autocomplete'
|
||||
get 'deleteOrgMember'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue