From bb755d07bfbb3939b1ea4f672dcbf7aeb67c324f Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 10 Jan 2013 19:27:38 +0530 Subject: [PATCH] show Saved message in downloadify --- public/js/wn/misc/tools.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/public/js/wn/misc/tools.js b/public/js/wn/misc/tools.js index 0605cb1720..7c5a73fc57 100644 --- a/public/js/wn/misc/tools.js +++ b/public/js/wn/misc/tools.js @@ -18,11 +18,14 @@ wn.tools.downloadify = function(data, roles, me) { return me.title + '.csv'; }, data: function(){ - return wn.to_csv(data); + return wn.tools.to_csv(data); }, swf: 'lib/js/lib/downloadify/downloadify.swf', downloadImage: 'lib/js/lib/downloadify/download.png', - onComplete: function(){ msgobj.hide(); }, + onComplete: function(){ + msgobj.hide(); + msgprint("Saved."); + }, onCancel: function(){ msgobj.hide(); }, onError: function(){ msgobj.hide(); }, width: 100, @@ -32,7 +35,7 @@ wn.tools.downloadify = function(data, roles, me) { }); } -wn.to_csv = function(data) { +wn.tools.to_csv = function(data) { var res = []; $.each(data, function(i, row) { row = $.map(row, function(col) {