[cleanup] Fixed title bars, toolbars in all pages, added default background

This commit is contained in:
Rushabh Mehta
2013-11-13 16:55:38 +05:30
parent 09391e14ad
commit 4f642e7670
37 changed files with 82 additions and 82 deletions

View File

@@ -81,7 +81,7 @@ cur_frm.cscript.account_type = function(doc, cdt, cdn) {
// Hide/unhide group or ledger
// -----------------------------------------
cur_frm.cscript.add_toolbar_buttons = function(doc) {
cur_frm.add_custom_button(wn._('Chart of Accounts'),
cur_frm.appframe.add_button(wn._('Chart of Accounts'),
function() { wn.set_route("Accounts Browser", "Account"); }, 'icon-sitemap')
if (cstr(doc.group_or_ledger) == 'Group') {
@@ -91,14 +91,14 @@ cur_frm.cscript.add_toolbar_buttons = function(doc) {
cur_frm.add_custom_button(wn._('Convert to Group'),
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet')
cur_frm.add_custom_button(wn._('View Ledger'), function() {
cur_frm.appframe.add_button(wn._('View Ledger'), function() {
wn.route_options = {
"account": doc.name,
"from_date": sys_defaults.year_start_date,
"to_date": sys_defaults.year_end_date
};
wn.set_route("general-ledger");
});
}, "icon-table");
}
}
// Convert group to ledger

View File

@@ -50,7 +50,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.toggle_display('sb1', doc.group_or_ledger=='Ledger')
cur_frm.set_intro(intro_txt);
cur_frm.add_custom_button(wn._('Chart of Cost Centers'),
cur_frm.appframe.add_button(wn._('Chart of Cost Centers'),
function() { wn.set_route("Accounts Browser", "Cost Center"); }, 'icon-sitemap')
}

View File

@@ -115,14 +115,14 @@ cur_frm.cscript.refresh = function(doc) {
erpnext.hide_naming_series();
cur_frm.cscript.voucher_type(doc);
if(doc.docstatus==1) {
cur_frm.add_custom_button(wn._('View Ledger'), function() {
cur_frm.appframe.add_button(wn._('View Ledger'), function() {
wn.route_options = {
"voucher_no": doc.name,
"from_date": doc.posting_date,
"to_date": doc.posting_date,
};
wn.set_route("general-ledger");
});
}, "icon-table");
}
}

View File

@@ -30,14 +30,14 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
this.frm.add_custom_button(wn._('Make Payment Entry'), this.make_bank_voucher);
if(doc.docstatus==1) {
cur_frm.add_custom_button(wn._('View Ledger'), function() {
cur_frm.appframe.add_button(wn._('View Ledger'), function() {
wn.route_options = {
"voucher_no": doc.name,
"from_date": doc.posting_date,
"to_date": doc.posting_date,
};
wn.set_route("general-ledger");
});
}, "icon-table");
}
if(doc.docstatus===0) {

View File

@@ -49,19 +49,19 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
cur_frm.dashboard.reset();
if(doc.docstatus==1) {
cur_frm.add_custom_button('View Ledger', function() {
cur_frm.appframe.add_button('View Ledger', function() {
wn.route_options = {
"voucher_no": doc.name,
"from_date": doc.posting_date,
"to_date": doc.posting_date,
};
wn.set_route("general-ledger");
});
}, "icon-table");
var percent_paid = cint(flt(doc.grand_total - doc.outstanding_amount) / flt(doc.grand_total) * 100);
cur_frm.dashboard.add_progress(percent_paid + "% Paid", percent_paid);
cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms);
cur_frm.appframe.add_button(wn._('Send SMS'), cur_frm.cscript.send_sms, 'icon-mobile-phone');
if(cint(doc.update_stock)!=1) {
// show Make Delivery Note button only if Sales Invoice is not created from Delivery Note
@@ -72,11 +72,11 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
});
if(!from_delivery_note)
cur_frm.add_custom_button(wn._('Make Delivery'), cur_frm.cscript['Make Delivery Note']);
cur_frm.appframe.add_primary_action(wn._('Make Delivery'), cur_frm.cscript['Make Delivery Note'])
}
if(doc.outstanding_amount!=0)
cur_frm.add_custom_button(wn._('Make Payment Entry'), cur_frm.cscript.make_bank_voucher);
cur_frm.appframe.add_primary_action(wn._('Make Payment Entry'), cur_frm.cscript.make_bank_voucher);
}
// Show buttons only when pos view is active
@@ -87,7 +87,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
},
sales_order_btn: function() {
this.$sales_order_btn = cur_frm.add_custom_button(wn._('From Sales Order'),
this.$sales_order_btn = cur_frm.appframe.add_primary_action(wn._('From Sales Order'),
function() {
wn.model.map_current_doc({
method: "selling.doctype.sales_order.sales_order.make_sales_invoice",
@@ -104,7 +104,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
},
delivery_note_btn: function() {
this.$delivery_note_btn = cur_frm.add_custom_button(wn._('From Delivery Note'),
this.$delivery_note_btn = cur_frm.appframe.add_primary_action(wn._('From Delivery Note'),
function() {
wn.model.map_current_doc({
method: "stock.doctype.delivery_note.delivery_note.make_sales_invoice",

View File

@@ -48,9 +48,9 @@ pscript['onload_Accounts Browser'] = function(wrapper){
'icon-plus');
}
wrapper.appframe.add_button('Refresh', function() {
wrapper.appframe.set_title_right('Refresh', function() {
wrapper.$company_select.change();
}, 'icon-refresh');
});
// company-select
wrapper.$company_select = wrapper.appframe.add_select("Company", [])

View File

@@ -10,10 +10,8 @@ wn.pages['financial-analytics'].onload = function(wrapper) {
single_column: true
});
erpnext.trial_balance = new erpnext.FinancialAnalytics(wrapper, 'Financial Analytics');
wrapper.appframe.add_home_breadcrumb()
wrapper.appframe.add_module_icon("Accounts")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
@@ -39,7 +37,7 @@ erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
{fieldtype:"Date", label: wn._("To Date")},
{fieldtype:"Select", label: wn._("Range"),
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
{fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"},
{fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white"},
{fieldtype:"Button", label: wn._("Reset Filters")}
],
setup_columns: function() {

View File

@@ -82,7 +82,7 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({
}},
{fieldtype: "Check", label: wn._("Group by Ledger")},
{fieldtype: "Check", label: wn._("Group by Voucher")},
{fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"},
{fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white"},
{fieldtype:"Button", label: wn._("Reset Filters")}
],
setup_filters: function() {

View File

@@ -45,7 +45,7 @@ wn.pages['trial-balance'].onload = function(wrapper) {
})
erpnext.trial_balance = new TrialBalance(wrapper, 'Trial Balance');
wrapper.appframe.add_home_breadcrumb()
wrapper.appframe.add_module_icon("Accounts")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}