Sfoglia il codice sorgente

[minor] print_template and frappe.render_grid fixes (#3476)

version-14
Makarand Bauskar 8 anni fa
committed by Nabin Hait
parent
commit
fdd6873c5e
2 ha cambiato i file con 13 aggiunte e 8 eliminazioni
  1. +11
    -8
      frappe/public/js/frappe/views/reports/query_report.js
  2. +2
    -0
      frappe/public/js/lib/microtemplate.js

+ 11
- 8
frappe/public/js/frappe/views/reports/query_report.js Vedi File

@@ -188,19 +188,20 @@ frappe.views.QueryReport = Class.extend({
if(this.html_format) {
var content = frappe.render(this.html_format, {
data: frappe.slickgrid_tools.get_filtered_items(this.dataView),
filters:this.get_values(),
report:this});
filters: this.get_values(),
report: this
});

frappe.render_grid({
content:content,
title:__(this.report_name),
content: content,
title: __(this.report_name),
print_settings: this.print_settings,
});
} else {
frappe.render_grid({
grid:this.grid,
grid: this.grid,
report: this,
title:__(this.report_name),
title: __(this.report_name),
print_settings: this.print_settings,
});
}
@@ -233,7 +234,8 @@ frappe.views.QueryReport = Class.extend({
base_url: base_url,
print_css: print_css,
print_settings: this.print_settings,
landscape: landscape
landscape: landscape,
columns: columns
});
} else {
// rows filtered by inline_filter of slickgrid
@@ -257,7 +259,8 @@ frappe.views.QueryReport = Class.extend({
base_url: base_url,
print_css: print_css,
print_settings: this.print_settings,
landscape: landscape
landscape: landscape,
columns: columns
});
}



+ 2
- 0
frappe/public/js/lib/microtemplate.js Vedi File

@@ -93,6 +93,8 @@ frappe.render_grid = function(opts) {
} else if(opts.grid) {
opts.data = opts.grid.getData().getItems();
}
} else {
opts.columns = [];
}

// show landscape view if columns more than 10


Caricamento…
Annulla
Salva