[IMP] website_sale: layout of publisher
bzr revid: chm@openerp.com-20130902155431-fkx8b29k7r1qpkp4
This commit is contained in:
parent
86631bae37
commit
85736a0c6a
|
@ -1,4 +1,12 @@
|
|||
.thumbnail.disabled {
|
||||
.thumbnail.disabled :not(.css_unpublish):not(.css_publish) {
|
||||
opacity: 0.5;
|
||||
background: #eee;
|
||||
}
|
||||
.thumbnail > .css_unpublish, .thumbnail > .css_publish {
|
||||
position: absolute;
|
||||
right: -6px;
|
||||
top: -10px;
|
||||
display: none;
|
||||
}
|
||||
.thumbnail:hover > .css_unpublish, .thumbnail:hover > .css_publish {
|
||||
display: block;
|
||||
}
|
|
@ -13,8 +13,13 @@ $(document).ready(function () {
|
|||
|
||||
$payment = $(".oe_website_sale .js_payment");
|
||||
$("input[name='payment_type']", $payment).click(function (ev) {
|
||||
var payment_id = $(ev.target).val();
|
||||
var payment_id = $(ev.currentTarget).val();
|
||||
$("div[data-id]", $payment).addClass("hidden");
|
||||
$("a.btn:last, div[data-id='"+payment_id+"']", $payment).removeClass("hidden");
|
||||
});
|
||||
|
||||
// change for css
|
||||
$(document).on('mouseup', '.js_publish', function (ev) {
|
||||
$(ev.currentTarget).parents(".thumbnail").toggleClass("disabled");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -111,6 +111,7 @@
|
|||
<div class='row grid grid-align-top'>
|
||||
<t t-foreach="products" t-as="product">
|
||||
<div t-attf-class="col-md-2 mb16 thumbnail text-center #{not product.website_published and 'disabled' or ''}" style="width: 170px; margin-left: 16px;">
|
||||
<t t-call="website.publish"><t t-set="object" t-value="product"/></t>
|
||||
<a t-attf-href="/shop/product/#{ product.id }/?#{ search and ('search=%s' % search) or ''}#{ category_id and ('&category_id=%s' % category_id) or ''}">
|
||||
<h5 t-field="product.name"> </h5>
|
||||
<img class="img-rounded" t-att-src="product.img('image_small')"/>
|
||||
|
@ -124,7 +125,7 @@
|
|||
<b><t t-esc="product.product_variant_ids[0].price" /> €</b>
|
||||
</div>
|
||||
<div class="mb8 mt8">
|
||||
<a t-if="product.website_published" t-attf-href="./add_cart/?product_id=#{ product.id }" class="btn btn-default btn-sm btn-success">Add to cart</a>
|
||||
<a t-attf-href="./add_cart/?product_id=#{ product.id }" class="btn btn-default btn-sm btn-success">Add to cart</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue