Load scripts and css for wiki formatter toolbar when needed.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5239 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
d16db34454
commit
8c57b95c6a
@ -11,7 +11,6 @@
|
|||||||
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
|
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
|
||||||
<%= javascript_heads %>
|
<%= javascript_heads %>
|
||||||
<%= heads_for_theme %>
|
<%= heads_for_theme %>
|
||||||
<%= heads_for_wiki_formatter %>
|
|
||||||
<!--[if IE 6]>
|
<!--[if IE 6]>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
* html body{ width: expression( document.documentElement.clientWidth < 900 ? '900px' : '100%' ); }
|
* html body{ width: expression( document.documentElement.clientWidth < 900 ? '900px' : '100%' ); }
|
||||||
|
@ -20,6 +20,7 @@ module Redmine
|
|||||||
module Textile
|
module Textile
|
||||||
module Helper
|
module Helper
|
||||||
def wikitoolbar_for(field_id)
|
def wikitoolbar_for(field_id)
|
||||||
|
heads_for_wiki_formatter
|
||||||
# Is there a simple way to link to a public resource?
|
# Is there a simple way to link to a public resource?
|
||||||
url = "#{Redmine::Utils.relative_url_root}/help/wiki_syntax.html"
|
url = "#{Redmine::Utils.relative_url_root}/help/wiki_syntax.html"
|
||||||
|
|
||||||
@ -36,12 +37,16 @@ module Redmine
|
|||||||
end
|
end
|
||||||
|
|
||||||
def heads_for_wiki_formatter
|
def heads_for_wiki_formatter
|
||||||
@@heads_for_wiki_formatter ||=
|
unless @heads_for_wiki_formatter_included
|
||||||
|
content_for :header_tags do
|
||||||
javascript_include_tag('jstoolbar/jstoolbar') +
|
javascript_include_tag('jstoolbar/jstoolbar') +
|
||||||
javascript_include_tag('jstoolbar/textile') +
|
javascript_include_tag('jstoolbar/textile') +
|
||||||
javascript_include_tag("jstoolbar/lang/jstoolbar-#{current_language.to_s.downcase}") +
|
javascript_include_tag("jstoolbar/lang/jstoolbar-#{current_language.to_s.downcase}") +
|
||||||
stylesheet_link_tag('jstoolbar')
|
stylesheet_link_tag('jstoolbar')
|
||||||
end
|
end
|
||||||
|
@heads_for_wiki_formatter_included = true
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user