From d76146372e44249c8f3865d353378192cbea0edf Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 13 Apr 2012 12:01:23 +0530 Subject: [PATCH] merge --- .../page/accounts_browser/accounts_browser.html | 9 ++++++--- .../accounts/page/accounts_browser/accounts_browser.js | 10 ++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.html b/erpnext/accounts/page/accounts_browser/accounts_browser.html index 8cfde8aea2f..cb44cec9f0e 100644 --- a/erpnext/accounts/page/accounts_browser/accounts_browser.html +++ b/erpnext/accounts/page/accounts_browser/accounts_browser.html @@ -1,4 +1,7 @@ -
-
-
+
+
+
+
+
+
\ No newline at end of file diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.js b/erpnext/accounts/page/accounts_browser/accounts_browser.js index 49cbcb38f60..28e55ab3e63 100644 --- a/erpnext/accounts/page/accounts_browser/accounts_browser.js +++ b/erpnext/accounts/page/accounts_browser/accounts_browser.js @@ -14,9 +14,12 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -pscript['onshow_Accounts Browser'] = function(){ +pscript['onshow_Accounts Browser'] = function(wrapper){ wn.require('lib/js/legacy/widgets/tree.js'); + wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area')); + wrapper.appframe.add_button('New Company', function() { newdoc('Company'); }, 'icon-plus'); + var route = decodeURIComponent(location.hash); if(route.indexOf('/')!=-1) { var chart_type = route.split('/')[1]; @@ -107,14 +110,9 @@ pscript.make_chart = function(b) { pscript.make_group_area(); pscript.make_ledger_area(); pscript.make_new_acc_dialog(); - pscript.make_new_comp(); pscript.make_new_cost_center_dialog(); } -//New company link -pscript.make_new_comp = function(){ - $i('ab_body').page_head.add_button('New Company', function() { new_doc('Company'); }, 0, 'ui-icon-plus'); -} pscript.make_ac_tree = function() { //var type= sel_val($i('chart_type'))