From 979db3bebdace1eab78a73672d4d0866d773b5f2 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 17 Aug 2012 10:42:13 -0400 Subject: [PATCH] minor changes --- lib/client/menu.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/client/menu.js b/lib/client/menu.js index 85250ed0..c8cb1033 100644 --- a/lib/client/menu.js +++ b/lib/client/menu.js @@ -47,11 +47,19 @@ CloudCommander.Menu.getConfig = (function(){ }}, download: {name: 'Download',callback: function(key, opt){ + var lCurrent = lThis.getCurrentFile(); - var lLink = lThis.getByTag('a', lCurrent)[0]; + var lLink = lThis.getByTag('a', lCurrent)[0].href; + + console.log('downloadin file ' + lLink +'...'); + var lDownload = lThis.anyload({ + name : 'iframe', + className : 'hidden', + src : lLink + '?download' + }); - console.log('downloadin file...'); + document.body.removeChild(lDownload); }} } };