mirror of
https://github.com/simon987/sist2.git
synced 2025-04-19 10:16:42 +00:00
Path in list view #16
This commit is contained in:
parent
80708ca636
commit
0d06d39281
@ -1,4 +1,3 @@
|
||||
#include <src/ctx.h>
|
||||
#include "src/sist.h"
|
||||
#include "src/ctx.h"
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -2,6 +2,23 @@
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.path-row {
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-ms-flex-align: start;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.tag-container {
|
||||
margin-left: 0.3rem;
|
||||
}
|
||||
|
||||
.path-line {
|
||||
color: #BBB;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #00BCD4;
|
||||
}
|
||||
@ -24,7 +41,11 @@ body {
|
||||
}
|
||||
|
||||
.sub-document {
|
||||
background: #37474F;
|
||||
background: #37474F !important;
|
||||
}
|
||||
|
||||
.list-group-item.sub-document {
|
||||
border-top: 1px solid #646464 !important;
|
||||
}
|
||||
|
||||
.sub-document .text-muted {
|
||||
@ -112,6 +133,7 @@ body {
|
||||
}
|
||||
|
||||
.file-title {
|
||||
width: 100%;
|
||||
font-size: 10pt;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
|
@ -2,6 +2,23 @@
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.path-row {
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-ms-flex-align: start;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.tag-container {
|
||||
margin-left: 0.3rem;
|
||||
}
|
||||
|
||||
.path-line {
|
||||
color: #444;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
overflow-y: scroll;
|
||||
}
|
||||
@ -16,7 +33,7 @@ body {
|
||||
}
|
||||
|
||||
.sub-document {
|
||||
background: #AB47BC1F;
|
||||
background: #AB47BC1F !important;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
@ -82,6 +99,7 @@ body {
|
||||
}
|
||||
|
||||
.file-title {
|
||||
width: 100%;
|
||||
font-size: 10pt;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
|
@ -367,6 +367,10 @@ function createDocLine(hit) {
|
||||
const line = document.createElement("div");
|
||||
line.setAttribute("class", "list-group-item flex-column align-items-start");
|
||||
|
||||
if (hit["_source"].hasOwnProperty("parent")) {
|
||||
line.classList.add("sub-document");
|
||||
isSubDocument = true;
|
||||
}
|
||||
|
||||
const title = makeTitle(hit);
|
||||
|
||||
@ -396,8 +400,16 @@ function createDocLine(hit) {
|
||||
titleDiv.appendChild(contentDiv);
|
||||
}
|
||||
|
||||
let pathLine = document.createElement("div");
|
||||
pathLine.setAttribute("class", "path-row");
|
||||
|
||||
let path = document.createElement("div");
|
||||
path.setAttribute("class", "path-line");
|
||||
path.setAttribute("title", hit["_source"]["path"] + "/");
|
||||
path.appendChild(document.createTextNode(hit["_source"]["path"] + "/"));
|
||||
|
||||
let tagContainer = document.createElement("div");
|
||||
tagContainer.setAttribute("class", "");
|
||||
tagContainer.setAttribute("class", "tag-container");
|
||||
|
||||
for (let i = 0; i < tags.length; i++) {
|
||||
tagContainer.appendChild(tags[i]);
|
||||
@ -409,7 +421,9 @@ function createDocLine(hit) {
|
||||
sizeTag.setAttribute("class", "text-muted");
|
||||
tagContainer.appendChild(sizeTag);
|
||||
|
||||
titleDiv.appendChild(tagContainer);
|
||||
titleDiv.appendChild(pathLine);
|
||||
pathLine.appendChild(path);
|
||||
pathLine.appendChild(tagContainer);
|
||||
|
||||
return line;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user