diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-03-05 11:14:35 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-03-05 11:14:35 +0000 |
commit | c61424e57a0f41943aeda7b22ed2b206d138427e (patch) | |
tree | abec5c51bffd7d6ad41c1f718c02483e31d0d3fe /public/javascripts | |
parent | b0754ca720f6262dd3b6f16eac23082d28d6fae6 (diff) | |
download | redmine-c61424e57a0f41943aeda7b22ed2b206d138427e.tar.gz redmine-c61424e57a0f41943aeda7b22ed2b206d138427e.zip |
Display wiki syntax quick ref link within the jstoolbar (closes #629, #767).
Added named links syntax on quick ref (closes #766, #778).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1190 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public/javascripts')
-rw-r--r-- | public/javascripts/jstoolbar/jstoolbar.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/public/javascripts/jstoolbar/jstoolbar.js b/public/javascripts/jstoolbar/jstoolbar.js index 7a2a2a49e..be982d4b9 100644 --- a/public/javascripts/jstoolbar/jstoolbar.js +++ b/public/javascripts/jstoolbar/jstoolbar.js @@ -151,6 +151,7 @@ jsToolBar.prototype = { base_url: '', mode: 'wiki', elements: {}, + help_link: '', getMode: function() { return this.mode; @@ -165,6 +166,10 @@ jsToolBar.prototype = { this.draw(mode); }, + setHelpLink: function(link) { + this.help_link = link; + }, + button: function(toolName) { var tool = this.elements[toolName]; if (typeof tool.fn[this.mode] != 'function') return null; @@ -201,7 +206,13 @@ jsToolBar.prototype = { this.toolbar.removeChild(this.toolbar.firstChild) } 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; |