Sha256: 9bb6665eb08fa75ad9d8efccda931b89a649cd7880c3c2ca0311d0209990c476

Contents?: true

Size: 1.16 KB

Versions: 13

Compression:

Stored size: 1.16 KB

Contents

<% content_for :javascripts do %>
  <script type="text/javascript">
    var CKEDITOR_BASEPATH = '/assets/ckeditor/';
  </script>

  <%= javascript_include_tag 'ckeditor/ckeditor' %>
  <%= javascript_include_tag 'ckeditor/adapters/jquery' %>

  <script type="text/javascript">
    $(document).ready(function() {
      $(".rich_text").ckeditor();
    });
  </script>
<% end %>

<%
  custom = { :rows => @resource.typus_options_for(:form_rows), :class => "rich_text" }
  options = options.merge!(custom)
%>

<%
  unless params[:_popup] || options[:disabled] == true
    input = "#{@resource.model_name.to_s.underscore.gsub("/", "_")}_#{attribute}"
    insert_picture = <<-DATA
  <small>
    #{link_to "Insert picture",
              {:controller => "/admin/assets", :_popup => true, :_input => input},
              {:class => "iframe", :style => "font-size: 10px; background: black; color: white; padding: 2px 5px; -moz-border-radius: 3px; -webkit-border-radius: 3px;"}}
  </small>
    DATA
    label_text << insert_picture.html_safe
  end
%>

<div class="clearfix" id="<%= attribute_id %>">
  <%= form.label attribute, label_text.html_safe %>
  <%= form.text_area attribute, options %>
</div>

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
brainsome_typus-4.0.0.beta13 app/views/admin/templates/_text_with_ckeditor_and_assets.html.erb
brainsome_typus-4.0.0.beta12 app/views/admin/templates/_text_with_ckeditor_and_assets.html.erb
brainsome_typus-4.0.0.beta11 app/views/admin/templates/_text_with_ckeditor_and_assets.html.erb
brainsome_typus-4.0.0.beta10 app/views/admin/templates/_text_with_ckeditor_and_assets.html.erb
brainsome_typus-4.0.0.beta9 app/views/admin/templates/_text_with_ckeditor_and_assets.html.erb
brainsome_typus-4.0.0.beta8 app/views/admin/templates/_text_with_ckeditor_and_assets.html.erb
brainsome_typus-4.0.0.beta7 app/views/admin/templates/_text_with_ckeditor_and_assets.html.erb
brainsome_typus-4.0.0.beta6 app/views/admin/templates/_text_with_ckeditor_and_assets.html.erb
brainsome_typus-4.0.0.beta5 app/views/admin/templates/_text_with_ckeditor_and_assets.html.erb
brainsome_typus-4.0.0.beta4 app/views/admin/templates/_text_with_ckeditor_and_assets.html.erb
brainsome_typus-4.0.0.beta3 app/views/admin/templates/_text_with_ckeditor_and_assets.html.erb
brainsome_typus-4.0.0.beta2 app/views/admin/templates/_text_with_ckeditor_and_assets.html.erb
brainsome_typus-4.0.0.beta1 app/views/admin/templates/_text_with_ckeditor_and_assets.html.erb