forked from refinery/refinerycms
-
Notifications
You must be signed in to change notification settings - Fork 12
/
_javascripts.html.erb
33 lines (26 loc) · 1.38 KB
/
_javascripts.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<%
js_caching = Rails.root.writable? and RefinerySetting.find_or_set(:use_resource_caching, true)
login = login? unless defined?(login)
-%>
<%= yield :before_javascript_libraries -%>
<%= javascript_include_tag 'refinery/i18n' -%>
<script>I18n.locale = '<%= I18n.locale %>';</script>
<%= javascript_include_tag 'translations' if Rails.root.join('public', 'javascripts', 'translations.js').exist? -%>
<%= jquery_include_tags :caching => js_caching -%>
<%= javascript_include_tag 'rails.js' %>
<%= javascript_include_tag 'jquery/jquery.corner.js',
'jquery/jquery.textTruncate.js',
'jquery/jquery.html5-placeholder-shim.js',
'jquery/jquery.timers.js',
'jquery/jquery.jcarousel.js',
:cache => ("cache/jquery-plugins" if js_caching) unless login -%>
<%= javascript_include_tag 'wymeditor/jquery.refinery.wymeditor.js', 'admin' %>
<%= yield :after_javascript_libraries -%>
<%= javascript_include_tag 'refinery/boot_wym',
'refinery/core',
'refinery/site_bar',
'refinery/admin',
'refinery/submenu',
:cache => ("cache/admin" if js_caching) unless login -%>
<%= javascript_include_tag 'refinery/core' if login -%>
<%= yield :javascripts -%>