mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-02 13:49:42 +00:00
add markdown wiki syntax help to tool bar (#16373)
Contributed by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@14191 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
47a6a54e87
commit
958d93edbc
@ -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') }
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user