[cleanup] Fixed title bars, toolbars in all pages, added default background
diff --git a/accounts/doctype/account/account.js b/accounts/doctype/account/account.js
index 67a46cd..cb4dd0f 100644
--- a/accounts/doctype/account/account.js
+++ b/accounts/doctype/account/account.js
@@ -81,7 +81,7 @@
// 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.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
diff --git a/accounts/doctype/cost_center/cost_center.js b/accounts/doctype/cost_center/cost_center.js
index 9995b6b..c037b6a 100644
--- a/accounts/doctype/cost_center/cost_center.js
+++ b/accounts/doctype/cost_center/cost_center.js
@@ -50,7 +50,7 @@
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')
}
diff --git a/accounts/doctype/journal_voucher/journal_voucher.js b/accounts/doctype/journal_voucher/journal_voucher.js
index 15fad3f..f9c552b 100644
--- a/accounts/doctype/journal_voucher/journal_voucher.js
+++ b/accounts/doctype/journal_voucher/journal_voucher.js
@@ -115,14 +115,14 @@
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");
}
}
diff --git a/accounts/doctype/purchase_invoice/purchase_invoice.js b/accounts/doctype/purchase_invoice/purchase_invoice.js
index ed75934..733b629 100644
--- a/accounts/doctype/purchase_invoice/purchase_invoice.js
+++ b/accounts/doctype/purchase_invoice/purchase_invoice.js
@@ -30,14 +30,14 @@
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) {
diff --git a/accounts/doctype/sales_invoice/sales_invoice.js b/accounts/doctype/sales_invoice/sales_invoice.js
index 9afa33d..a221638 100644
--- a/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/accounts/doctype/sales_invoice/sales_invoice.js
@@ -49,19 +49,19 @@
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 @@
});
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 @@
},
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 @@
},
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",
diff --git a/accounts/page/accounts_browser/accounts_browser.js b/accounts/page/accounts_browser/accounts_browser.js
index b9767ef..0c9ec88 100644
--- a/accounts/page/accounts_browser/accounts_browser.js
+++ b/accounts/page/accounts_browser/accounts_browser.js
@@ -48,9 +48,9 @@
'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", [])
diff --git a/accounts/page/financial_analytics/financial_analytics.js b/accounts/page/financial_analytics/financial_analytics.js
index ffe29ac..c7fbbc1 100644
--- a/accounts/page/financial_analytics/financial_analytics.js
+++ b/accounts/page/financial_analytics/financial_analytics.js
@@ -10,10 +10,8 @@
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 @@
{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() {
diff --git a/accounts/page/general_ledger/general_ledger.js b/accounts/page/general_ledger/general_ledger.js
index dbc691b..33aa933 100644
--- a/accounts/page/general_ledger/general_ledger.js
+++ b/accounts/page/general_ledger/general_ledger.js
@@ -82,7 +82,7 @@
}},
{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() {
diff --git a/accounts/page/trial_balance/trial_balance.js b/accounts/page/trial_balance/trial_balance.js
index ec14c51..e3d0764 100644
--- a/accounts/page/trial_balance/trial_balance.js
+++ b/accounts/page/trial_balance/trial_balance.js
@@ -45,7 +45,7 @@
})
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")
+
}
\ No newline at end of file
diff --git a/buying/doctype/purchase_order/purchase_order.js b/buying/doctype/purchase_order/purchase_order.js
index c134223..b20f0a8 100644
--- a/buying/doctype/purchase_order/purchase_order.js
+++ b/buying/doctype/purchase_order/purchase_order.js
@@ -24,20 +24,20 @@
doc.per_billed);
- 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(flt(doc.per_received, 2) < 100)
cur_frm.add_custom_button(wn._('Make Purchase Receipt'), this.make_purchase_receipt);
if(flt(doc.per_billed, 2) < 100)
cur_frm.add_custom_button(wn._('Make Invoice'), this.make_purchase_invoice);
if(flt(doc.per_billed, 2) < 100 || doc.per_received < 100)
- cur_frm.add_custom_button(wn._('Stop'), cur_frm.cscript['Stop Purchase Order']);
+ cur_frm.add_custom_button(wn._('Stop'), cur_frm.cscript['Stop Purchase Order'], "icon-exclamation");
} else if(doc.docstatus===0) {
cur_frm.cscript.add_from_mappers();
}
if(doc.docstatus == 1 && doc.status == 'Stopped')
cur_frm.add_custom_button(wn._('Unstop Purchase Order'),
- cur_frm.cscript['Unstop Purchase Order']);
+ cur_frm.cscript['Unstop Purchase Order'], "icon-check");
},
make_purchase_receipt: function() {
diff --git a/buying/page/purchase_analytics/purchase_analytics.js b/buying/page/purchase_analytics/purchase_analytics.js
index 6a8fc1a..e589c04 100644
--- a/buying/page/purchase_analytics/purchase_analytics.js
+++ b/buying/page/purchase_analytics/purchase_analytics.js
@@ -10,9 +10,9 @@
new erpnext.PurchaseAnalytics(wrapper);
- wrapper.appframe.add_home_breadcrumb()
+
wrapper.appframe.add_module_icon("Buying")
- wrapper.appframe.add_breadcrumb("icon-bar-chart")
+
}
erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({
@@ -101,7 +101,7 @@
{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_filters: function() {
diff --git a/home/page/activity/activity.js b/home/page/activity/activity.js
index edfe50f..ef7ccd9 100644
--- a/home/page/activity/activity.js
+++ b/home/page/activity/activity.js
@@ -10,6 +10,7 @@
wrapper.appframe.add_module_icon("Activity");
var list = new wn.ui.Listing({
+ hide_refresh: true,
appframe: wrapper.appframe,
method: 'home.page.activity.activity.get_feed',
parent: $(wrapper).find(".layout-main"),
@@ -18,10 +19,12 @@
}
});
list.run();
+
+ wrapper.appframe.set_title_right("Refresh", function() { list.run(); });
// Build Report Button
if(wn.boot.profile.can_get_report.indexOf("Feed")!=-1) {
- wrapper.appframe.add_button(wn._('Build Report'), function() {
+ wrapper.appframe.add_primary_action(wn._('Build Report'), function() {
wn.set_route('Report', "Feed");
}, 'icon-th')
}
diff --git a/hr/doctype/expense_claim/expense_claim.js b/hr/doctype/expense_claim/expense_claim.js
index e19cac7..26893af 100644
--- a/hr/doctype/expense_claim/expense_claim.js
+++ b/hr/doctype/expense_claim/expense_claim.js
@@ -86,8 +86,8 @@
cur_frm.toggle_enable("exp_approver", (doc.owner==user && doc.approval_status=="Draft"));
cur_frm.toggle_enable("approval_status", (doc.exp_approver==user && doc.docstatus==0));
- if(!doc.__islocal && user!=doc.exp_approver && cur_frm.frm_head.appframe.buttons.Submit)
- cur_frm.frm_head.appframe.buttons.Submit.toggle(false);
+ if(!doc.__islocal && user!=doc.exp_approver)
+ cur_frm.frm_head.appframe.set_title_right("");
if(doc.docstatus==0 && doc.exp_approver==user && doc.approval_status=="Approved")
cur_frm.savesubmit();
diff --git a/hr/doctype/leave_application/leave_application.js b/hr/doctype/leave_application/leave_application.js
index 7b32cff..066307f 100755
--- a/hr/doctype/leave_application/leave_application.js
+++ b/hr/doctype/leave_application/leave_application.js
@@ -41,8 +41,7 @@
cur_frm.set_intro(wn._("This Leave Application is pending approval. Only the Leave Apporver can update status."))
cur_frm.toggle_enable("status", false);
if(!doc.__islocal) {
- if(cur_frm.frm_head.appframe.buttons.Submit)
- cur_frm.frm_head.appframe.buttons.Submit.remove();
+ cur_frm.frm_head.appframe.set_title_right("");
}
}
} else {
diff --git a/manufacturing/doctype/production_order/production_order.js b/manufacturing/doctype/production_order/production_order.js
index 7c4325d..e8bc68a 100644
--- a/manufacturing/doctype/production_order/production_order.js
+++ b/manufacturing/doctype/production_order/production_order.js
@@ -27,9 +27,9 @@
var cfn_set_fields = function(doc, dt, dn) {
if (doc.docstatus == 1) {
if (doc.status != 'Stopped' && doc.status != 'Completed')
- cur_frm.add_custom_button(wn._('Stop!'), cur_frm.cscript['Stop Production Order']);
+ cur_frm.add_custom_button(wn._('Stop!'), cur_frm.cscript['Stop Production Order'], "icon-exclamation");
else if (doc.status == 'Stopped')
- cur_frm.add_custom_button(wn._('Unstop'), cur_frm.cscript['Unstop Production Order']);
+ cur_frm.add_custom_button(wn._('Unstop'), cur_frm.cscript['Unstop Production Order'], "icon-check");
if (doc.status == 'Submitted' || doc.status == 'Material Transferred' || doc.status == 'In Process'){
cur_frm.add_custom_button(wn._('Transfer Raw Materials'), cur_frm.cscript['Transfer Raw Materials']);
diff --git a/projects/doctype/project/project.js b/projects/doctype/project/project.js
index 3dfe897..fd1a642 100644
--- a/projects/doctype/project/project.js
+++ b/projects/doctype/project/project.js
@@ -4,7 +4,7 @@
// show tasks
cur_frm.cscript.refresh = function(doc) {
if(!doc.__islocal) {
- cur_frm.add_custom_button(wn._("Gantt Chart"), function() {
+ cur_frm.appframe.add_button(wn._("Gantt Chart"), function() {
wn.route_options = {"project": doc.name}
wn.set_route("Gantt", "Task");
}, "icon-tasks");
diff --git a/public/js/controllers/stock_controller.js b/public/js/controllers/stock_controller.js
index 01a73a2..feecc7b 100644
--- a/public/js/controllers/stock_controller.js
+++ b/public/js/controllers/stock_controller.js
@@ -7,7 +7,7 @@
show_stock_ledger: function() {
var me = this;
if(this.frm.doc.docstatus===1) {
- this.frm.add_custom_button(wn._("Stock Ledger"), function() {
+ this.frm.appframe.add_button(wn._("Stock Ledger"), function() {
wn.route_options = {
voucher_no: me.frm.doc.name,
from_date: me.frm.doc.posting_date,
@@ -22,7 +22,7 @@
show_general_ledger: function() {
var me = this;
if(this.frm.doc.docstatus===1 && cint(wn.defaults.get_default("auto_accounting_for_stock"))) {
- cur_frm.add_custom_button(wn._('Accounting Ledger'), function() {
+ cur_frm.appframe.add_button(wn._('Accounting Ledger'), function() {
wn.route_options = {
"voucher_no": me.frm.doc.name,
"from_date": me.frm.doc.posting_date,
diff --git a/public/js/stock_analytics.js b/public/js/stock_analytics.js
index 8cb6161..71ed809 100644
--- a/public/js/stock_analytics.js
+++ b/public/js/stock_analytics.js
@@ -65,7 +65,7 @@
{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_filters: function() {
diff --git a/selling/doctype/lead/lead.js b/selling/doctype/lead/lead.js
index d65338f..9bc4a28 100644
--- a/selling/doctype/lead/lead.js
+++ b/selling/doctype/lead/lead.js
@@ -37,7 +37,7 @@
if(!this.frm.doc.__islocal && !this.frm.__is_customer) {
this.frm.add_custom_button(wn._("Create Customer"), this.create_customer);
this.frm.add_custom_button(wn._("Create Opportunity"), this.create_opportunity);
- this.frm.add_custom_button(wn._("Send SMS"), this.frm.cscript.send_sms);
+ this.frm.appframe.add_button(wn._("Send SMS"), this.frm.cscript.send_sms, "icon-mobile-phone");
}
cur_frm.communication_view = new wn.views.CommunicationList({
diff --git a/selling/doctype/opportunity/opportunity.js b/selling/doctype/opportunity/opportunity.js
index 75fde27..2b8d0b7 100644
--- a/selling/doctype/opportunity/opportunity.js
+++ b/selling/doctype/opportunity/opportunity.js
@@ -108,7 +108,7 @@
if(doc.status!=="Quotation") {
cur_frm.add_custom_button(wn._('Opportunity Lost'), cur_frm.cscript['Declare Opportunity Lost']);
}
- cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms);
+ cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
}
cur_frm.toggle_display("contact_info", doc.customer || doc.lead);
diff --git a/selling/doctype/quotation/quotation.js b/selling/doctype/quotation/quotation.js
index f890b28..d4613d0 100644
--- a/selling/doctype/quotation/quotation.js
+++ b/selling/doctype/quotation/quotation.js
@@ -30,9 +30,9 @@
cur_frm.cscript['Make Sales Order']);
if(doc.status!=="Ordered") {
cur_frm.add_custom_button(wn._('Set as Lost'),
- cur_frm.cscript['Declare Order Lost']);
+ cur_frm.cscript['Declare Order Lost'], "icon-exclamation");
}
- 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 (this.frm.doc.docstatus===0) {
diff --git a/selling/doctype/sales_order/sales_order.js b/selling/doctype/sales_order/sales_order.js
index 4033870..ea9d39f 100644
--- a/selling/doctype/sales_order/sales_order.js
+++ b/selling/doctype/sales_order/sales_order.js
@@ -27,7 +27,7 @@
cur_frm.dashboard.add_progress(cint(doc.per_billed) + wn._("% Billed"),
doc.per_billed);
- cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms);
+ cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
// delivery note
if(flt(doc.per_delivered, 2) < 100 && doc.order_type=='Sales')
cur_frm.add_custom_button(wn._('Make Delivery'), this.make_delivery_note);
@@ -50,11 +50,11 @@
// stop
if(flt(doc.per_delivered, 2) < 100 || doc.per_billed < 100)
- cur_frm.add_custom_button(wn._('Stop!'), cur_frm.cscript['Stop Sales Order']);
+ cur_frm.add_custom_button(wn._('Stop!'), cur_frm.cscript['Stop Sales Order'],"icon-exclamation");
} else {
// un-stop
cur_frm.dashboard.set_headline_alert(wn._("Stopped"), "alert-danger", "icon-stop");
- cur_frm.add_custom_button(wn._('Unstop'), cur_frm.cscript['Unstop Sales Order']);
+ cur_frm.add_custom_button(wn._('Unstop'), cur_frm.cscript['Unstop Sales Order'], "icon-check");
}
}
diff --git a/selling/page/sales_analytics/sales_analytics.js b/selling/page/sales_analytics/sales_analytics.js
index f75e0e3..42980bc 100644
--- a/selling/page/sales_analytics/sales_analytics.js
+++ b/selling/page/sales_analytics/sales_analytics.js
@@ -9,9 +9,9 @@
});
new erpnext.SalesAnalytics(wrapper);
- wrapper.appframe.add_home_breadcrumb()
+
wrapper.appframe.add_module_icon("Selling")
- wrapper.appframe.add_breadcrumb("icon-bar-chart")
+
}
erpnext.SalesAnalytics = wn.views.TreeGridReport.extend({
@@ -88,7 +88,7 @@
this.columns = std_columns.concat(this.columns);
},
filters: [
- {fieldtype:"Select", fieldname: "treetype", label: wn._("Tree Type"), options:["Customer Group", "Customer",
+ {fieldtype:"Select", fieldname: "tree_type", label: wn._("Tree Type"), options:["Customer Group", "Customer",
"Item Group", "Item", "Territory"],
filter: function(val, item, opts, me) {
return me.apply_zero_filter(val, item, opts, me);
@@ -103,8 +103,8 @@
{fieldtype:"Date", fieldname: "to_date", label: wn._("To Date")},
{fieldtype:"Select", fieldname: "range", label: wn._("Range"),
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
- {fieldtype:"Button", fieldname: "refresh", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"},
- {fieldtype:"Button", fieldname: "reset_filters", label: wn._("Reset Filters")}
+ {fieldtype:"Button", fieldname: "refresh", label: wn._("Refresh"), icon:"icon-refresh"},
+ {fieldtype:"Button", fieldname: "reset_filters", label: wn._("Reset Filters"), icon:"icon-filter"}
],
setup_filters: function() {
var me = this;
diff --git a/selling/page/sales_browser/sales_browser.js b/selling/page/sales_browser/sales_browser.js
index 470fb68..bfaa6ab 100644
--- a/selling/page/sales_browser/sales_browser.js
+++ b/selling/page/sales_browser/sales_browser.js
@@ -8,9 +8,9 @@
wrapper.appframe.add_module_icon("Selling")
- wrapper.appframe.add_button('Refresh', function() {
+ wrapper.appframe.set_title_right('Refresh', function() {
wrapper.make_tree();
- }, 'icon-refresh');
+ });
$(wrapper)
diff --git a/selling/page/sales_funnel/sales_funnel.js b/selling/page/sales_funnel/sales_funnel.js
index 5ad61f7..4178ccf 100644
--- a/selling/page/sales_funnel/sales_funnel.js
+++ b/selling/page/sales_funnel/sales_funnel.js
@@ -32,7 +32,7 @@
layout: $(wrapper).find(".layout-main"),
from_date: wrapper.appframe.add_date("From Date"),
to_date: wrapper.appframe.add_date("To Date"),
- refresh_btn: wrapper.appframe.add_button("Refresh",
+ refresh_btn: wrapper.appframe.set_title_right("Refresh",
function() { me.get_data(); }, "icon-refresh"),
};
diff --git a/setup/doctype/item_group/item_group.js b/setup/doctype/item_group/item_group.js
index 6dbb0d2..b0171f3 100644
--- a/setup/doctype/item_group/item_group.js
+++ b/setup/doctype/item_group/item_group.js
@@ -4,12 +4,12 @@
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.cscript.set_root_readonly(doc);
- cur_frm.add_custom_button(wn._("Item Group Tree"), function() {
+ cur_frm.appframe.add_button(wn._("Item Group Tree"), function() {
wn.set_route("Sales Browser", "Item Group");
- })
+ }, "icon-sitemap")
if(!doc.__islocal && doc.show_in_website) {
- cur_frm.add_custom_button("View In Website", function() {
+ cur_frm.appframe.add_button("View In Website", function() {
window.open(doc.page_name);
}, "icon-globe");
}
diff --git a/setup/page/setup/setup.js b/setup/page/setup/setup.js
index ed55eb5..c636d8e 100644
--- a/setup/page/setup/setup.js
+++ b/setup/page/setup/setup.js
@@ -10,9 +10,9 @@
});
wrapper.appframe.add_module_icon("Setup");
- wrapper.appframe.add_button(wn._("Refresh"), function() {
+ wrapper.appframe.set_title_right(wn._("Refresh"), function() {
wn.pages.Setup.make(wrapper);
- }, "icon-refresh");
+ });
wn.pages.Setup.make(wrapper);
diff --git a/stock/doctype/delivery_note/delivery_note.js b/stock/doctype/delivery_note/delivery_note.js
index 210b392..f627eba 100644
--- a/stock/doctype/delivery_note/delivery_note.js
+++ b/stock/doctype/delivery_note/delivery_note.js
@@ -33,7 +33,7 @@
cur_frm.add_custom_button(wn._('Make Installation Note'), this.make_installation_note);
if (doc.docstatus==1) {
- 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");
this.show_stock_ledger();
this.show_general_ledger();
}
diff --git a/stock/doctype/item/item.js b/stock/doctype/item/item.js
index d8ee45f..18b88b5 100644
--- a/stock/doctype/item/item.js
+++ b/stock/doctype/item/item.js
@@ -9,7 +9,7 @@
erpnext.hide_naming_series();
if(!doc.__islocal && doc.show_in_website) {
- cur_frm.add_custom_button("View In Website", function() {
+ cur_frm.appframe.add_button("View In Website", function() {
window.open(doc.page_name);
}, "icon-globe");
}
diff --git a/stock/doctype/material_request/material_request.js b/stock/doctype/material_request/material_request.js
index 9fc852f..0dc9278 100644
--- a/stock/doctype/material_request/material_request.js
+++ b/stock/doctype/material_request/material_request.js
@@ -39,9 +39,9 @@
this.make_purchase_order);
cur_frm.add_custom_button(wn._('Stop Material Request'),
- cur_frm.cscript['Stop Material Request']);
+ cur_frm.cscript['Stop Material Request'], "icon-exclamation");
}
- cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms);
+ cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
}
@@ -63,7 +63,7 @@
if(doc.docstatus == 1 && doc.status == 'Stopped')
cur_frm.add_custom_button(wn._('Unstop Material Request'),
- cur_frm.cscript['Unstop Material Request']);
+ cur_frm.cscript['Unstop Material Request'], "icon-check");
},
diff --git a/stock/doctype/purchase_receipt/purchase_receipt.js b/stock/doctype/purchase_receipt/purchase_receipt.js
index 8006d56..f51da81 100644
--- a/stock/doctype/purchase_receipt/purchase_receipt.js
+++ b/stock/doctype/purchase_receipt/purchase_receipt.js
@@ -20,7 +20,7 @@
cur_frm.add_custom_button(wn._('Make Purchase Invoice'),
this.make_purchase_invoice);
}
- cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript['Send SMS']);
+ cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript['Send SMS'], "icon-mobile-phone");
this.show_stock_ledger();
this.show_general_ledger();
diff --git a/stock/page/stock_ageing/stock_ageing.js b/stock/page/stock_ageing/stock_ageing.js
index 914999b..afd9363 100644
--- a/stock/page/stock_ageing/stock_ageing.js
+++ b/stock/page/stock_ageing/stock_ageing.js
@@ -11,9 +11,9 @@
new erpnext.StockAgeing(wrapper);
- wrapper.appframe.add_home_breadcrumb()
+
wrapper.appframe.add_module_icon("Stock")
- wrapper.appframe.add_breadcrumb("icon-bar-chart")
+
}
wn.require("app/js/stock_grid_report.js");
@@ -59,7 +59,7 @@
{fieldtype:"Select", label: wn._("Plot By"),
options: ["Average Age", "Earliest", "Latest"]},
{fieldtype:"Date", label: wn._("To Date")},
- {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() {
diff --git a/stock/page/stock_analytics/stock_analytics.js b/stock/page/stock_analytics/stock_analytics.js
index d5aa219..cecd39d 100644
--- a/stock/page/stock_analytics/stock_analytics.js
+++ b/stock/page/stock_analytics/stock_analytics.js
@@ -11,9 +11,9 @@
new erpnext.StockAnalytics(wrapper);
- wrapper.appframe.add_home_breadcrumb()
+
wrapper.appframe.add_module_icon("Stock")
- wrapper.appframe.add_breadcrumb("icon-bar-chart")
+
}
wn.require("app/js/stock_analytics.js");
\ No newline at end of file
diff --git a/stock/page/stock_balance/stock_balance.js b/stock/page/stock_balance/stock_balance.js
index c6b9fda..caa0c9e 100644
--- a/stock/page/stock_balance/stock_balance.js
+++ b/stock/page/stock_balance/stock_balance.js
@@ -12,9 +12,9 @@
new erpnext.StockBalance(wrapper);
- wrapper.appframe.add_home_breadcrumb()
+
wrapper.appframe.add_module_icon("Stock")
- wrapper.appframe.add_breadcrumb("icon-bar-chart")
+
}
erpnext.StockBalance = erpnext.StockAnalytics.extend({
@@ -70,7 +70,7 @@
{fieldtype:"Date", label: wn._("From Date")},
{fieldtype:"Label", label: wn._("To")},
{fieldtype:"Date", label: wn._("To Date")},
- {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")}
],
diff --git a/stock/page/stock_ledger/stock_ledger.js b/stock/page/stock_ledger/stock_ledger.js
index 6607140..5770d1d 100644
--- a/stock/page/stock_ledger/stock_ledger.js
+++ b/stock/page/stock_ledger/stock_ledger.js
@@ -84,7 +84,7 @@
{fieldtype:"Date", label: wn._("To Date"), filter: function(val, item) {
return dateutil.str_to_obj(val) >= dateutil.str_to_obj(item.posting_date);
}},
- {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")}
],
diff --git a/stock/page/stock_level/stock_level.js b/stock/page/stock_level/stock_level.js
index a6cc6a8..1aa3a47 100644
--- a/stock/page/stock_level/stock_level.js
+++ b/stock/page/stock_level/stock_level.js
@@ -10,9 +10,9 @@
new erpnext.StockLevel(wrapper);
- wrapper.appframe.add_home_breadcrumb()
+
wrapper.appframe.add_module_icon("Stock")
- wrapper.appframe.add_breadcrumb("icon-bar-chart");
+ ;
}
wn.require("app/js/stock_grid_report.js");
@@ -99,7 +99,7 @@
default_value: "Select Brand...", filter: function(val, item, opts) {
return val == opts.default_value || item.brand == val;
}},
- {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")}
],
diff --git a/support/page/support_analytics/support_analytics.js b/support/page/support_analytics/support_analytics.js
index ecc0749..c437b76 100644
--- a/support/page/support_analytics/support_analytics.js
+++ b/support/page/support_analytics/support_analytics.js
@@ -10,9 +10,9 @@
new erpnext.SupportAnalytics(wrapper);
- wrapper.appframe.add_home_breadcrumb()
+
wrapper.appframe.add_module_icon("Support")
- wrapper.appframe.add_breadcrumb("icon-bar-chart")
+
}
erpnext.SupportAnalytics = wn.views.GridReportWithPlot.extend({
@@ -34,7 +34,7 @@
{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")}
],