[pos] [minor] button back on toolbar and css, fixes webnotes/erpnext#1052
This commit is contained in:
parent
3910aa351f
commit
e34090aa2f
@ -6,7 +6,7 @@ erpnext.POS = Class.extend({
|
|||||||
this.wrapper = wrapper;
|
this.wrapper = wrapper;
|
||||||
this.frm = frm;
|
this.frm = frm;
|
||||||
this.wrapper.html('<div class="container">\
|
this.wrapper.html('<div class="container">\
|
||||||
<div class="row" style="margin: -13px 0px 10px -30px; border-bottom: 3px solid #c7c7c7;">\
|
<div class="row" style="margin: -9px 0px 10px -30px; border-bottom: 1px solid #c7c7c7;">\
|
||||||
<div class="party-area col-sm-3 col-xs-6"></div>\
|
<div class="party-area col-sm-3 col-xs-6"></div>\
|
||||||
<div class="barcode-area col-sm-3 col-xs-6"></div>\
|
<div class="barcode-area col-sm-3 col-xs-6"></div>\
|
||||||
<div class="search-area col-sm-3 col-xs-6"></div>\
|
<div class="search-area col-sm-3 col-xs-6"></div>\
|
||||||
|
|||||||
@ -66,13 +66,10 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
|
|||||||
|
|
||||||
// Show POS button only if it is enabled from features setup
|
// Show POS button only if it is enabled from features setup
|
||||||
if(cint(sys_defaults.fs_pos_view)===1 && this.frm.doctype!="Material Request")
|
if(cint(sys_defaults.fs_pos_view)===1 && this.frm.doctype!="Material Request")
|
||||||
this.pos_btn();
|
this.make_pos_btn();
|
||||||
},
|
},
|
||||||
|
|
||||||
pos_btn: function() {
|
make_pos_btn: function() {
|
||||||
if(this.$pos_btn)
|
|
||||||
this.$pos_btn.remove();
|
|
||||||
|
|
||||||
if(!this.pos_active) {
|
if(!this.pos_active) {
|
||||||
var btn_label = wn._("POS View"),
|
var btn_label = wn._("POS View"),
|
||||||
icon = "icon-desktop";
|
icon = "icon-desktop";
|
||||||
@ -82,9 +79,8 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
|
|||||||
}
|
}
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
this.$pos_btn = this.frm.add_custom_button(btn_label, function() {
|
this.$pos_btn = this.frm.appframe.add_button(btn_label, function() {
|
||||||
me.toggle_pos();
|
me.toggle_pos();
|
||||||
me.pos_btn();
|
|
||||||
}, icon);
|
}, icon);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user