Sha256: b5ebce87ecdb544ee084adff8796e00c904c308a65f082cd3c2c6bf64d62ca02
Contents?: true
Size: 650 Bytes
Versions: 4
Compression:
Stored size: 650 Bytes
Contents
var hidden_input = $("input[name='<%= j params[:page_part_id] %>[page_partable_id]'], input[name='<%= j params[:page_part_id] %>[structure_partable_id]'], input[data-hidden-field-id='<%= j params[:hidden_field_id] %>']"); hidden_input.parents('.media_picker').find('.image').remove(); <% if @photo.present? %> hidden_input.parents('.media_picker').append("<div class='image'><img src='<%= @photo.file.thumb %>' /></div>"); hidden_input.val("<%= @photo.id %>"); <% else %> hidden_input.parents('.media_picker').append("<input type='hidden' type='checkbox' name='<%= j params[:page_part_id] %>[_destroy]' value='1' />") <% end %> $.hideModal();
Version data entries
4 entries across 4 versions & 1 rubygems