From: Jean-Philippe Lang Date: Wed, 5 Mar 2008 11:14:35 +0000 (+0000) Subject: Display wiki syntax quick ref link within the jstoolbar (closes #629, #767). X-Git-Tag: 0.7.0-RC1~98 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c61424e57a0f41943aeda7b22ed2b206d138427e;p=redmine.git 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 --- diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index b9318a3f7..a6acafb5b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -444,9 +444,14 @@ module ApplicationHelper def wikitoolbar_for(field_id) return '' unless Setting.text_formatting == 'textile' + + help_link = l(:setting_text_formatting) + ': ' + + link_to(l(:label_help), compute_public_path('wiki_syntax', 'help', 'html'), + :onclick => "window.open(\"#{ compute_public_path('wiki_syntax', 'help', 'html') }\", \"\", \"resizable=yes, location=no, width=300, height=640, menubar=no, status=no, scrollbars=yes\"); return false;") + javascript_include_tag('jstoolbar/jstoolbar') + javascript_include_tag("jstoolbar/lang/jstoolbar-#{current_language}") + - javascript_tag("var toolbar = new jsToolBar($('#{field_id}')); toolbar.draw();") + javascript_tag("var toolbar = new jsToolBar($('#{field_id}')); toolbar.setHelpLink('#{help_link}'); toolbar.draw();") end def content_for(name, content = nil, &block) diff --git a/app/views/wiki/edit.rhtml b/app/views/wiki/edit.rhtml index e5b0687f6..19f3bd5ae 100644 --- a/app/views/wiki/edit.rhtml +++ b/app/views/wiki/edit.rhtml @@ -3,11 +3,7 @@ <% form_for :content, @content, :url => {:action => 'edit', :page => @page.title}, :html => {:id => 'wiki_form'} do |f| %> <%= f.hidden_field :version %> <%= error_messages_for 'content' %> -
-<%= l(:setting_text_formatting) %>: -<%= link_to l(:label_help), compute_public_path('wiki_syntax', 'help', 'html'), - :onclick => "window.open('#{ compute_public_path('wiki_syntax', 'help', 'html') }', '', 'resizable=yes, location=no, width=300, height=640, menubar=no, status=no, scrollbars=yes'); return false;" %> -
+

<%= f.text_area :text, :cols => 100, :rows => 25, :class => 'wiki-edit', :accesskey => accesskey(:edit) %>


<%= f.text_field :comments, :size => 120 %>

<%= submit_tag l(:button_save) %> diff --git a/public/help/wiki_syntax.html b/public/help/wiki_syntax.html index 17b54a0b2..d2ca19b2c 100644 --- a/public/help/wiki_syntax.html +++ b/public/help/wiki_syntax.html @@ -4,10 +4,10 @@ Wiki formatting -