##// END OF EJS Templates
Load scripts and css for wiki formatter toolbar when needed....
Jean-Philippe Lang -
r5119:bf58ad61e57a
parent child
Show More
@@ -11,7 +11,6
11 11 <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
12 12 <%= javascript_heads %>
13 13 <%= heads_for_theme %>
14 <%= heads_for_wiki_formatter %>
15 14 <!--[if IE 6]>
16 15 <style type="text/css">
17 16 * html body{ width: expression( document.documentElement.clientWidth < 900 ? '900px' : '100%' ); }
@@ -20,6 +20,7 module Redmine
20 20 module Textile
21 21 module Helper
22 22 def wikitoolbar_for(field_id)
23 heads_for_wiki_formatter
23 24 # Is there a simple way to link to a public resource?
24 25 url = "#{Redmine::Utils.relative_url_root}/help/wiki_syntax.html"
25 26
@@ -35,11 +36,15 module Redmine
35 36 end
36 37
37 38 def heads_for_wiki_formatter
38 @@heads_for_wiki_formatter ||=
39 javascript_include_tag('jstoolbar/jstoolbar') +
40 javascript_include_tag('jstoolbar/textile') +
41 javascript_include_tag("jstoolbar/lang/jstoolbar-#{current_language.to_s.downcase}") +
42 stylesheet_link_tag('jstoolbar')
39 unless @heads_for_wiki_formatter_included
40 content_for :header_tags do
41 javascript_include_tag('jstoolbar/jstoolbar') +
42 javascript_include_tag('jstoolbar/textile') +
43 javascript_include_tag("jstoolbar/lang/jstoolbar-#{current_language.to_s.downcase}") +
44 stylesheet_link_tag('jstoolbar')
45 end
46 @heads_for_wiki_formatter_included = true
47 end
43 48 end
44 49 end
45 50 end
General Comments 0
You need to be logged in to leave comments. Login now