Put tinymce in its own js file.

To use on a text area just add the class "tinymce_textarea".
This commit is contained in:
Christophe Vilayphiou committed 2012-03-21 12:41:32 +08:00
1 parent 5d7202af8b
commit 3aa7c5120d
4 files changed
+31 -22

No files matched your search

@@ -146,7 +146,7 @@
<% @site_valid_locales.each do |locale| %>
<td>
<%= I18nVariable.from_locale(locale) %>
<%= f.text_area locale, :style=>"width:100%" %>
<%= f.text_area locale, :style=>"width:100%", :class => 'tinymce_textarea' %>
</td>
<% end %>
<% end %>
@@ -158,7 +158,7 @@
<% @site_valid_locales.each do |locale| %>
<td>
<%= I18nVariable.from_locale(locale) %>
<%= f.text_area locale, :style=>"width:100%" %>
<%= f.text_area locale, :style=>"width:100%", :class => 'tinymce_textarea' %>
</td>
<% end %>
<% end %>
@@ -286,11 +286,4 @@
$(this).parents('table').append(("<%= escape_javascript(add_attribute 'bulletin_file', f, :bulletin_files) %>").replace(old_id, new_id));
});
</script>
<script type="text/javascript">
$(function() {
$('textarea').tinymce({
theme: 'advanced'
});
});
</script>
<% end %>
@@ -15,7 +15,7 @@
<% @site_valid_locales.each do |locale| %>
<td>
<%= I18nVariable.from_locale(locale) %>
<%= f.text_area locale, :style=>"width:100%" %>
<%= f.text_area locale, :style=>"width:100%", :class => 'tinymce_textarea' %>
</td>
<% end %>
<% end %>
@@ -27,14 +27,3 @@
</div>
</div>
<% content_for :page_specific_javascript do %>
<script type="text/javascript">
$(function() {
$('textarea').tinymce({
theme: 'advanced'
});
});
</script>
<% end %>