From f74d0a46a40ba11132b5ebd469c62b3ce8466765 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 9 Jan 2017 18:38:05 +0100 Subject: [PATCH] Remove the alert when pressing del in 'all files' --- customize.dist/translations/messages.fr.js | 3 ++- customize.dist/translations/messages.js | 1 + www/common/fileObject.js | 4 ++++ www/drive/file.css | 22 +++++++++++++++------- www/drive/main.js | 15 +++++++++++---- 5 files changed, 33 insertions(+), 12 deletions(-) diff --git a/customize.dist/translations/messages.fr.js b/customize.dist/translations/messages.fr.js index cc1d447dc..6d415e2e6 100644 --- a/customize.dist/translations/messages.fr.js +++ b/customize.dist/translations/messages.fr.js @@ -198,8 +198,9 @@ define(function () { out.fm_selectError = "Impossible de sélectionner l'élément ciblé. Si le problème persiste, essayez de recharger la page."; out.fm_info_root = "Créez ici autant de dossiers que vous le souhaitez pour trier vos fichiers."; 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_template = "Contient tous les fichiers que vous avez sauvés en tant que modèle afin de les réutiliser lors de la création d'un nouveau document."; 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 + 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 depuis cet endroit.'; // Same here 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.
" + diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js index 67ee52f5b..7e1ba420c 100644 --- a/customize.dist/translations/messages.js +++ b/customize.dist/translations/messages.js @@ -200,6 +200,7 @@ define(function () { out.fm_selectError = "Unable to select the targetted element. If the problem persist, try to reload the page."; out.fm_info_root = "Create as many nested folders here as you want to sort your files."; 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_template = 'Contains all the pads stored as templates and that you can re-use when you create a new document.'; 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.
" + diff --git a/www/common/fileObject.js b/www/common/fileObject.js index 26fdbee93..951af5e88 100644 --- a/www/common/fileObject.js +++ b/www/common/fileObject.js @@ -58,6 +58,10 @@ define([ return path[0] && path[0] === TRASH; }; + var isPathInFilesData = exp.isPathInFilesData = function (path) { + return path[0] && path[0] === FILES_DATA; + }; + var isFile = exp.isFile = function (element) { return typeof(element) === "string"; }; diff --git a/www/drive/file.css b/www/drive/file.css index 58d9b31d2..96b02c9b0 100644 --- a/www/drive/file.css +++ b/www/drive/file.css @@ -201,12 +201,6 @@ li { float: right; } -.topButtonContainer { - border: 1px solid #ccc; - float: right; - border-radius: 4px; -} - .parentFolder { cursor: pointer; margin-left: 10px; @@ -366,10 +360,24 @@ button.newElement:hover { /* The container
- needed to position the dropdown content */ .dropdown-bar { - margin: 5px 5px; + margin: 4px 5px; position: relative; display: inline-block; } +.dropdown-bar.right { + float: right; +} + +/* Right-side buttons */ +.dropdown-bar.right button { + display: inline-block; +} +.dropdown-bar.right button.active { + display: none; +} +.dropdown-bar.right button .fa { + margin-right: 0px; +} /* Dropdown Content (Hidden by Default) */ .dropdown-bar-content { diff --git a/www/drive/main.js b/www/drive/main.js index f42ceecda..a0fd2750a 100644 --- a/www/drive/main.js +++ b/www/drive/main.js @@ -774,6 +774,9 @@ define([ case 'unsorted': msg = Messages.fm_info_unsorted; break; + case 'template': + msg = Messages.fm_info_template; + break; case 'trash': msg = Messages.fm_info_trash; break; @@ -803,14 +806,14 @@ define([ // Create the button allowing the user to switch from list to icons modes var createViewModeButton = function () { var $block = $('
', { - 'class': 'btn-group topButtonContainer changeViewModeContainer' + 'class': 'dropdown-bar right changeViewModeContainer' }); var $listButton = $('