diff --git a/lib/client/menu.js b/lib/client/menu.js index 95be9b07..318a9215 100644 --- a/lib/client/menu.js +++ b/lib/client/menu.js @@ -17,6 +17,7 @@ var CloudCmd, Util, DOM, CloudFunc, $; MenuSeted = false, Menu = this, Position, + Images = DOM.Images, UploadToItemNames; this.ENABLED = false; @@ -41,7 +42,7 @@ var CloudCmd, Util, DOM, CloudFunc, $; if (!Loading) { set(); - DOM.Images.hideLoad(); + Images.hideLoad(); if (Position && !Position.x ) Position = undefined; @@ -144,7 +145,7 @@ var CloudCmd, Util, DOM, CloudFunc, $; * download menu item callback */ function downloadFromMenu(key, opt) { - DOM.Images.showLoad(); + Images.showLoad(); var TIME = 1000, lPath = Info.path, @@ -161,16 +162,16 @@ var CloudCmd, Util, DOM, CloudFunc, $; async : false, className : 'hidden', src : lPath, - func : DOM.Images.hideLoad + func : Images.hideLoad }); - DOM.Images.hideLoad(); + Images.hideLoad(); setTimeout(function() { document.body.removeChild(lDownload); }, TIME); } else - DOM.Images.showError({ + Images.showError({ responseText: 'Error: You trying to' + 'download same file to often'}); } @@ -197,10 +198,14 @@ var CloudCmd, Util, DOM, CloudFunc, $; lMenuItems.Download = downloadFromMenu; lMenuItems.New = { - 'File' : DOM.promptNewFile, - 'Directory' : DOM.promptNewDir, + 'File' : DOM.promptNewFile, + 'Directory' : DOM.promptNewDir, - 'From Cloud' : function() { + 'From FilePicker' : function() { + Images.showLoad({ + top: true + }); + CloudCmd.execFromModule('FilePicker', 'saveFile', function(pName, pData) { var lPath = DOM.getCurrentDirPath() + pName;