From e34090aa2f2c4e73ce3a36a3896d474d4af70430 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 15 Nov 2013 11:30:23 +0530 Subject: [PATCH] [pos] [minor] button back on toolbar and css, fixes webnotes/erpnext#1052 --- accounts/doctype/sales_invoice/pos.js | 2 +- public/js/transaction.js | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/accounts/doctype/sales_invoice/pos.js b/accounts/doctype/sales_invoice/pos.js index d771f4f780..8ad54635fe 100644 --- a/accounts/doctype/sales_invoice/pos.js +++ b/accounts/doctype/sales_invoice/pos.js @@ -6,7 +6,7 @@ erpnext.POS = Class.extend({ this.wrapper = wrapper; this.frm = frm; this.wrapper.html('
\ -
\ +
\
\
\
\ diff --git a/public/js/transaction.js b/public/js/transaction.js index dc4698f7a9..b6e94521cc 100644 --- a/public/js/transaction.js +++ b/public/js/transaction.js @@ -66,13 +66,10 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({ // Show POS button only if it is enabled from features setup if(cint(sys_defaults.fs_pos_view)===1 && this.frm.doctype!="Material Request") - this.pos_btn(); + this.make_pos_btn(); }, - pos_btn: function() { - if(this.$pos_btn) - this.$pos_btn.remove(); - + make_pos_btn: function() { if(!this.pos_active) { var btn_label = wn._("POS View"), icon = "icon-desktop"; @@ -81,10 +78,9 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({ icon = "icon-file-text"; } 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.pos_btn(); }, icon); },