Sha256: 8bb462b2c86d41767d2f09c5ff1734709e66fdb13586895299ee08a05d90fb33
Contents?: true
Size: 1.53 KB
Versions: 10
Compression:
Stored size: 1.53 KB
Contents
<div id="jscropper"> <% if @no_image_notice %> <%= render_message :warn do %> <%= @no_image_notice %> <% end %> <% else %> <%= render_message do %> <%= simple_format Alchemy.t(:explain_cropping) %> <% end %> <div class="thumbnail_background"> <%= image_tag( show_alchemy_picture_path(@picture, size: '800x600', format: 'png'), id: 'imageToCrop' ) %> </div> <%= form_for( @essence_picture, url: alchemy.admin_essence_picture_path(@essence_picture, options: @options.to_json), id: 'image_cropper_form', remote: true ) do |f| %> <%= f.hidden_field :crop_from %> <%= f.hidden_field :crop_size %> <%= hidden_field_tag :content_id, @content.id %> <%= f.button "#{render_icon(:true)} #{Alchemy.t(:apply)}".html_safe, class: 'with_icon' %> <%= link_to Alchemy.t('Reset Imagemask'), '#', { onclick: 'Alchemy.ImageCropper.reset(); return false', class: 'reset_mask' } %> <% end %> </div> <% end %> <% if @initial_box && @default_box %> <script type="text/javascript"> Alchemy.ImageLoader('#jscropper .thumbnail_background'); $('#imageToCrop').load(function() { Alchemy.ImageCropper.init( <%= @initial_box.values.to_json %>, <% if @essence_picture.can_be_cropped_to("#{@min_size[:width]}x#{@min_size[:height]}") %> <%= @min_size.values.to_json %>, <% else %> <%= false %>, <% end %> <%= @default_box.values.to_json %>, <%= @ratio %>, <%= @picture.image_size.values.to_json %> ); }); </script> <% end %>
Version data entries
10 entries across 10 versions & 1 rubygems