Commit 429c47be authored by marutosijp's avatar marutosijp

add markdown wiki syntax help to tool bar (#16373)

Contributed by Go MAEDA.

git-svn-id: https://svn.redmine.org/redmine/trunk@14191 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 95652010
......@@ -21,7 +21,8 @@ module Redmine
module Helper
def wikitoolbar_for(field_id)
heads_for_wiki_formatter
javascript_tag("var wikiToolbar = new jsToolBar(document.getElementById('#{field_id}')); wikiToolbar.draw();")
url = "#{Redmine::Utils.relative_url_root}/help/#{current_language.to_s.downcase}/wiki_syntax_markdown.html"
javascript_tag("var wikiToolbar = new jsToolBar(document.getElementById('#{field_id}')); wikiToolbar.setHelpLink('#{escape_javascript url}'); wikiToolbar.draw();")
end
def initial_page_content(page)
......
......@@ -192,3 +192,11 @@ jsToolBar.prototype.elements.img = {
// spacer
jsToolBar.prototype.elements.space5 = {type: 'space'}
// help
jsToolBar.prototype.elements.help = {
type: 'button',
title: 'Help',
fn: {
wiki: function() { window.open(this.help_link, '', 'resizable=yes, location=no, width=300, height=640, menubar=no, status=no, scrollbars=yes') }
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment