Ability to add files from the drive toolbar

Fix CSS issues with the different toolbars
Translate the backup URL button alert
This commit is contained in:
yflory
2017-01-09 16:17:04 +01:00
parent d5561910d4
commit 5b08fed7fa
10 changed files with 134 additions and 46 deletions

View File

@@ -627,14 +627,15 @@ define([
var trashFiles = getTrashFiles();
var templateFiles = getTemplateFiles();
var newPath, parentEl;
if (path && isPathInHrefArray(path)) {
if (path) {
newPath = decodeURIComponent(path).split(',');
}
if (path && isPathInHrefArray(newPath)) {
parentEl = findElement(files, newPath);
parentEl.push(href);
return;
}
if (path && name) {
newPath = decodeURIComponent(path).split(',');
if (path && isPathInRoot(newPath) && name) {
parentEl = findElement(files, newPath);
if (parentEl) {
var newName = getAvailableName(parentEl, name);
@@ -642,7 +643,7 @@ define([
return;
}
}
if (unsortedFiles.indexOf(href) === -1 && rootFiles.indexOf(href) === -1&& templateFiles.indexOf(href) === -1 && trashFiles.indexOf(href) === -1) {
if (unsortedFiles.indexOf(href) === -1 && rootFiles.indexOf(href) === -1 && templateFiles.indexOf(href) === -1 && trashFiles.indexOf(href) === -1) {
files[UNSORTED].push(href);
}
};