diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 4da08c2ca..ce4672876 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1569,7 +1569,7 @@ module ApplicationHelper # Returns the javascript tags that are included in the html layout head def javascript_heads - tags = javascript_include_tag('jquery-2.2.4-ui-1.11.0-ujs-5.2.3', 'application', 'responsive') + tags = javascript_include_tag('jquery-2.2.4-ui-1.11.0-ujs-5.2.3', 'tribute-3.7.3.min', 'application', 'responsive') unless User.current.pref.warn_on_leaving_unsaved == '0' tags << "\n".html_safe + javascript_tag("$(window).on('load', function(){ warnLeavingUnsaved('#{escape_javascript l(:text_warn_on_leaving_unsaved)}'); });") end diff --git a/app/helpers/custom_fields_helper.rb b/app/helpers/custom_fields_helper.rb index 655492e0a..00140396d 100644 --- a/app/helpers/custom_fields_helper.rb +++ b/app/helpers/custom_fields_helper.rb @@ -80,13 +80,21 @@ module CustomFieldsHelper # Return custom field html tag corresponding to its format def custom_field_tag(prefix, custom_value) css = "#{custom_value.custom_field.field_format}_cf" - css += ' wiki-edit' if custom_value.custom_field.full_text_formatting? + data = nil + if custom_value.custom_field.full_text_formatting? + css += ' wiki-edit' + data = { + :auto_complete => true, + :issues_url => auto_complete_issues_path(:project_id => custom_value.customized.project, :q => '') + } if custom_value.customized && custom_value.customized.project + end custom_value.custom_field.format.edit_tag self, custom_field_tag_id(prefix, custom_value.custom_field), custom_field_tag_name(prefix, custom_value.custom_field), custom_value, - :class => css + :class => css, + :data => data end # Return custom field name tag diff --git a/app/views/documents/_form.html.erb b/app/views/documents/_form.html.erb index bd3b7cd9f..b8b8c8404 100644 --- a/app/views/documents/_form.html.erb +++ b/app/views/documents/_form.html.erb @@ -3,7 +3,12 @@
<%= f.select :category_id, DocumentCategory.active.collect {|c| [c.name, c.id]} %>
<%= f.text_field :title, :required => true, :size => 60 %>
<%= f.text_area :description, :cols => 60, :rows => 15, :class => 'wiki-edit' %>
<%= f.text_area :description, :cols => 60, :rows => 15, :class => 'wiki-edit', + :data => { + :auto_complete => true, + :issues_url => auto_complete_issues_path(:project_id => @project, :q => '') + } +%>
<%= custom_field_tag_with_label :document, value %>
<%= label_tag "message_content", l(:description_message_content), :class => "hidden-for-sighted" %> -<%= f.text_area :content, :cols => 80, :rows => 15, :class => 'wiki-edit', :id => 'message_content' %>
<%= f.text_area :summary, :cols => 60, :rows => 2 %>
<%= f.text_area :description, :required => true, :cols => 60, :rows => 15, :class => 'wiki-edit' %>
<%= f.text_area :description, :required => true, :cols => 60, :rows => 15, :class => 'wiki-edit', + :data => { + :auto_complete => true, + :issues_url => auto_complete_issues_path(:project_id => @project, :q => '') + } +%>
<%= l(:label_attachment_plural) %><%= render :partial => 'attachments/form', :locals => {:container => @news} %>
<%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %>
<%= submit_tag l(:button_add) %>