fixes #1581 and added icons to grid reports
This commit is contained in:
parent
d82e85d099
commit
f944e819e9
@ -238,6 +238,9 @@ erpnext.AccountsChart = Class.extend({
|
||||
method: 'erpnext.accounts.utils.add_ac',
|
||||
callback: function(r) {
|
||||
d.hide();
|
||||
if(node.expanded) {
|
||||
node.toggle_node();
|
||||
}
|
||||
node.reload();
|
||||
}
|
||||
});
|
||||
@ -281,6 +284,9 @@ erpnext.AccountsChart = Class.extend({
|
||||
method: 'erpnext.accounts.utils.add_cc',
|
||||
callback: function(r) {
|
||||
d.hide();
|
||||
if(node.expanded) {
|
||||
node.toggle_node();
|
||||
}
|
||||
node.reload();
|
||||
}
|
||||
});
|
||||
|
@ -45,7 +45,7 @@ erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
|
||||
{fieldtype:"Select", label: __("Range"),
|
||||
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
|
||||
{fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
|
||||
{fieldtype:"Button", label: __("Reset Filters")}
|
||||
{fieldtype:"Button", label: __("Reset Filters"), icon: "icon-filter"}
|
||||
],
|
||||
setup_columns: function() {
|
||||
var std_columns = [
|
||||
|
@ -102,7 +102,7 @@ erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({
|
||||
{fieldtype:"Select", label: __("Range"),
|
||||
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
|
||||
{fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
|
||||
{fieldtype:"Button", label: __("Reset Filters")}
|
||||
{fieldtype:"Button", label: __("Reset Filters"), icon: "icon-filter"}
|
||||
],
|
||||
setup_filters: function() {
|
||||
var me = this;
|
||||
|
@ -69,7 +69,7 @@ erpnext.AccountTreeGrid = frappe.views.TreeGridReport.extend({
|
||||
{fieldtype: "Date", label: __("To Date")},
|
||||
{fieldtype: "Button", label: __("Refresh"), icon:"icon-refresh icon-white",
|
||||
cssClass:"btn-info"},
|
||||
{fieldtype: "Button", label: __("Reset Filters")},
|
||||
{fieldtype: "Button", label: __("Reset Filters"), icon: "icon-filter"},
|
||||
],
|
||||
setup_filters: function() {
|
||||
this._super();
|
||||
|
@ -66,7 +66,7 @@ erpnext.StockAnalytics = erpnext.StockGridReport.extend({
|
||||
{fieldtype:"Select", label: __("Range"),
|
||||
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
|
||||
{fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
|
||||
{fieldtype:"Button", label: __("Reset Filters")}
|
||||
{fieldtype:"Button", label: __("Reset Filters"), icon: "icon-filter"}
|
||||
],
|
||||
setup_filters: function() {
|
||||
var me = this;
|
||||
|
@ -147,10 +147,10 @@ erpnext.SalesChart = Class.extend({
|
||||
callback: function(r) {
|
||||
if(!r.exc) {
|
||||
d.hide();
|
||||
node.reload();
|
||||
if(!node.expanded) {
|
||||
if(node.expanded) {
|
||||
node.toggle_node();
|
||||
}
|
||||
node.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -60,7 +60,7 @@ erpnext.StockAgeing = erpnext.StockGridReport.extend({
|
||||
options: ["Average Age", "Earliest", "Latest"]},
|
||||
{fieldtype:"Date", label: __("To Date")},
|
||||
{fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
|
||||
{fieldtype:"Button", label: __("Reset Filters")}
|
||||
{fieldtype:"Button", label: __("Reset Filters"), icon: "icon-filter"}
|
||||
],
|
||||
setup_filters: function() {
|
||||
var me = this;
|
||||
|
@ -71,7 +71,7 @@ erpnext.StockBalance = erpnext.StockAnalytics.extend({
|
||||
{fieldtype:"Label", label: __("To")},
|
||||
{fieldtype:"Date", label: __("To Date")},
|
||||
{fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
|
||||
{fieldtype:"Button", label: __("Reset Filters")}
|
||||
{fieldtype:"Button", label: __("Reset Filters"), icon: "icon-filter"}
|
||||
],
|
||||
|
||||
setup_plot_check: function() {
|
||||
|
@ -85,7 +85,7 @@ erpnext.StockLedger = erpnext.StockGridReport.extend({
|
||||
return dateutil.str_to_obj(val) >= dateutil.str_to_obj(item.posting_date);
|
||||
}},
|
||||
{fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
|
||||
{fieldtype:"Button", label: __("Reset Filters")}
|
||||
{fieldtype:"Button", label: __("Reset Filters"), icon: "icon-filter"}
|
||||
],
|
||||
|
||||
setup_filters: function() {
|
||||
|
@ -99,7 +99,7 @@ erpnext.StockLevel = erpnext.StockGridReport.extend({
|
||||
return val == opts.default_value || item.brand == val;
|
||||
}},
|
||||
{fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
|
||||
{fieldtype:"Button", label: __("Reset Filters")}
|
||||
{fieldtype:"Button", label: __("Reset Filters"), icon: "icon-filter"}
|
||||
],
|
||||
|
||||
setup_filters: function() {
|
||||
|
@ -35,7 +35,7 @@ erpnext.SupportAnalytics = frappe.views.GridReportWithPlot.extend({
|
||||
{fieldtype:"Select", label: __("Range"),
|
||||
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
|
||||
{fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
|
||||
{fieldtype:"Button", label: __("Reset Filters")}
|
||||
{fieldtype:"Button", label: __("Reset Filters"), icon: "icon-filter"}
|
||||
],
|
||||
|
||||
setup_columns: function() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user