Sha256: 4377719a02177e0a780b968a1e7cdc4da93593c96970a444878478e0f21c97a0

Contents?: true

Size: 1.61 KB

Versions: 3

Compression:

Stored size: 1.61 KB

Contents

<% unless model.new_record? %>
  <% javascript "jquery.fancybox-1.3.2.pack.js" %>
  <% stylesheet "fancybox/jquery.fancybox-1.3.2.css" %>
  
  <div class="gray-blocks">
    <div style="padding: 20px;" class="bg-bl">
      <div style="padding: 0px 0px 15px;" class="gr-title"><%= t('manage.pictures') %></div>
      
      <%= content_tag(:div, :id=>"swf_collection_#{model.id}", :class=>"galery") do %>
        <%= render :partial=>"/manage/assets/picture", :collection => model.pictures %>
      <% end %>
      
      <div style="padding-top:20px;">
        <%= content_tag(:span, nil, :id=>"swf_button_#{model.id}", :class=>"white-but") %>
        <%= content_tag(:div, nil, :id=>"swf_container_#{model.id}") %>
      </div>
    </div>
  </div>
  
  <%= render :partial=>"/manage/assets/swfscript", :locals=>{:model=>model, :klass=>model.pictures.name } %>
  
  <script type='text/javascript'>
    $(document).ready(function(){
      /*$("div.galery a.fancybox").fancybox({
				'titleShow'		: true,
				'transitionIn'	: 'none',
				'transitionOut'	: 'none'
			});*/
      
      $('div.galery a.del').bind("ajax:complete", function(){
        var pid = $(this).attr('href').replace('/manage/assets/', '');
        $('#picture_' + pid).fadeOut(1);
      });
      
      $("div.galery").sortable({
			  revert: true,
			  update: function(event, ui){
			    var data = $('div.galery').sortable('serialize');
			    $.ajax({
            url: "<%= sort_manage_assets_path(:klass => model.pictures.name) %>",
            data: data,
            dataType: 'script',
            type: 'POST'
          });
			  }
		  });
    });
  </script>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
freeberry-0.2.9 lib/generators/freeberry/base/templates/views/manage/assets/_collection.html.erb
freeberry-0.2.7 lib/generators/freeberry/base/templates/views/manage/assets/_collection.html.erb
freeberry-0.2.6 lib/generators/freeberry/base/templates/views/manage/assets/_collection.html.erb