diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/wiki_formatting/markdown/helper.rb | 4 | ||||
-rw-r--r-- | lib/redmine/wiki_formatting/textile/helper.rb | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/redmine/wiki_formatting/markdown/helper.rb b/lib/redmine/wiki_formatting/markdown/helper.rb index 6b5a1dfc3..aafa90e3c 100644 --- a/lib/redmine/wiki_formatting/markdown/helper.rb +++ b/lib/redmine/wiki_formatting/markdown/helper.rb @@ -33,11 +33,13 @@ module Redmine def heads_for_wiki_formatter unless @heads_for_wiki_formatter_included + toolbar_language_options = User.current && User.current.pref.toolbar_language_options content_for :header_tags do javascript_include_tag('jstoolbar/jstoolbar') + javascript_include_tag('jstoolbar/markdown') + javascript_include_tag("jstoolbar/lang/jstoolbar-#{current_language.to_s.downcase}") + - javascript_tag("var wikiImageMimeTypes = #{Redmine::MimeType.by_type('image').to_json};") + + javascript_tag("var wikiImageMimeTypes = #{Redmine::MimeType.by_type('image').to_json};" + + "var userHlLanguages = #{(toolbar_language_options.nil? ? UserPreference::DEFAULT_TOOLBAR_LANGUAGE_OPTIONS : toolbar_language_options.split(',')).to_json};") + stylesheet_link_tag('jstoolbar') end @heads_for_wiki_formatter_included = true diff --git a/lib/redmine/wiki_formatting/textile/helper.rb b/lib/redmine/wiki_formatting/textile/helper.rb index e3865fca5..9b45fd388 100644 --- a/lib/redmine/wiki_formatting/textile/helper.rb +++ b/lib/redmine/wiki_formatting/textile/helper.rb @@ -34,11 +34,13 @@ module Redmine def heads_for_wiki_formatter unless @heads_for_wiki_formatter_included + toolbar_language_options = User.current && User.current.pref.toolbar_language_options content_for :header_tags do javascript_include_tag('jstoolbar/jstoolbar') + javascript_include_tag('jstoolbar/textile') + javascript_include_tag("jstoolbar/lang/jstoolbar-#{current_language.to_s.downcase}") + - javascript_tag("var wikiImageMimeTypes = #{Redmine::MimeType.by_type('image').to_json};") + + javascript_tag("var wikiImageMimeTypes = #{Redmine::MimeType.by_type('image').to_json};" + + "var userHlLanguages = #{(toolbar_language_options.nil? ? UserPreference::DEFAULT_TOOLBAR_LANGUAGE_OPTIONS : toolbar_language_options.split(',')).to_json};") + stylesheet_link_tag('jstoolbar') end @heads_for_wiki_formatter_included = true |