Contributed by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@14191
e93f8b46-1217-0410-a6f0-
8f06a7374b81
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)
// 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') }
+ }
+}