[IMP] website snippet: add comment for auto set snippet and remove data-snippet-id in website_sale view

bzr revid: chm@openerp.com-20130924082423-ylzeprl3w4tlb83e
This commit is contained in:
Christophe Matthieu
2013-09-24 10:24:23 +02:00
parent 3862a4e83d
commit 9bb4af7d9f
2 changed files with 7 additions and 3 deletions
@@ -1027,7 +1027,6 @@
this.set_options_background();
this.set_options_style();
}
console.log(nb);
if (nb <= 1) {
this.$target.find('.carousel-control').addClass("hidden");
}
@@ -1159,7 +1158,12 @@
}
});
website.snippet.selector.push([ _.map([1,2,3,4,5,6,7,8,9,10,11,12], function (v) {return '.row > .col-md-'+v;}).join(","), 'colmd']);
/*
* data-snippet-id automatically setted
* Don't need to add data-snippet-id="..." into the views
*/
website.snippet.selector.push([".row > div[class*='col-md-']", 'colmd']);
website.snippet.selector.push(['hr', 'hr']);
})();
+1 -1
View File
@@ -111,7 +111,7 @@
<div class='row style_default'>
<div class="col-md-12" id="products_grid">
<t t-foreach="products" t-as="product">
<div t-attf-class="col-md-#{ product.website_sizex } oe_product oe-height-#{ product.website_sizey } #{ product.website_product_class}" t-att-data-publish="product.website_published" data-snippet-id="colmd">
<div t-attf-class="col-md-#{ product.website_sizex } oe_product oe-height-#{ product.website_sizey } #{ product.website_product_class}" t-att-data-publish="product.website_published">
<div class="oe_product_description">
<a t-attf-href="/shop/product/#{ product.id }/?#{ search and ('search=%s' % search) or ''}#{ category_id and ('&amp;category_id=%s' % category_id) or ''}">