Ability to collapse the root directory in the drive
This commit is contained in:
parent
b4864b96ac
commit
98daf10ed1
@ -190,7 +190,8 @@ span {
|
|||||||
}
|
}
|
||||||
.docTree {
|
.docTree {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
padding: 0 0 0 20px;
|
//padding: 0 0 0 20px;
|
||||||
|
padding: 0;
|
||||||
cursor: auto;
|
cursor: auto;
|
||||||
&li, li {
|
&li, li {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@ -304,6 +305,24 @@ span {
|
|||||||
top: -1px;
|
top: -1px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.docTree {
|
||||||
|
.root > .element-row > .expcol {
|
||||||
|
position: relative;
|
||||||
|
top:0;
|
||||||
|
left: -10px;
|
||||||
|
}
|
||||||
|
.root > .element-row > .folder {
|
||||||
|
margin-left: -5px;
|
||||||
|
}
|
||||||
|
.root {
|
||||||
|
&> .element-row {
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
&> ul {
|
||||||
|
padding-left: 30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Expand/collapse lines
|
// Expand/collapse lines
|
||||||
.docTree ul {
|
.docTree ul {
|
||||||
|
|||||||
@ -2092,7 +2092,10 @@ define([
|
|||||||
var $rootIcon = filesOp.isFolderEmpty(files[ROOT]) ?
|
var $rootIcon = filesOp.isFolderEmpty(files[ROOT]) ?
|
||||||
(isRootOpened ? $folderOpenedEmptyIcon : $folderEmptyIcon) :
|
(isRootOpened ? $folderOpenedEmptyIcon : $folderEmptyIcon) :
|
||||||
(isRootOpened ? $folderOpenedIcon : $folderIcon);
|
(isRootOpened ? $folderOpenedIcon : $folderIcon);
|
||||||
var $rootElement = createTreeElement(ROOT_NAME, $rootIcon.clone(), [ROOT], false, true, false, isRootOpened);
|
var $rootElement = createTreeElement(ROOT_NAME, $rootIcon.clone(), [ROOT], false, true, true, isRootOpened);
|
||||||
|
if (!filesOp.hasSubfolder(root)) {
|
||||||
|
$rootElement.find('.expcol').css('visibility', 'hidden');
|
||||||
|
}
|
||||||
$rootElement.addClass('root');
|
$rootElement.addClass('root');
|
||||||
$rootElement.find('>.element-row').contextmenu(openDirectoryContextMenu);
|
$rootElement.find('>.element-row').contextmenu(openDirectoryContextMenu);
|
||||||
$('<ul>', {'class': 'docTree'}).append($rootElement).appendTo($container);
|
$('<ul>', {'class': 'docTree'}).append($rootElement).appendTo($container);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user