Sha256: cc8fe15dab0ba865249e045904cfdce5dbf4d84d5095b14d81c1ac796f5f80a3

Contents?: true

Size: 702 Bytes

Versions: 7

Compression:

Stored size: 702 Bytes

Contents

<% if asset.persisted? %>
  <% case asset.type.constantize.short_name %>
  <% when 'image' %>
    $('.asset-list').filter('[data-assetable-type="<%= asset.assetable.class.to_s %>"],[data-assetable-id="<%= asset.assetable.id %>"]').append('<%= escape_javascript(render("quadro/assets/image/image", asset: asset, page: page))%>');
  <% when 'slide' %>
    $('.asset-list').filter('[data-assetable-type="<%= asset.assetable.class.to_s %>"],[data-assetable-id="<%= asset.assetable.id %>"]').append('<%= escape_javascript(render("quadro/assets/slide/slide", asset: asset, widget: widget, page: page))%>');
  <% end %>
  new Message('Asset created');
<% else %>
  new Message('Asset not created');
<% end %>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
quadro-0.5.6 app/views/quadro/assets/create.js.erb
quadro-0.5.5 app/views/quadro/assets/create.js.erb
quadro-0.5.4 app/views/quadro/assets/create.js.erb
quadro-0.5.3 app/views/quadro/assets/create.js.erb
quadro-0.5.2 app/views/quadro/assets/create.js.erb
quadro-0.5.1 app/views/quadro/assets/create.js.erb
quadro-0.5.0 app/views/quadro/assets/create.js.erb