summaryrefslogtreecommitdiffstats
path: root/lib/redmine/wiki_formatting
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-03-28 19:56:22 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-03-28 19:56:22 +0000
commit70d765e906a50e672ab4534882db6f85abf7cc4c (patch)
tree12076438f413951d23ec1c037e681bb4f8f54ee2 /lib/redmine/wiki_formatting
parent393df388fce8c5633ce548882535715f585179c5 (diff)
downloadredmine-70d765e906a50e672ab4534882db6f85abf7cc4c.tar.gz
redmine-70d765e906a50e672ab4534882db6f85abf7cc4c.zip
Moves jstoolbar script include tags to head.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5238 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/wiki_formatting')
-rw-r--r--lib/redmine/wiki_formatting/textile/helper.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/redmine/wiki_formatting/textile/helper.rb b/lib/redmine/wiki_formatting/textile/helper.rb
index 77cb90c67..d6d779af9 100644
--- a/lib/redmine/wiki_formatting/textile/helper.rb
+++ b/lib/redmine/wiki_formatting/textile/helper.rb
@@ -27,9 +27,6 @@ module Redmine
link_to(l(:label_help), url,
:onclick => "window.open(\"#{ url }\", \"\", \"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/textile') +
- javascript_include_tag("jstoolbar/lang/jstoolbar-#{current_language.to_s.downcase}") +
javascript_tag("var wikiToolbar = new jsToolBar($('#{field_id}')); wikiToolbar.setHelpLink('#{help_link}'); wikiToolbar.draw();")
end
@@ -38,7 +35,11 @@ module Redmine
end
def heads_for_wiki_formatter
- stylesheet_link_tag 'jstoolbar'
+ @@heads_for_wiki_formatter ||=
+ javascript_include_tag('jstoolbar/jstoolbar') +
+ javascript_include_tag('jstoolbar/textile') +
+ javascript_include_tag("jstoolbar/lang/jstoolbar-#{current_language.to_s.downcase}") +
+ stylesheet_link_tag('jstoolbar')
end
end
end