Updates JS toolbar help button to use the new route (#39111, #40137).

git-svn-id: https://svn.redmine.org/redmine/trunk@22722 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Marius Balteanu
2024-02-19 20:58:13 +00:00
parent 56f3a4dac3
commit 4607e90b43
4 changed files with 6 additions and 18 deletions

View File

@@ -23,11 +23,10 @@ module Redmine
module Helper
def wikitoolbar_for(field_id, preview_url = preview_text_path)
heads_for_wiki_formatter
# Is there a simple way to link to a public resource?
url = "#{Redmine::Utils.relative_url_root}/help/#{current_language.to_s.downcase}/wiki_syntax_textile.html"
javascript_tag(
"var wikiToolbar = new jsToolBar(document.getElementById('#{field_id}')); " \
"wikiToolbar.setHelpLink('#{escape_javascript url}'); " \
"wikiToolbar.setHelpLink('#{escape_javascript help_wiki_syntax_path}'); " \
"wikiToolbar.setPreviewUrl('#{escape_javascript preview_url}'); wikiToolbar.draw();"
)
end