Sha256: faf5061d1952a9c42cc73980dfeaa1b45da8abef75ff7797fa2e851db8f8d5d0

Contents?: true

Size: 1.1 KB

Versions: 10

Compression:

Stored size: 1.1 KB

Contents

Coprl::Presenters.define(:image_crop, namespace: :plugins) do
  helpers Demo::Helpers::IndentedGrid
  attach :top_nav
  attach :plugin_drawer
  plugin :image_crop

  page_title 'Image Crop'

  indented_grid do
    title 'Drag and drop with cropper preview'
    grid do
      column 6 do
        image_crop id: :event_image,
                   aspect_ratio: 1.0,
                   image: 'https://cdn.mos.cms.futurecdn.net/4f6d31c116fdada59a5cb16d136e3068-970-80.jpg' do
        end
      end
      column 6 do
        file_input name: :event_file_name, preview: :event_image, accept: 'image/png, image/jpeg, image/gif, image/svg+xml' do
          grid do
            column 12 do
              card do
                text 'Drop an image or click'
                button icon: :cloud_upload
              end
            end
          end
        end
      end
      event :change do
        replaces :context_list, ':context_list'
      end
    end
  end

  # image_crop do
  #   event :change do
  #     replaces :context_list, ':context_list'
  #   end
  # end
  attach 'context_list'
  attach :code, file: __FILE__
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
coprl-3.0.0.beta.12 app/demo/plugins/image_crop.pom
coprl-3.0.0.beta.11 app/demo/plugins/image_crop.pom
coprl-3.0.0.beta.10 app/demo/plugins/image_crop.pom
coprl-3.0.0.beta.9 app/demo/plugins/image_crop.pom
coprl-3.0.0.beta.8 app/demo/plugins/image_crop.pom
coprl-3.0.0.beta.7 app/demo/plugins/image_crop.pom
coprl-3.0.0.beta.6 app/demo/plugins/image_crop.pom
coprl-3.0.0.beta.5 app/demo/plugins/image_crop.pom
coprl-3.0.0.beta.4 app/demo/plugins/image_crop.pom
coprl-3.0.0.beta.3 app/demo/plugins/image_crop.pom