diff --git a/customize.dist/translations/messages.fr.js b/customize.dist/translations/messages.fr.js index 5be6d0ae5..9c64e1f4f 100644 --- a/customize.dist/translations/messages.fr.js +++ b/customize.dist/translations/messages.fr.js @@ -172,6 +172,7 @@ define(function () { out.fm_lastAccess = "Dernier accès"; out.fm_creation = "Création"; out.fm_forbidden = "Action interdite"; + out.fm_originalPath = "Chemin d'origine"; out.fm_emptyTrashDialog = "Êtes-vous sûr de vouloir vider la corbeille ?"; out.fm_removeSeveralPermanentlyDialog = "Êtes-vous sûr de vouloir supprimer ces {0} éléments de manière permanente ?"; out.fm_removePermanentlyDialog = "Êtes-vous sûr de vouloir supprimer {0} de la corbeille de manière permanente ?"; @@ -189,10 +190,16 @@ define(function () { out.fc_restore = "Restaurer"; out.fc_remove = "Supprimer définitivement"; out.fc_empty = "Vider la corbeille"; + out.fc_newpad = "Nouveau pad de texte"; + out.fc_newcode = "Nouveau pad de code"; + out.fc_newslide = "Nouvelle présentation"; + out.fc_newpoll = "Nouveau sondage"; + out.fc_prop = "Propriétés"; // fileObject.js (logs) out.fo_moveUnsortedError = "La liste des éléments non triés ne peut pas contenir de dossiers."; out.fo_existingNameError = "Ce nom est déjà utilisé dans ce répertoire. Veuillez en choisir un autre."; out.fo_moveFolderToChildError = "Vous ne pouvez pas déplacer un dossier dans un de ses descendants"; + out.fo_unableToRestore = "Impossible de restaurer ce fichier à son emplacement d'origine. Vous pouvez essayer de le déplacer à un nouvel emplacement."; // index.html diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js index e1369a550..f5f80e4a1 100644 --- a/customize.dist/translations/messages.js +++ b/customize.dist/translations/messages.js @@ -172,6 +172,7 @@ define(function () { out.fm_lastAccess = "Last access"; out.fm_creation = "Creation"; out.fm_forbidden = "Forbidden action"; + out.fm_originalPath = "Original path"; out.fm_emptyTrashDialog = "Are you sure you want to empty the trash?"; out.fm_removeSeveralPermanentlyDialog = "Are you sure you want to remove these {0} elements from the trash permanently?"; out.fm_removePermanentlyDialog = "Are you sure you want to remove {0} from the trash permanently?"; @@ -189,10 +190,16 @@ define(function () { out.fc_restore = "Restore"; out.fc_remove = "Delete permanently"; out.fc_empty = "Empty the trash"; + out.fc_newpad = "New text pad"; + out.fc_newcode = "New code pad"; + out.fc_newslide = "New presentation"; + out.fc_newpoll = "New poll"; + out.fc_prop = "Properties"; // fileObject.js (logs) out.fo_moveUnsortedError = "You can't move a folder to the list of unsorted pads"; out.fo_existingNameError = "Name already used in that directory. Please choose another one."; out.fo_moveFolderToChildError = "You can't move a folder into one of its descendants"; + out.fo_unableToRestore = "Unable to restore that file to its original location. You can try to move it to a new location."; // index.html diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index d12e73c04..120be68dc 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -103,7 +103,8 @@ define([ store = Store; }); - var isArray = function (o) { return Object.prototype.toString.call(o) === '[object Array]'; }; + // var isArray = function (o) { return Object.prototype.toString.call(o) === '[object Array]'; }; + var isArray = $.isArray; var fixHTML = common.fixHTML = function (html) { return html.replace(/ 1 && !newParentEl) { + newPath.pop(); + newParentEl = findElement(files, newPath); + } + if (!newParentEl) { + log(Messages.fo_unableToRestore); + } var name = getAvailableName(newParentEl, path[1]); // Move the element newParentEl[name] = element; diff --git a/www/file/inner.html b/www/file/inner.html index 88c8e40c7..dc9b5bd44 100644 --- a/www/file/inner.html +++ b/www/file/inner.html @@ -23,10 +23,10 @@