Sha256: 174b166b8a7dabdfe9e0578a74fc69ca12f529f4633c92be2c29cf6b20c3a460

Contents?: true

Size: 593 Bytes

Versions: 2

Compression:

Stored size: 593 Bytes

Contents

.asset-list
  - for asset in list
    .asset-tile{:id => asset.id}
      %p.asset_tag= asset.to_asset_tag
      %p
        %em= asset.name
:javascript
  $(".asset-tile").click(function(ret){ 
    var tile = $(this);
    var link = $.fn.colorbox.element();
    var preview = link.prev();
    var input_name = link.attr('rel');
    var id = tile.attr("id");
    preview.html(tile.children(".asset_tag").html());
    $("[name*='"+input_name+"']").attr("value", id);
    link.attr("href", "/admin/assets/"+tile.attr("id")+"/change");
    link.text("Change Asset");
    $.fn.colorbox.close();
  });

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
orange-sparkles-0.5.8 lib/orange-sparkles/views/assets/list.haml
orange-sparkles-0.5.7 lib/orange-sparkles/views/assets/list.haml