mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
added hidePromotedAttributes label, fixes #221
This commit is contained in:
parent
83c6f86d26
commit
abbade96af
@ -26,7 +26,8 @@ async function getAttributes() {
|
|||||||
|
|
||||||
async function showAttributes() {
|
async function showAttributes() {
|
||||||
$promotedAttributesContainer.empty();
|
$promotedAttributesContainer.empty();
|
||||||
$attributeList.hide().empty();
|
$attributeList.hide();
|
||||||
|
$attributeListInner.empty();
|
||||||
|
|
||||||
const note = noteDetailService.getCurrentNote();
|
const note = noteDetailService.getCurrentNote();
|
||||||
|
|
||||||
@ -37,7 +38,9 @@ async function showAttributes() {
|
|||||||
&& !attr.name.startsWith("child:")
|
&& !attr.name.startsWith("child:")
|
||||||
&& attr.value.isPromoted);
|
&& attr.value.isPromoted);
|
||||||
|
|
||||||
if (promoted.length > 0) {
|
const hidePromotedAttributes = attributes.some(attr => attr.type === 'label' && attr.name === 'hidePromotedAttributes');
|
||||||
|
|
||||||
|
if (promoted.length > 0 && !hidePromotedAttributes) {
|
||||||
const $tbody = $("<tbody>");
|
const $tbody = $("<tbody>");
|
||||||
|
|
||||||
for (const definitionAttr of promoted) {
|
for (const definitionAttr of promoted) {
|
||||||
|
@ -528,9 +528,7 @@ $centerButton.click(() => {
|
|||||||
let averageX = totalX / mapData.notes.length;
|
let averageX = totalX / mapData.notes.length;
|
||||||
let averageY = totalY / mapData.notes.length;
|
let averageY = totalY / mapData.notes.length;
|
||||||
|
|
||||||
console.log(averageX, averageY);
|
pzInstance.moveTo(averageX, averageY);
|
||||||
|
|
||||||
//pzInstance.moveTo(averageX, averageY);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$component.on("drop", dropNoteOntoRelationMapHandler);
|
$component.on("drop", dropNoteOntoRelationMapHandler);
|
||||||
|
@ -16,6 +16,7 @@ const BUILTIN_ATTRIBUTES = [
|
|||||||
{ type: 'label', name: 'disableInclusion' },
|
{ type: 'label', name: 'disableInclusion' },
|
||||||
{ type: 'label', name: 'appCss' },
|
{ type: 'label', name: 'appCss' },
|
||||||
{ type: 'label', name: 'hideChildrenOverview' },
|
{ type: 'label', name: 'hideChildrenOverview' },
|
||||||
|
{ type: 'label', name: 'hidePromotedAttributes' },
|
||||||
|
|
||||||
// relation names
|
// relation names
|
||||||
{ type: 'relation', name: 'runOnNoteView' },
|
{ type: 'relation', name: 'runOnNoteView' },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user