Add a context menu on the ROOT folder in the drive

pull/1/head
yflory 8 years ago
parent be1db2a1ec
commit 126498585e

@ -376,6 +376,10 @@ define([
paths.forEach(function (p, i) {
var path = p.path;
var $element = p.element;
if (path.length === 1) {
hide.push($menu.find('a.rename'));
hide.push($menu.find('a.delete'));
}
if (!APP.editable) {
hide.push($menu.find('a.editable'));
}
@ -1709,6 +1713,7 @@ define([
(isRootOpened ? $folderOpenedIcon : $folderIcon);
var $rootElement = createTreeElement(ROOT_NAME, $rootIcon.clone(), [ROOT], false, true, false, isRootOpened);
$rootElement.addClass('root');
$rootElement.find('>.element-row').contextmenu(openDirectoryContextMenu);
var $root = $('<ul>').append($rootElement).appendTo($container);
$container = $rootElement;
} else if (filesOp.isFolderEmpty(root)) { return; }

Loading…
Cancel
Save