From c065e4374ad561f69bf93b78d31b395bee848ca1 Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Wed, 11 Dec 2024 19:08:27 +0000 Subject: Adds global setting In Display tab to disable JS based table sort in wiki content (#40588). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Jens Krämer (user:jkraemer). git-svn-id: https://svn.redmine.org/redmine/trunk@23401 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/helpers/application_helper.rb') diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2db6ce7ee..fe250f7f3 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1790,12 +1790,12 @@ module ApplicationHelper tags = javascript_include_tag( 'jquery-3.7.1-ui-1.13.3', 'rails-ujs', - 'tribute-5.1.3.min', - 'tablesort-5.2.1.min.js', - 'tablesort-5.2.1.number.min.js', - 'application', - 'responsive' + 'tribute-5.1.3.min' ) + if Setting.wiki_tablesort_enabled? + tags << javascript_include_tag('tablesort-5.2.1.min.js', 'tablesort-5.2.1.number.min.js') + end + tags << javascript_include_tag('application', 'responsive') unless User.current.pref.warn_on_leaving_unsaved == '0' warn_text = escape_javascript(l(:text_warn_on_leaving_unsaved)) tags << -- cgit v1.2.3