瀏覽代碼

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

version-14
Makarand Bauskar 8 年之前
committed by Nabin Hait
父節點
當前提交
fdd6873c5e
共有 2 個文件被更改,包括 13 次插入8 次删除
  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 查看文件

@@ -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 查看文件

@@ -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


Loading…
取消
儲存