Sha256: 705d71a4460315620a7574b1b8edbed54a24ed65f9456082d4bc1fee8f9a96bd
Contents?: true
Size: 1.6 KB
Versions: 129
Compression:
Stored size: 1.6 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
129 entries across 129 versions & 1 rubygems