Merge branch 'yuanke' into develop
This commit is contained in:
commit
c61c14fa97
|
@ -112,7 +112,8 @@
|
|||
<%= form_tag url_for(:controller => 'org_member', :action => 'create', :org => @organization),:id=>'org_member_add_form',:remote=>true do |f|%>
|
||||
<input type="text" id="not_org_member_search" name="orgAddSearch" placeholder="支持姓名、邮箱、登录名搜索" class="orgAddSearch mb20" />
|
||||
<%# if @organization.secdomain_name.nil? %>
|
||||
<%= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript host_with_protocol + "/org_member/org_member_autocomplete?" + {:org=> @organization.id}.to_query }')" %>
|
||||
<%= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript "/org_member/org_member_autocomplete?" + {:org=> @organization.id}.to_query }')" %>
|
||||
<%#= javascript_tag "observeSearchfield('not_org_member_search', null, '#{url_for(:controller => 'organizations', :action => 'org_member_autocomplete', :org=> @organization.id)}')" %>
|
||||
<%# else %>
|
||||
<%#= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript secdomain_with_protocol(@organization.secdomain_name) + "/org_member/org_member_autocomplete?" + {:org=> @organization.id}.to_query }')" %>
|
||||
<%# end %>
|
||||
|
|
|
@ -547,6 +547,7 @@ function observeSearchfield(fieldId, targetId, url) {
|
|||
$.ajax({
|
||||
url: url,
|
||||
type: 'get',
|
||||
dataType: 'jsonp',
|
||||
data: {q: $this.val()},
|
||||
success: function(data){ if(targetId) $('#'+targetId).html(data); },
|
||||
beforeSend: function(){ $this.addClass('ajax-loading'); },
|
||||
|
|
Loading…
Reference in New Issue