mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
removed children overview (will be replaced by book)
This commit is contained in:
parent
ea71e96f72
commit
cbc7710d81
@ -46,8 +46,7 @@ async function setupProtectedSession(password) {
|
|||||||
|
|
||||||
await treeService.reload();
|
await treeService.reload();
|
||||||
|
|
||||||
// it's important that tree has been already reloaded at this point since detail also uses tree cache (for children overview)
|
// it's important that tree has been already reloaded at this point since detail also uses tree cache (for book)
|
||||||
// children overview is the reason why we need to reload all tabs
|
|
||||||
await noteDetailService.reloadAllTabs();
|
await noteDetailService.reloadAllTabs();
|
||||||
|
|
||||||
if (protectedSessionDeferred !== null) {
|
if (protectedSessionDeferred !== null) {
|
||||||
|
@ -65,7 +65,6 @@ class TabContext {
|
|||||||
this.$notePathList = this.$tabContent.find(".note-path-list");
|
this.$notePathList = this.$tabContent.find(".note-path-list");
|
||||||
this.$notePathCount = this.$tabContent.find(".note-path-count");
|
this.$notePathCount = this.$tabContent.find(".note-path-count");
|
||||||
this.$noteDetailComponents = this.$tabContent.find(".note-detail-component");
|
this.$noteDetailComponents = this.$tabContent.find(".note-detail-component");
|
||||||
this.$childrenOverview = this.$tabContent.find(".children-overview");
|
|
||||||
this.$scriptArea = this.$tabContent.find(".note-detail-script-area");
|
this.$scriptArea = this.$tabContent.find(".note-detail-script-area");
|
||||||
this.$savedIndicator = this.$tabContent.find(".saved-indicator");
|
this.$savedIndicator = this.$tabContent.find(".saved-indicator");
|
||||||
this.noteChangeDisabled = false;
|
this.noteChangeDisabled = false;
|
||||||
@ -180,8 +179,6 @@ class TabContext {
|
|||||||
|
|
||||||
if (utils.isDesktop()) {
|
if (utils.isDesktop()) {
|
||||||
this.noteType.update();
|
this.noteType.update();
|
||||||
|
|
||||||
this.showChildrenOverview();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.sidebar) {
|
if (this.sidebar) {
|
||||||
@ -365,31 +362,6 @@ class TabContext {
|
|||||||
this.$savedIndicator.fadeOut();
|
this.$savedIndicator.fadeOut();
|
||||||
}
|
}
|
||||||
|
|
||||||
async showChildrenOverview() {
|
|
||||||
const attributes = await this.attributes.getAttributes();
|
|
||||||
const hideChildrenOverview = attributes.some(attr => attr.type === 'label' && attr.name === 'hideChildrenOverview')
|
|
||||||
|| ['relation-map', 'image', 'file', 'book'].includes(this.note.type);
|
|
||||||
|
|
||||||
if (hideChildrenOverview) {
|
|
||||||
this.$childrenOverview.hide();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$childrenOverview.empty();
|
|
||||||
|
|
||||||
for (const childBranch of await this.note.getChildBranches()) {
|
|
||||||
const link = $('<a>', {
|
|
||||||
href: 'javascript:',
|
|
||||||
text: await treeUtils.getNoteTitle(childBranch.noteId, childBranch.parentNoteId)
|
|
||||||
}).attr('data-action', 'note').attr('data-note-path', this.notePath + '/' + childBranch.noteId);
|
|
||||||
|
|
||||||
const childEl = $('<div class="child-overview-item">').html(link);
|
|
||||||
this.$childrenOverview.append(childEl);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$childrenOverview.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
async addPath(notePath, isCurrent) {
|
async addPath(notePath, isCurrent) {
|
||||||
const title = await treeUtils.getNotePathTitle(notePath);
|
const title = await treeUtils.getNotePathTitle(notePath);
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ ul.fancytree-container {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-height: 200px;
|
min-height: 500px;
|
||||||
overflow-wrap: break-word; /* otherwise CKEditor fails miserably on super long lines */
|
overflow-wrap: break-word; /* otherwise CKEditor fails miserably on super long lines */
|
||||||
font-family: var(--detail-font-family);
|
font-family: var(--detail-font-family);
|
||||||
font-size: var(--detail-font-size);
|
font-size: var(--detail-font-size);
|
||||||
@ -136,7 +136,7 @@ ul.fancytree-container {
|
|||||||
border: 0 !important;
|
border: 0 !important;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
/* This is because with empty content height of editor is 0 and it's impossible to click into it */
|
/* This is because with empty content height of editor is 0 and it's impossible to click into it */
|
||||||
min-height: 200px;
|
min-height: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.note-detail-text p:first-child, .note-detail-text::before {
|
.note-detail-text p:first-child, .note-detail-text::before {
|
||||||
@ -353,11 +353,11 @@ div.ui-tooltip {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.note-detail-code-editor {
|
.note-detail-code-editor {
|
||||||
min-height: 200px;
|
min-height: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.note-detail-render {
|
.note-detail-render {
|
||||||
min-height: 200px;
|
min-height: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.CodeMirror {
|
.CodeMirror {
|
||||||
@ -367,7 +367,7 @@ div.ui-tooltip {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.CodeMirror-scroll {
|
.CodeMirror-scroll {
|
||||||
min-height: 200px;
|
min-height: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.CodeMirror-gutters {
|
.CodeMirror-gutters {
|
||||||
@ -390,37 +390,6 @@ div.ui-tooltip {
|
|||||||
font-size: larger;
|
font-size: larger;
|
||||||
}
|
}
|
||||||
|
|
||||||
.children-overview {
|
|
||||||
flex-grow: 1000;
|
|
||||||
flex-shrink: 1000;
|
|
||||||
flex-basis: 0;
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
align-content: flex-start;
|
|
||||||
height: 110px;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.child-overview-item {
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 10px;
|
|
||||||
background: var(--accented-background-color);
|
|
||||||
width: 150px;
|
|
||||||
height: 85px;
|
|
||||||
line-height: 2em;
|
|
||||||
margin-right: 20px;
|
|
||||||
border-radius: 15px;
|
|
||||||
overflow: hidden;
|
|
||||||
text-align: center;
|
|
||||||
margin-top: 15px;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
overflow-wrap: break-word;
|
|
||||||
}
|
|
||||||
|
|
||||||
.child-overview-item a {
|
|
||||||
color: var(--muted-text-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
#sql-console-query {
|
#sql-console-query {
|
||||||
height: 150px;
|
height: 150px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -17,7 +17,6 @@ const BUILTIN_ATTRIBUTES = [
|
|||||||
{ type: 'label', name: 'disableInclusion' },
|
{ type: 'label', name: 'disableInclusion' },
|
||||||
{ type: 'label', name: 'appCss' },
|
{ type: 'label', name: 'appCss' },
|
||||||
{ type: 'label', name: 'appTheme' },
|
{ type: 'label', name: 'appTheme' },
|
||||||
{ type: 'label', name: 'hideChildrenOverview' },
|
|
||||||
{ type: 'label', name: 'hidePromotedAttributes' },
|
{ type: 'label', name: 'hidePromotedAttributes' },
|
||||||
{ type: 'label', name: 'readOnly' },
|
{ type: 'label', name: 'readOnly' },
|
||||||
{ type: 'label', name: 'run', isDangerous: true },
|
{ type: 'label', name: 'run', isDangerous: true },
|
||||||
|
@ -35,8 +35,6 @@
|
|||||||
<% include details/protected_session_password.ejs %>
|
<% include details/protected_session_password.ejs %>
|
||||||
|
|
||||||
<% include details/book.ejs %>
|
<% include details/book.ejs %>
|
||||||
|
|
||||||
<div class="children-overview hide-toggle"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user