From 169fee529824552a8627fee07f0c8a7ec46adcbe Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 10 Jan 2013 14:44:03 +0530 Subject: [PATCH] changed wn.downloadify to wn.tools.downloadify --- public/js/wn/misc/tools.js | 4 +++- public/js/wn/views/grid_report.js | 2 +- public/js/wn/views/query_report.js | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/public/js/wn/misc/tools.js b/public/js/wn/misc/tools.js index 167fda534c..0605cb1720 100644 --- a/public/js/wn/misc/tools.js +++ b/public/js/wn/misc/tools.js @@ -1,4 +1,6 @@ -wn.downloadify = function(data, roles, me) { +wn.provide("wn.tools"); + +wn.tools.downloadify = function(data, roles, me) { if(roles && roles.length && !has_common(roles, user_roles)) { msgprint("Export not allowed. You need " + wn.utils.comma_or(roles) + " Role to export."); diff --git a/public/js/wn/views/grid_report.js b/public/js/wn/views/grid_report.js index 0eeffe20ae..2f9e61d74f 100644 --- a/public/js/wn/views/grid_report.js +++ b/public/js/wn/views/grid_report.js @@ -391,7 +391,7 @@ wn.views.GridReport = Class.extend({ this.dataView.endUpdate(); }, export: function() { - wn.downloadify(wn.slickgrid_tools.get_view_data(this.columns, this.dataView), + wn.tools.downloadify(wn.slickgrid_tools.get_view_data(this.columns, this.dataView), ["Report Manager", "System Manager"], this); return false; }, diff --git a/public/js/wn/views/query_report.js b/public/js/wn/views/query_report.js index edf1c6bd5f..bbc860f0e9 100644 --- a/public/js/wn/views/query_report.js +++ b/public/js/wn/views/query_report.js @@ -380,7 +380,7 @@ wn.views.QueryReport = Class.extend({ return [row.splice(1)]; }); this.title = this.query_form.get_value("name"); - wn.downloadify(result, ["Report Manager", "System Manager"], this); + wn.tools.downloadify(result, ["Report Manager", "System Manager"], this); return false; } }) \ No newline at end of file