diff --git a/customize.dist/fsStore.js b/customize.dist/fsStore.js
index bea193fa1..1afd96063 100644
--- a/customize.dist/fsStore.js
+++ b/customize.dist/fsStore.js
@@ -155,11 +155,11 @@ define([
exp.proxy = rt.proxy;
rt.proxy.on('create', function (info) {
exp.info = info;
- var realtime = info.realtime;
if (!Cryptpad.getUserHash()) {
localStorage.FS_hash = Cryptpad.getEditHashFromKeys(info.channel, secret.keys);
}
}).on('ready', function () {
+ if (ready) { return; }
if (!rt.proxy[Cryptpad.storageKey] || !Cryptpad.isArray(rt.proxy[Cryptpad.storageKey])) {
var oldStore = Cryptpad.getStore(true);
oldStore.get(Cryptpad.storageKey, function (err, s) {
diff --git a/customize.dist/src/less/toolbar.less b/customize.dist/src/less/toolbar.less
index 454eedbf7..bcdf9fd4d 100644
--- a/customize.dist/src/less/toolbar.less
+++ b/customize.dist/src/less/toolbar.less
@@ -28,7 +28,6 @@
font: normal normal normal 12px Arial,Helvetica,Tahoma,Verdana,Sans-Serif;
color: #000;
- display: inline-block;
width: 100%;
z-index: 9001;
@@ -38,11 +37,9 @@
.cryptpad-lag {
box-sizing: content-box;
- vertical-align: top;
height: 16px;
width: 16px;
display: inline-block;
- margin: 2px 0px;
padding: 5px;
div {
margin: auto;
@@ -62,7 +59,7 @@
height: 26px;
padding-right: 5px;
padding-left: 5px;
- margin: 2px;
+ margin: 3px 2px;
}
button {
diff --git a/customize.dist/toolbar.css b/customize.dist/toolbar.css
index cd9545990..1ecc91116 100644
--- a/customize.dist/toolbar.css
+++ b/customize.dist/toolbar.css
@@ -31,7 +31,6 @@
user-select: none;
font: normal normal normal 12px Arial, Helvetica, Tahoma, Verdana, Sans-Serif;
color: #000;
- display: inline-block;
width: 100%;
z-index: 9001;
}
@@ -40,11 +39,9 @@
}
.cryptpad-toolbar .cryptpad-lag {
box-sizing: content-box;
- vertical-align: top;
height: 16px;
width: 16px;
display: inline-block;
- margin: 2px 0px;
padding: 5px;
}
.cryptpad-toolbar .cryptpad-lag div {
@@ -65,7 +62,7 @@
height: 26px;
padding-right: 5px;
padding-left: 5px;
- margin: 2px;
+ margin: 3px 2px;
}
.cryptpad-toolbar button {
background-color: inherit;
diff --git a/customize.dist/translations/messages.fr.js b/customize.dist/translations/messages.fr.js
index 31bf2df6b..cc1d447dc 100644
--- a/customize.dist/translations/messages.fr.js
+++ b/customize.dist/translations/messages.fr.js
@@ -174,8 +174,9 @@ define(function () {
out.fm_trashName = "Corbeille";
out.fm_unsortedName = "Fichiers non triés";
out.fm_filesDataName = "Tous les fichiers";
+ out.fm_newButton = "Nouveau";
out.fm_newFolder = "Nouveau dossier";
- out.fm_newFolderButton = "NOUVEAU DOSSIER";
+ out.fm_folder = "Dossier";
out.fm_folderName = "Nom du dossier";
out.fm_numberOfFolders = "# de dossiers";
out.fm_numberOfFiles = "# de fichiers";
@@ -199,7 +200,12 @@ define(function () {
out.fm_info_unsorted = 'Contient tous les documents que vous avez ouvert et qui ne sont pas triés dans "Documents" ou déplacés vers la "Corbeille".'; // "My Documents" should match with the "out.fm_rootName" key, and "Trash" with "out.fm_trashName"
out.fm_info_trash = 'Les fichiers supprimés dans la corbeille sont également enlevés de "Tous les fichiers" et il est impossible de les récupérer depuis l\'explorateur de fichiers.'; // Same here for "All files" and "out.fm_filesDataName"
out.fm_info_allFiles = 'Contient tous les fichiers de "Documents", "Fichiers non triés" et "Corbeille". Vous ne pouvez pas supprimer ou déplacer des fichiers d\'ici.'; // Same here
- // File - Context menu
+ out.fm_alert_backupUrl = "URL de secours pour ce contenu.
" +
+ "Il est fortement recommandé de garder cette URL pour vous-même.
" +
+ "Elle vous servira en cas de perte des données de votre navigateur afin de retrouver vos fichiers.
" +
+ "Quiconque se trouve en possession de celle-ci peut modifier ou supprimer tous les fichiers de ce gestionnaire.
" +
+ '';
+ // File - Context menu
out.fc_newfolder = "Nouveau dossier";
out.fc_rename = "Renommer";
out.fc_open = "Ouvrir";
diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js
index 146c5f655..67ee52f5b 100644
--- a/customize.dist/translations/messages.js
+++ b/customize.dist/translations/messages.js
@@ -176,8 +176,9 @@ define(function () {
out.fm_unsortedName = "Unsorted files";
out.fm_filesDataName = "All files";
out.fm_templateName = "Templates";
+ out.fm_newButton = "New";
out.fm_newFolder = "New folder";
- out.fm_newFolderButton = "NEW FOLDER";
+ out.fm_folder = "Folder";
out.fm_folderName = "Folder name";
out.fm_numberOfFolders = "# of folders";
out.fm_numberOfFiles = "# of files";
@@ -201,6 +202,11 @@ define(function () {
out.fm_info_unsorted = 'Contains all the files you\'ve visited that are not yet sorted in "Documents" or moved to the "Trash".'; // "My Documents" should match with the "out.fm_rootName" key, and "Trash" with "out.fm_trashName"
out.fm_info_trash = 'Files deleted from the trash are also removed from "All files" and it is impossible to recover them from the file manager.'; // Same here for "All files" and "out.fm_filesDataName"
out.fm_info_allFiles = 'Contains all the files from "Documents", "Unsorted" and "Trash". You can\'t move or remove files from here.'; // Same here
+ out.fm_alert_backupUrl = "Backup URL for this drive.
" +
+ "It is highly recommended that you keep ip for yourself only.
" +
+ "You can use it to retrieve all your files in case your browser memory got erased.
" +
+ "Anybody with that URL can edit or remove all the files in your file manager.
" +
+ '';
// File - Context menu
out.fc_newfolder = "New folder";
out.fc_rename = "Rename";
diff --git a/www/common/fileObject.js b/www/common/fileObject.js
index 2f26f3dab..26fdbee93 100644
--- a/www/common/fileObject.js
+++ b/www/common/fileObject.js
@@ -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);
}
};
diff --git a/www/drive/file.css b/www/drive/file.css
index fbf914a13..58d9b31d2 100644
--- a/www/drive/file.css
+++ b/www/drive/file.css
@@ -342,7 +342,6 @@ li {
button.newElement {
border-radius: 0px;
height: 30px;
- margin: 5px 5px;
background: #888;
color: #eee;
font-size: 15px;
@@ -354,3 +353,58 @@ button.newElement:hover {
box-shadow: 0px 0px 2px #000;
}
+
+/* Style The Dropdown Button */
+.dropbtn {
+ background-color: #4CAF50;
+ color: white;
+ padding: 16px;
+ font-size: 16px;
+ border: none;
+ cursor: pointer;
+}
+
+/* The container