修改bug<forge网站的项目缺陷的关联问题机制有问题>
Signed-off-by: alan <547533434@qq.com>
This commit is contained in:
parent
2ac9456201
commit
591fc409b3
|
@ -29,7 +29,11 @@ class AutoCompletesController < ApplicationController
|
|||
@issues += scope.where("LOWER(#{Issue.table_name}.subject) LIKE LOWER(?)", "%#{q}%").order("#{Issue.table_name}.id DESC").limit(10).all
|
||||
@issues.compact!
|
||||
end
|
||||
render :layout => false
|
||||
#render :layout => false
|
||||
render :json => @issues.map {|issue| {
|
||||
'value' => issue[:subject]
|
||||
|
||||
}}
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -30,8 +30,13 @@
|
|||
<% if @issue.safe_attribute? 'subject' %>
|
||||
<p><%= f.text_field :subject, :size => 80, :maxlength => 255, :required => true, :style => "font-size:small" %></p>
|
||||
<!--Added by young-->
|
||||
<%= javascript_tag "observeAutocompleteField('issue_subject', '#{escape_javascript auto_complete_issues_path(:project_id => @project, :scope => (Setting.cross_project_issue_relations? ? 'all' : nil))}')" %>
|
||||
<!--Ended by young-->
|
||||
<%= javascript_tag do %>
|
||||
observeAutocompleteField('issue_subject', '<%= escape_javascript auto_complete_issues_path(:project_id => @project,:scope => (Setting.cross_project_issue_relations? ? 'all' : nil)) %>',
|
||||
{ select: function(event, ui) {
|
||||
$('input#issue_subject').val(ui.item.value);
|
||||
}
|
||||
});
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -612,7 +612,7 @@ RedmineApp::Application.routes.draw do
|
|||
get 'test_connection', :as => 'try_connection'
|
||||
end
|
||||
collection do
|
||||
get 'autocomplete_for_new_user'
|
||||
get 'autocomplete_for_new_user'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue