Remove the alert when pressing del in 'all files'

pull/1/head
yflory 8 years ago
parent dba42a90c7
commit f74d0a46a4

@ -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.<br>" +
"Il est <strong>fortement recommandé</strong> de garder cette URL pour vous-même.<br>" +
"Elle vous servira en cas de perte des données de votre navigateur afin de retrouver vos fichiers.<br>" +

@ -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.<br>" +

@ -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";
};

@ -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 <div> - 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 {

@ -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 = $('<div>', {
'class': 'btn-group topButtonContainer changeViewModeContainer'
'class': 'dropdown-bar right changeViewModeContainer'
});
var $listButton = $('<button>', {
'class': 'btn'
'class': 'newElement'
}).append($listIcon.clone());
var $gridButton = $('<button>', {
'class': 'btn'
'class': 'newElement'
}).append($gridIcon.clone());
$listButton.click(function () {
@ -1173,6 +1176,7 @@ define([
// Display the selected directory into the content part (rightside)
// NOTE: Elements in the trash are not using the same storage structure as the others
// _WORKGROUP_ : do not change the lastOpenedFolder value in localStorage
var displayDirectory = module.displayDirectory = function (path, force) {
if (!appStatus.isReady && !force) { return; }
// Only Trash and Root are available in not-owned files manager
@ -1206,7 +1210,9 @@ define([
module.resetTree();
setLastOpenedFolder(path);
if (!isWorkgroup()) {
setLastOpenedFolder(path);
}
var $toolbar = createToolbar(path);
var $title = createTitle(path);
@ -1573,6 +1579,7 @@ define([
$(ifrw).on('keydown', function (e) {
// "Del"
if (e.which === 46) {
if (filesOp.isPathInFilesData(currentPath)) { return; } // We can't remove elements directly from filesData
var $selected = $iframe.find('.selected');
if (!$selected.length) { return; }
var paths = [];

Loading…
Cancel
Save