[FIX] Remove Unused Product Options from Edit mode of Shop Page

This commit is contained in:
Siddharth Bhalgami 2018-01-02 12:30:24 +05:30
parent 2e9195c131
commit 23070e706c
2 changed files with 0 additions and 60 deletions

View File

@ -88,47 +88,6 @@ options.registry.website_sale = options.Class.extend({
} else {
window.location.href = window.location.href.replace(/\?(enable_editor=1&)?|#.*|$/, '?enable_editor=1&');
}
},
bind_resize: function () {
var self = this;
this.$el.on('mouseenter', 'ul[name="size"] table', function (event) {
$(event.currentTarget).addClass("oe_hover");
});
this.$el.on('mouseleave', 'ul[name="size"] table', function (event) {
$(event.currentTarget).removeClass("oe_hover");
});
this.$el.on('mouseover', 'ul[name="size"] td', function (event) {
var $td = $(event.currentTarget);
var $table = $td.closest("table");
var x = $td.index()+1;
var y = $td.parent().index()+1;
var tr = [];
for (var yi=0; yi<y; yi++) tr.push("tr:eq("+yi+")");
var $select_tr = $table.find(tr.join(","));
var td = [];
for (var xi=0; xi<x; xi++) td.push("td:eq("+xi+")");
var $select_td = $select_tr.find(td.join(","));
$table.find("td").removeClass("select");
$select_td.addClass("select");
});
this.$el.on('click', 'ul[name="size"] td', function (event) {
var $td = $(event.currentTarget);
var x = $td.index()+1;
var y = $td.parent().index()+1;
self._rpc({
route: '/shop/change_size',
params: {
id: self.product_tmpl_id,
x: x,
y: y,
},
}).then(self.reload);
});
},
style: function (previewMode, value, $li) {
},
go_to: function (previewMode, value) {
this._rpc({

View File

@ -6,25 +6,6 @@
<div data-js='website_sale'
data-selector=".oe_product.oe_grid"
data-no-check="true">
<li class='dropdown-submenu'>
<a tabindex="-1" href="#">Size</a>
<ul class="dropdown-menu" name="size">
<li><a href="#">
<table>
<tr><td class="selected"></td><td></td><td></td><td></td></tr>
<tr><td></td><td></td><td></td><td></td></tr>
<tr><td></td><td></td><td></td><td></td></tr>
<tr><td></td><td></td><td></td><td></td></tr>
</table>
</a></li>
</ul>
</li>
<li class='dropdown-submenu'>
<a tabindex="-1" href="#">Styles</a>
<ul class="dropdown-menu" name="style">
</ul>
</li>
<li class='dropdown-submenu'>
<a tabindex="-1" href="#">Promote</a>
<ul class="dropdown-menu" data-no-preview="true">