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
This commit is contained in:
Jean-Philippe Lang
2008-03-05 11:14:35 +00:00
parent b0754ca720
commit c61424e57a
5 changed files with 28 additions and 9 deletions

View File

@@ -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;