Revert some pending stuff to be able to merge to staging

pull/1/head
ClemDee 5 years ago
parent 043808d9db
commit 095dfadbb0

@ -8,7 +8,6 @@ define([
'/common/common-interface.js', '/common/common-interface.js',
'/common/common-constants.js', '/common/common-constants.js',
'/common/common-feedback.js', '/common/common-feedback.js',
'/common/make-backup.js',
'/bower_components/nthen/index.js', '/bower_components/nthen/index.js',
'/common/sframe-common.js', '/common/sframe-common.js',
'/common/common-realtime.js', '/common/common-realtime.js',
@ -33,7 +32,6 @@ define([
UI, UI,
Constants, Constants,
Feedback, Feedback,
Backup,
nThen, nThen,
SFCommon, SFCommon,
CommonRealtime, CommonRealtime,
@ -1013,6 +1011,9 @@ define([
// We can only open parent in virtual categories // We can only open parent in virtual categories
hide.push('openparent'); hide.push('openparent');
} }
if (!$element.is('.cp-border-color-file')) {
hide.push('download');
}
if ($element.is('.cp-app-drive-element-file')) { if ($element.is('.cp-app-drive-element-file')) {
// No folder in files // No folder in files
hide.push('color'); hide.push('color');
@ -3556,38 +3557,12 @@ define([
} }
else if ($(this).hasClass('cp-app-drive-context-download')) { else if ($(this).hasClass('cp-app-drive-context-download')) {
if (paths.length !== 1) { return; } if (paths.length !== 1) { return; }
var path = paths[0]; el = manager.find(paths[0].path);
el = manager.find(path.path); data = manager.getFileData(el);
console.log("paths", paths); APP.FM.downloadFile(data, function (err, obj) {
console.log("el", el); console.log(err, obj);
console.log('DONE');
// 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--");
}
}
} }
else if ($(this).hasClass('cp-app-drive-context-share')) { else if ($(this).hasClass('cp-app-drive-context-share')) {
if (paths.length !== 1) { return; } if (paths.length !== 1) { return; }

Loading…
Cancel
Save