From 046220f239be0124dc27576bb63a1247e2340eaf Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 21 Dec 2016 11:46:49 +0100 Subject: [PATCH] Add info boxes for the different categories --- customize.dist/translations/messages.fr.js | 8 ++++---- customize.dist/translations/messages.js | 2 +- www/file/file.css | 11 +++++++---- www/file/main.js | 12 +++++++++++- 4 files changed, 23 insertions(+), 10 deletions(-) diff --git a/customize.dist/translations/messages.fr.js b/customize.dist/translations/messages.fr.js index 66d475e09..3fa0bd5a1 100644 --- a/customize.dist/translations/messages.fr.js +++ b/customize.dist/translations/messages.fr.js @@ -190,10 +190,10 @@ define(function () { out.fm_unknownFolderError = "Le dossier sélectionné ou le dernier dossier visité n'existe plus. Ouverture du dossier parent..."; out.fm_contextMenuError = "Impossible d'ouvrir le menu contextuel pour cet élément. Si le problème persiste, essayez de rechercher la page."; 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/sous-dossiers que vous le souhaitez pour trier vos fichiers."; - out.fm_info_unsorted = 'Contains all the files you\'ve visited that are not yet sorted in "My 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 "My Documents", "Unsorted" and "Trash". You can\'t move or remove files from here.'; // Same here + 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 "Mes 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 "Mes 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.fc_newfolder = "Nouveau dossier"; out.fc_rename = "Renommer"; diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js index bd189b064..3bb537252 100644 --- a/customize.dist/translations/messages.js +++ b/customize.dist/translations/messages.js @@ -189,7 +189,7 @@ define(function () { out.fm_unknownFolderError = "The selected or last visited directory no longer exist. Opening the parent folder..."; out.fm_contextMenuError = "Unable to open the context menu for that element. If the problem persist, try to reload the page."; 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 folders/subfolders here as you want to sort your files."; + 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 "My 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 "My Documents", "Unsorted" and "Trash". You can\'t move or remove files from here.'; // Same here diff --git a/www/file/file.css b/www/file/file.css index 72947e93c..a42f94208 100644 --- a/www/file/file.css +++ b/www/file/file.css @@ -192,6 +192,12 @@ li { background: #ddddff; border: 1px solid #bbb; border-radius: 5px; + margin-bottom: 10px; +} +#content .info-box span { + cursor: pointer; + margin-left: 10px; + float: right; } .topButtonContainer { @@ -257,13 +263,10 @@ li { flex: 1; } -#content .list li.file-header { - margin-top: 20px; -} - #content .list li.header { cursor: default; color: #008; + margin-top: 10px; } #content .list li.header .element span:not(.fa) { border-right: 1px solid #CCC; diff --git a/www/file/main.js b/www/file/main.js index 58af28d5e..1f7c40772 100644 --- a/www/file/main.js +++ b/www/file/main.js @@ -213,6 +213,7 @@ define([ var $gridIcon = $('', {"class": "fa fa-th"}); var $sortAscIcon = $('', {"class": "fa fa-angle-up"}); var $sortDescIcon = $('', {"class": "fa fa-angle-down"}); + var $closeIcon = $('', {"class": "fa fa-window-close"}); if (!APP.readOnly) { setEditable(true); @@ -708,10 +709,19 @@ define([ default: msg = undefined; } - if (!msg) { + if (!msg || Cryptpad.getLSAttribute('hide-info-' + path[0]) === '1') { $box.hide(); } else { $box.text(msg); + var $close = $closeIcon.clone().css({ + 'cursor': 'pointer', + 'margin-left': '10px', + title: Messages.fm_closeInfoBox + }).on('click', function () { + $box.hide(); + Cryptpad.setLSAttribute('hide-info-' + path[0], '1'); + }); + $box.prepend($close); } return $box; };