Sha256: 3e1f6ffc1cc08352e22928aa7d88aebfb37e479609001d60125d9978bc613ec8
Contents?: true
Size: 794 Bytes
Versions: 2
Compression:
Stored size: 794 Bytes
Contents
var hidden_input = $("input[name='<%= j params[:page_part_id] %>[page_partable_id]']"); hidden_input.parents('td').find('a .image, a .placeholder').remove(); <% if @photo.present? %> hidden_input.parents('td').find('a').prepend("<div class='placeholder pull-right'><span class='button button-small button-round' data-icon='U'>Foto kiezen</span></div><div class='image'><img src='<%= @photo.file.thumb %>' /></div>"); hidden_input.val("<%= @photo.id %>"); <% else %> hidden_input.parents('td').find('a').prepend("<div class='placeholder'><span class='button button-small button-round' data-icon='U'>Foto kiezen</span></div>"); hidden_input.parents('td').append("<input type='hidden' type='checkbox' name='<%= j params[:page_part_id] %>[_destroy]' value='1' />") <% end %> $.hideModal();
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
spina-0.6.12 | app/views/spina/admin/photos/insert_photo.js.erb |
spina-0.6.11 | app/views/spina/admin/photos/insert_photo.js.erb |