Sha256: 3674d352084d72229a9f8156ee323ebcca984a033a51195f2156a108c084dd65

Contents?: true

Size: 842 Bytes

Versions: 3

Compression:

Stored size: 842 Bytes

Contents

require 'ack_rails_admin_jcrop'

module RailsAdmin
  module Config
    module Fields
      module Types
        class EnjoyImage < RailsAdmin::Config::Fields::Types::Jcrop
          # Register field type for the type loader
          RailsAdmin::Config::Fields::Types::register(self)

          register_instance_option :help do
            "SVG не изменяется."
          end

          register_instance_option :jcrop_options do
            "#{name}_jcrop_options".to_sym
          end

        end
      end
    end
  end
end

RailsAdmin::Config::Fields.register_factory do |parent, properties, fields|
  if (properties.respond_to?(:name) ? properties.name : properties[:name]) == :enjoy_image
    fields << RailsAdmin::Config::Fields::Types::EnjoyImage.new(parent, :enjoy_image, properties)
    true
  else
    false
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
enjoy_cms_gallery-0.4.1 lib/enjoy/gallery/rails_admin_ext/enjoy_image.rb
enjoy_cms_gallery-0.4.0.2 lib/enjoy/gallery/rails_admin_ext/enjoy_image.rb
enjoy_cms_gallery-0.4.0.1 lib/enjoy/gallery/rails_admin_ext/enjoy_image.rb