Sha256: f92170ac2694d5da7e20599c573d4a2ea249d25eda0e33836a10a26d23fa0a4a

Contents?: true

Size: 853 Bytes

Versions: 1

Compression:

Stored size: 853 Bytes

Contents

<% if asset.changed? %>
  <% case asset.type.constantize.short_name %>
  <% when 'image' %>
    $("#quadro-modal .modal-content").html("<%= escape_javascript(render('quadro/assets/image/form', asset: asset, page: page)) %>");
  <% when 'slide' %>
    $("#quadro-modal .modal-content").html("<%= escape_javascript(render('quadro/assets/slide/form', asset: asset, widget: widget, page: page)) %>");
  <% end %>
<% else %>
  <% case asset.type.constantize.short_name %>
  <% when 'image' %>
    $('#image-<%= asset.id %>').replaceWith('<%= escape_javascript(render("quadro/assets/image/image", asset: asset, page: page))%>');
  <% when 'slide' %>
    $('#slide-<%= asset.id %>').replaceWith('<%= escape_javascript(render("quadro/assets/slide/slide", asset: asset, widget: widget, page: page))%>');
  <% end %>
  $("#quadro-modal").modal('hide');
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
quadro-0.5.7 app/views/quadro/assets/update.js.erb