changed wn.downloadify to wn.tools.downloadify

This commit is contained in:
Anand Doshi 2013-01-10 14:44:03 +05:30
parent 7087c1d8a6
commit 169fee5298
3 changed files with 5 additions and 3 deletions

View file

@ -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.");

View file

@ -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;
},

View file

@ -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;
}
})