Browse Source

[ADD] Add button close

12-V2.0
Juliana 3 years ago
parent
commit
0a70e7e822
  1. 11
      static/src/css/style.css
  2. 12
      static/src/js/container.js
  3. 1
      static/src/xml/pos.xml

11
static/src/css/style.css

@ -73,6 +73,17 @@
height: 100%;
}
.pos .close-button-bls {
position: absolute;
left: 15px;
padding: 10px;
text-transform: uppercase;
position: absolute;
border-radius: 3px;
border: solid 1px #d1d1d1;
cursor: pointer;
}
.logo-scan{
width: 250px;
}

12
static/src/js/container.js

@ -1020,13 +1020,25 @@ odoo.define('vracoop_pos_free_balance_v2.container_balance', function (require)
build_chrome: function() {
this._super();
var self = this;
if (this.pos.config.is_balance_free) {
this.$('.pos-topheader').addClass('oe_hidden');
this.$('.close-button-bls').click(function(){
self.click_close();
});
}
else {
this.$('.pos-topheader-title').addClass('oe_hidden');
}
},
click_close: function() {
var self = this;
clearTimeout(this.confirmed);
this.gui.close();
},
});
gui.Gui.include({

1
static/src/xml/pos.xml

@ -4,6 +4,7 @@
<t t-extend="Chrome">
<t t-jquery='.pos-topheader' t-operation='after'>
<div class="pos-topheader-title">
<span class="close-button-bls">close</span>
<span class="placeholder-ShopnameWidget"></span>
<span class="placeholder-ShopimageWidget"></span>
</div>

Loading…
Cancel
Save