修改项目成员邀请界面(添加按钮点击搜索)

This commit is contained in:
huang 2015-04-09 11:20:09 +08:00
parent 4d4e1cac8b
commit c8f9add566
2 changed files with 3 additions and 2 deletions

View File

@ -34,11 +34,11 @@ module MembersHelper
def render_project_members project
scope = Principal.active.sorted.not_member_of(project).like(params[:q])
principals = paginateHelper scope,10
s = content_tag('ul', project_member_check_box_tags_ex('membership[user_ids][]', principals), :class => 'mb5', :style => "margin-left: -40px;")
s = content_tag('ul', project_member_check_box_tags_ex('membership[user_ids][]', principals), :class => 'mb5')
links = pagination_links_full(@obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true){|text, parameters, options|
link_to text, autocomplete_project_memberships_path(project, parameters.merge(:q => params[:q],:flag => true, :format => 'js')), :remote => true
}
s + content_tag('ul', links,:class => 'wlist')
s + content_tag('ul', links,:class => 'wlist', :style =>"float:left;margin-top:0px;")
end
# add by nwb

View File

@ -20,6 +20,7 @@
<div class="invi_search">
<input hidden="hidden" value="true" name="flag">
<input id="principal_search" class="invi_search_input fl" type="text" placeholder="请输入用户名称来搜索好友">
<a class="invi_search_btn fl" onclick="observeSearchfield('principal_search', null, '#{ escape_javascript autocomplete_project_memberships_path(@project, :format => 'js',:flag => true) }')">搜索</a>
<%= javascript_tag "observeSearchfield('principal_search', null, '#{ escape_javascript autocomplete_project_memberships_path(@project, :format => 'js',:flag => true) }')" %>
<div class="cl"></div>
<div id="principals_for_new_member">