Sha256: 4c21dd1cb90c39db956d85b1d98b4b97ae5a4f0476218134878811c49bf8ae76
Contents?: true
Size: 1.59 KB
Versions: 159
Compression:
Stored size: 1.59 KB
Contents
<% p = @product %> <%= render :partial => 'caboose/products/admin_header' %> <div id='product_<%= p.id %>_category_id'></div> <%= render :partial => 'caboose/products/admin_footer' %> <% content_for :caboose_css do %> <style type='text/css'> #content table.data input[type='checkbox'] { position: relative; margin: 0; padding: 0; } #content table.data td { padding: 0 10px !important; } label span.prefix { display: inline-block; margin: 0 8px; } </style> <% end %> <% content_for :caboose_js do %> <script type='text/javascript'> var mb = false; $(document).ready(function() { add_to_crumbtrail('/admin', 'Admin'); add_to_crumbtrail('/admin/products', 'Products'); add_to_crumbtrail('/admin/products/<%= p.id %>', <%= raw Caboose.json(p.title) %>); add_to_crumbtrail('/admin/products/<%= p.id %>/categories', 'Categories'); mb = new ModelBinder({ name: 'Product', id: <%= p.id %>, update_url: '/admin/products/<%= p.id %>', authenticity_token: '<%= form_authenticity_token %>', attributes: [ { name: 'category_id', nice_name: 'Categories', type: 'checkbox-multiple', options_url: '/admin/categories/options', value: <%= raw Caboose.json(p.categories.collect{ |cat| cat.id }) %>, fixed_placeholder: false, width: 400 } ], on_load: function() { setTimeout(function() { $('label').each(function(i, el) { $(el).html($(el).html().replace(/-/g, "<span class='prefix'>-</span>")); }); }, 400); } }); }); </script> <% end %>
Version data entries
159 entries across 159 versions & 1 rubygems