Table column sorting (#1718).

Patch by Takenori TAKAKI.


git-svn-id: http://svn.redmine.org/redmine/trunk@19833 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2020-06-24 05:53:08 +00:00
parent a4809b1af7
commit 986d487fcd
6 changed files with 68 additions and 1 deletions

View File

@@ -1631,7 +1631,13 @@ module ApplicationHelper
# Returns the javascript tags that are included in the html layout head
def javascript_heads
tags = javascript_include_tag('jquery-3.5.1-ui-1.12.1-ujs-5.2.3', 'tribute-5.1.3.min', 'application', 'responsive')
tags = javascript_include_tag(
'jquery-3.5.1-ui-1.12.1-ujs-5.2.3',
'tribute-5.1.3.min',
'tablesort-5.2.1.min.js',
'tablesort-5.2.1.number.min.js',
'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

View File

@@ -7,6 +7,7 @@
$("#journal-<%= @journal.id %>-notes").replaceWith('<%= escape_javascript(render_notes(@journal.issue, @journal, :reply_links => authorize_for('issues', 'edit'))) %>');
$("#journal-<%= @journal.id %>-notes").show();
$("#journal-<%= @journal.id %>-form").remove();
setupWikiTableSortableHeader();
<% end %>
<%= call_hook(:view_journals_update_js_bottom, { :journal => @journal }) %>