diff --git a/public/js/wn/views/grid_report.js b/public/js/wn/views/grid_report.js index 2f9e61d74f..b36e582012 100644 --- a/public/js/wn/views/grid_report.js +++ b/public/js/wn/views/grid_report.js @@ -820,4 +820,40 @@ wn.views.TreeGridReport = wn.views.GridReportWithPlot.extend({ d.indent = indent; }); }, + + export: function() { + var msgbox = msgprint('
Select To Download:
\ +With Groups
\ +With Ledgers
\ +');
+
+ var me = this;
+
+ $(msgbox.body).find("button").click(function() {
+ var with_groups = $(msgbox.body).find("[name='with_groups']").is(":checked");
+ var with_ledgers = $(msgbox.body).find("[name='with_ledgers']").is(":checked");
+
+ var data = wn.slickgrid_tools.get_view_data(me.columns, me.dataView,
+ function(row, item) {
+ if(with_groups) {
+ // add row
+ for(var i=0; i