Don't display 'All files' in the menu

pull/1/head
yflory 8 years ago
parent 641c805518
commit e73b4a1131

@ -162,6 +162,7 @@ define(function () {
out.fm_unknownFolderError = "Le dossier sélectionné ou le dernier dossier visité n'existe plus. Ouverture du dossier parent..."; 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_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_selectError = "Impossible de sélectionner l'élément ciblé. Si le problème persiste, essayez de recharger la page.";
out.fm_categoryError = "Impossible d'afficher la catégorie sélectionnée, affichage de Documents";
out.fm_info_root = "Créez ici autant de dossiers que vous le souhaitez pour trier vos fichiers."; 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_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_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.";

@ -165,6 +165,7 @@ define(function () {
out.fm_unknownFolderError = "The selected or last visited directory no longer exist. Opening the parent folder..."; 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_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_selectError = "Unable to select the targetted element. If the problem persist, try to reload the page.";
out.fm_categoryError = "Unable to open the selected category, displaying root.";
out.fm_info_root = "Create as many nested folders 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 "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_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_template = 'Contains all the pads stored as templates and that you can re-use when you create a new document.';

@ -94,7 +94,7 @@ span.fa-folder-open {
background: #fff; background: #fff;
overflow: auto; overflow: auto;
resize: horizontal; resize: horizontal;
width: 250px; width: auto;
white-space: nowrap; white-space: nowrap;
max-width: 500px; max-width: 500px;
min-width: 200px; min-width: 200px;

@ -128,7 +128,7 @@ span {
background: @tree-bg; background: @tree-bg;
overflow: auto; overflow: auto;
resize: horizontal; resize: horizontal;
width: 250px; width: auto;
white-space: nowrap; white-space: nowrap;
max-width: 500px; max-width: 500px;
min-width: 200px; min-width: 200px;

@ -202,6 +202,12 @@ define([
// FILE MANAGER // FILE MANAGER
// _WORKGROUP_ and other people drive : display Documents as main page // _WORKGROUP_ and other people drive : display Documents as main page
var currentPath = module.currentPath = isOwnDrive() ? getLastOpenedFolder() : [ROOT]; var currentPath = module.currentPath = isOwnDrive() ? getLastOpenedFolder() : [ROOT];
// Categories dislayed in the menu
// _WORKGROUP_ : do not display unsorted
var displayedCategories = [ROOT, UNSORTED, TRASH];
if (isWorkgroup()) { displayedCategory = [ROOT, TRASH]; }
var lastSelectTime; var lastSelectTime;
var selectedElement; var selectedElement;
@ -1284,8 +1290,8 @@ define([
if (!APP.editable) { debug("Read-only mode"); } if (!APP.editable) { debug("Read-only mode"); }
if (!appStatus.isReady && !force) { return; } if (!appStatus.isReady && !force) { return; }
// Only Trash and Root are available in not-owned files manager // Only Trash and Root are available in not-owned files manager
if (isWorkgroup() && !filesOp.isPathInTrash(path) && !filesOp.isPathInRoot(path)) { if (displayedCategories.indexOf(path[0]) === -1) {
log("Unable to open the selected category, displaying root"); //TODO translate log(Messages.categoryError);
currentPath = [ROOT]; currentPath = [ROOT];
displayDirectory(currentPath); displayDirectory(currentPath);
return; return;
@ -1532,13 +1538,11 @@ define([
var resetTree = module.resetTree = function () { var resetTree = module.resetTree = function () {
$tree.html(''); $tree.html('');
createTree($tree, [ROOT]); if (displayedCategories.indexOf(ROOT) !== -1) { createTree($tree, [ROOT]); }
if (!isWorkgroup()) { if (displayedCategories.indexOf(UNSORTED) !== -1) { createUnsorted($tree, [UNSORTED]); }
createUnsorted($tree, [UNSORTED]); if (displayedCategories.indexOf(TEMPLATE) !== -1) { createTemplate($tree, [TEMPLATE]); }
//createTemplate($tree, [TEMPLATE]); if (displayedCategories.indexOf(FILES_DATA) !== -1) { createAllFiles($tree, [FILES_DATA]); }
createAllFiles($tree, [FILES_DATA]); if (displayedCategories.indexOf(TRASH) !== -1) { createTrash($tree, [TRASH]); }
}
createTrash($tree, [TRASH]);
}; };
var hideMenu = module.hideMenu = function () { var hideMenu = module.hideMenu = function () {

Loading…
Cancel
Save