From 095dfadbb0513078cf738dab71dfc948b987a572 Mon Sep 17 00:00:00 2001 From: ClemDee Date: Fri, 9 Aug 2019 11:48:57 +0200 Subject: [PATCH] Revert some pending stuff to be able to merge to staging --- www/drive/inner.js | 43 +++++++++---------------------------------- 1 file changed, 9 insertions(+), 34 deletions(-) diff --git a/www/drive/inner.js b/www/drive/inner.js index 0fdcd4491..5fa82edfb 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -8,7 +8,6 @@ define([ '/common/common-interface.js', '/common/common-constants.js', '/common/common-feedback.js', - '/common/make-backup.js', '/bower_components/nthen/index.js', '/common/sframe-common.js', '/common/common-realtime.js', @@ -33,7 +32,6 @@ define([ UI, Constants, Feedback, - Backup, nThen, SFCommon, CommonRealtime, @@ -1013,6 +1011,9 @@ define([ // We can only open parent in virtual categories hide.push('openparent'); } + if (!$element.is('.cp-border-color-file')) { + hide.push('download'); + } if ($element.is('.cp-app-drive-element-file')) { // No folder in files hide.push('color'); @@ -3556,38 +3557,12 @@ define([ } else if ($(this).hasClass('cp-app-drive-context-download')) { if (paths.length !== 1) { return; } - var path = paths[0]; - el = manager.find(path.path); - console.log("paths", paths); - console.log("el", el); - - // folder - if (manager.isFolder(el)) { - // folder - if (!manager.isSharedFolder(el)) { - console.log("--isFolder--"); - } - // shared folder - else { - console.log("--isSharedFolder--"); - } - } - // file - else if (manager.isFile(el)) { - // imported file - if (path.element.is(".cp-border-color-file")) { - console.log("--isFile--"); - data = manager.getFileData(el); - APP.FM.downloadFile(data, function (err, obj) { - console.log(err, obj); - console.log('DONE'); - }); - } - // pad - else { - console.log("--isPad--"); - } - } + el = manager.find(paths[0].path); + data = manager.getFileData(el); + APP.FM.downloadFile(data, function (err, obj) { + console.log(err, obj); + console.log('DONE'); + }); } else if ($(this).hasClass('cp-app-drive-context-share')) { if (paths.length !== 1) { return; }