[cleanup] Fixed title bars, toolbars in all pages, added default background
This commit is contained in:
parent
09391e14ad
commit
4f642e7670
@ -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
|
||||
|
@ -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')
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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",
|
||||
|
@ -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", [])
|
||||
|
@ -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() {
|
||||
|
@ -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() {
|
||||
|
@ -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")
|
||||
|
||||
}
|
@ -24,20 +24,20 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
|
||||
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() {
|
||||
|
@ -10,9 +10,9 @@ wn.pages['purchase-analytics'].onload = function(wrapper) {
|
||||
|
||||
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 @@ erpnext.PurchaseAnalytics = wn.views.TreeGridReport.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_filters: function() {
|
||||
|
@ -10,6 +10,7 @@ wn.pages['activity'].onload = function(wrapper) {
|
||||
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 @@ wn.pages['activity'].onload = function(wrapper) {
|
||||
}
|
||||
});
|
||||
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')
|
||||
}
|
||||
|
@ -86,8 +86,8 @@ cur_frm.cscript.refresh = function(doc,cdt,cdn){
|
||||
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();
|
||||
|
@ -41,8 +41,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
|
||||
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 {
|
||||
|
@ -27,9 +27,9 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
|
||||
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']);
|
||||
|
@ -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");
|
||||
|
@ -7,7 +7,7 @@ erpnext.stock.StockController = wn.ui.form.Controller.extend({
|
||||
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 @@ erpnext.stock.StockController = wn.ui.form.Controller.extend({
|
||||
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,
|
||||
|
@ -65,7 +65,7 @@ erpnext.StockAnalytics = erpnext.StockGridReport.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_filters: function() {
|
||||
|
@ -37,7 +37,7 @@ erpnext.LeadController = wn.ui.form.Controller.extend({
|
||||
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({
|
||||
|
@ -108,7 +108,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn){
|
||||
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);
|
||||
|
@ -30,9 +30,9 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
|
||||
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) {
|
||||
|
@ -27,7 +27,7 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
|
||||
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 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
|
||||
|
||||
// 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");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,9 +9,9 @@ wn.pages['sales-analytics'].onload = function(wrapper) {
|
||||
});
|
||||
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 @@ erpnext.SalesAnalytics = wn.views.TreeGridReport.extend({
|
||||
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 @@ erpnext.SalesAnalytics = wn.views.TreeGridReport.extend({
|
||||
{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;
|
||||
|
@ -8,9 +8,9 @@ pscript['onload_Sales Browser'] = function(wrapper){
|
||||
|
||||
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)
|
||||
|
@ -32,7 +32,7 @@ erpnext.SalesFunnel = Class.extend({
|
||||
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"),
|
||||
};
|
||||
|
||||
|
@ -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");
|
||||
}
|
||||
|
@ -10,9 +10,9 @@ wn.pages['Setup'].onload = function(wrapper) {
|
||||
});
|
||||
|
||||
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);
|
||||
|
||||
|
@ -33,7 +33,7 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
|
||||
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();
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ cur_frm.cscript.refresh = function(doc) {
|
||||
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");
|
||||
}
|
||||
|
@ -39,9 +39,9 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
|
||||
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 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
|
||||
|
||||
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");
|
||||
|
||||
},
|
||||
|
||||
|
@ -20,7 +20,7 @@ erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend
|
||||
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();
|
||||
|
@ -11,9 +11,9 @@ wn.pages['stock-ageing'].onload = function(wrapper) {
|
||||
|
||||
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 @@ erpnext.StockAgeing = erpnext.StockGridReport.extend({
|
||||
{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() {
|
||||
|
@ -11,9 +11,9 @@ wn.pages['stock-analytics'].onload = function(wrapper) {
|
||||
|
||||
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");
|
@ -12,9 +12,9 @@ wn.pages['stock-balance'].onload = function(wrapper) {
|
||||
|
||||
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 @@ erpnext.StockBalance = erpnext.StockAnalytics.extend({
|
||||
{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")}
|
||||
],
|
||||
|
||||
|
@ -84,7 +84,7 @@ erpnext.StockLedger = erpnext.StockGridReport.extend({
|
||||
{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")}
|
||||
],
|
||||
|
||||
|
@ -10,9 +10,9 @@ wn.pages['stock-level'].onload = function(wrapper) {
|
||||
|
||||
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 @@ erpnext.StockLevel = erpnext.StockGridReport.extend({
|
||||
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")}
|
||||
],
|
||||
|
||||
|
@ -10,9 +10,9 @@ wn.pages['support-analytics'].onload = function(wrapper) {
|
||||
|
||||
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 @@ erpnext.SupportAnalytics = wn.views.GridReportWithPlot.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")}
|
||||
],
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user