Browse Source

[IMP] Improve javascript show/hide message

pull/453/head
Iván Todorovich 5 years ago
parent
commit
2b02aa05f3
  1. 10
      pos_empty_home/static/src/js/screens.js

10
pos_empty_home/static/src/js/screens.js

@ -12,12 +12,12 @@ odoo.define('pos_empty_home.screens', function (require) {
var screens = require('point_of_sale.screens');
screens.ProductListWidget.include({
renderElement: function() {
this._super();
if (this.product_list.length == 0) {
this.el.querySelector('.product-list-empty-home').style['display'] = 'block';
set_product_list: function(product_list){
this._super(product_list);
if (product_list.length) {
$(this.el.querySelector('.product-list-empty-home')).hide();
} else {
this.el.querySelector('.product-list-empty-home').style['display'] = 'none';
$(this.el.querySelector('.product-list-empty-home')).show();
}
},
});

Loading…
Cancel
Save