Icon for the textile help link.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11087 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2013-01-02 07:47:12 +00:00
parent 758e07cd96
commit a18f6ffb37
5 changed files with 17 additions and 11 deletions

View File

@ -23,10 +23,7 @@ module Redmine
heads_for_wiki_formatter
# Is there a simple way to link to a public resource?
url = "#{Redmine::Utils.relative_url_root}/help/wiki_syntax.html"
help_link = link_to(l(:setting_text_formatting), url,
:onclick => "window.open(\"#{ url }\", \"\", \"resizable=yes, location=no, width=300, height=640, menubar=no, status=no, scrollbars=yes\"); return false;")
javascript_tag("var wikiToolbar = new jsToolBar(document.getElementById('#{field_id}')); wikiToolbar.setHelpLink('#{escape_javascript help_link}'); wikiToolbar.draw();")
javascript_tag("var wikiToolbar = new jsToolBar(document.getElementById('#{field_id}')); wikiToolbar.setHelpLink('#{escape_javascript url}'); wikiToolbar.draw();")
end
def initial_page_content(page)

File diff suppressed because one or more lines are too long

View File

@ -207,12 +207,6 @@ jsToolBar.prototype = {
}
this.toolNodes = {}; // vide les raccourcis DOM/**/
var h = document.createElement('div');
h.className = 'help'
h.innerHTML = this.help_link;
'<a href="/help/wiki_syntax.html" onclick="window.open(\'/help/wiki_syntax.html\', \'\', \'resizable=yes, location=no, width=300, height=640, menubar=no, status=no, scrollbars=yes\'); return false;">Aide</a>';
this.toolbar.appendChild(h);
// Draw toolbar elements
var b, tool, newTool;

View File

@ -198,3 +198,14 @@ jsToolBar.prototype.elements.img = {
wiki: function() { this.encloseSelection("!", "!") }
}
}
// 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') }
}
}

View File

@ -95,3 +95,6 @@
.jstb_img {
background-image: url(../images/jstoolbar/bt_img.png);
}
.jstb_help {
background-image: url(../images/help.png);
}