Hide the 'templates' list header if the category is empty

This commit is contained in:
yflory 2017-07-11 15:51:55 +02:00
parent 42075e4b5f
commit ce50dbf3ca
2 changed files with 8 additions and 4 deletions

View File

@ -538,8 +538,10 @@ span {
padding: 0 5px;
display: table-cell;
}
}
li {
&:not(.header) {
height: @toolbar-line-height;
line-height: @toolbar-line-height;
}
&.header {
cursor: default;
color: @table-header-fg;

View File

@ -1650,8 +1650,10 @@ define([
// and they don't hav a hierarchical structure (folder/subfolders)
var displayHrefArray = function ($container, rootName, draggable) {
var unsorted = files[rootName];
var $fileHeader = getFileListHeader(false);
$container.append($fileHeader);
if (unsorted.length) {
var $fileHeader = getFileListHeader(false);
$container.append($fileHeader);
}
var keys = unsorted;
var sortBy = Cryptpad.getLSAttribute(SORT_FILE_BY);
sortBy = sortBy === "" ? sortBy = 'name' : sortBy;