Feature #5840 » live_look_up_similar_issues.patch
| app/views/issues/_form.html.erb | ||
|---|---|---|
|
<% if @issue.safe_attribute? 'subject' %>
|
||
|
<p><%= f.text_field :subject, :size => 80, :maxlength => 255, :required => true %></p>
|
||
|
<% if @issue.new_record? %>
|
||
|
<div class="notice">
|
||
|
<div id="similar_issues">
|
||
|
</div>
|
||
|
</div>
|
||
|
<% end %>
|
||
|
<% end %>
|
||
|
<% if @issue.safe_attribute? 'description' %>
|
||
| ... | ... | |
|
<% heads_for_wiki_formatter %>
|
||
|
<%= javascript_tag do %>
|
||
|
<% if @issue.new_record? %>
|
||
|
options = {
|
||
|
response: function(e,ui){
|
||
|
if(ui.content.length>0){
|
||
|
$('#similar_issues').html('<%= l(:text_following_issues_might_be_similar) %> <%= link_to_function l(:button_hide), "$('#similar_issues').html('');" %><ul></ul>');
|
||
|
$.each(ui.content, function(index,elm) { $('#similar_issues ul').append('<li><a href=\"/issues/' + elm.id + '\">' + elm.label + '</li>'); });
|
||
|
}else{
|
||
|
$('#similar_issues').html('');
|
||
|
}
|
||
|
},
|
||
|
open: function(e,ui){ $(".ui-autocomplete").hide(); }
|
||
|
}
|
||
|
observeAutocompleteField('issue_subject', '<%= "#{escape_javascript auto_complete_issues_path(:project_id => @issue.project, :scope => Setting.cross_project_subtasks, :status => @issue.closed? ? 'c' : 'o', :issue_id => @issue.id)}" %>', options);
|
||
|
<% end %>
|
||
|
$(document).ready(function(){
|
||
|
$("#issue_tracker_id, #issue_status_id").each(function(){
|
||
|
$(this).val($(this).find("option[selected=selected]").val());
|
||
|
});
|
||
|
<% if @issue.new_record? %>
|
||
|
$("#issue_subject").keyup(function(){if($(this).val().length<2){$('#similar_issues').html('');}});
|
||
|
$("#issue_subject").removeClass("autocomplete");
|
||
|
<% end %>
|
||
|
});
|
||
|
<% end %>
|
||
| config/locales/en.yml | ||
|---|---|---|
|
text_select_apply_tracker: "Select tracker"
|
||
|
text_avatar_server_config_html: The current avatar server is <a href="%{url}">%{url}</a>. You can configure it in config/configuration.yml.
|
||
|
text_no_subject: no subject
|
||
|
text_following_issues_might_be_similar: The following issues might be similar.
|
||
|
default_role_manager: Manager
|
||
| public/stylesheets/application.css | ||
|---|---|---|
|
.tabular input, .tabular select {max-width:95%}
|
||
|
.tabular textarea {width:95%; resize:vertical;}
|
||
|
.tabular div.notice {padding-left: 180px}
|
||
|
.tabular label{
|
||
|
font-weight: bold;
|
||
| public/stylesheets/responsive.css | ||
|---|---|---|
|
width: auto;
|
||
|
max-width: 95%;
|
||
|
}
|
||
|
.tabular div.notice {
|
||
|
padding-left: 0
|
||
|
}
|
||
|
/* new issue form */
|
||
|
#all_attributes p:first-child {
|
||
- « Previous
- 1
- …
- 3
- 4
- 5
- Next »