mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
This commit is contained in:
parent
b78616382b
commit
f5468fead9
4 changed files with 12 additions and 2 deletions
|
@ -19,6 +19,11 @@ export const insertGalleryItemAnimation = (options: {
|
||||||
if (hasSort) {
|
if (hasSort) {
|
||||||
sideItemElement = options.blockElement.querySelector(groupQuery + ".av__gallery-add").previousElementSibling;
|
sideItemElement = options.blockElement.querySelector(groupQuery + ".av__gallery-add").previousElementSibling;
|
||||||
}
|
}
|
||||||
|
const bodyElement = options.blockElement.querySelector(`.av__body[data-group-id="${options.groupID}"] `);
|
||||||
|
if (bodyElement && ["updated", "created"].includes(bodyElement.getAttribute("data-dtype")) &&
|
||||||
|
bodyElement.getAttribute("data-content") !== "_@today@_") {
|
||||||
|
sideItemElement = options.blockElement.querySelector('.av__body[data-content="_@today@_"] .av__gallery-add').previousElementSibling;
|
||||||
|
}
|
||||||
let cellsHTML = "";
|
let cellsHTML = "";
|
||||||
sideItemElement?.querySelectorAll(".av__cell").forEach((item: HTMLElement) => {
|
sideItemElement?.querySelectorAll(".av__cell").forEach((item: HTMLElement) => {
|
||||||
let lineNumber = 1;
|
let lineNumber = 1;
|
||||||
|
|
|
@ -132,7 +132,7 @@ const renderGroupGallery = (options: ITableOptions) => {
|
||||||
options.data.view.groups.forEach((group: IAVGallery) => {
|
options.data.view.groups.forEach((group: IAVGallery) => {
|
||||||
if (group.groupHidden === 0) {
|
if (group.groupHidden === 0) {
|
||||||
avBodyHTML += `${getGroupTitleHTML(group, group.cards.length)}
|
avBodyHTML += `${getGroupTitleHTML(group, group.cards.length)}
|
||||||
<div data-group-id="${group.id}" data-page-size="${group.pageSize}" class="av__body${group.groupFolded ? " fn__none" : ""}">${getGalleryHTML(group, options.resetData.selectItemIds, options.resetData.editIds, group.id)}</div>`;
|
<div data-group-id="${group.id}" data-page-size="${group.pageSize}" data-dtype="${group.groupKey.type}" data-content="${group.groupValue.text.content}" class="av__body${group.groupFolded ? " fn__none" : ""}">${getGalleryHTML(group, options.resetData.selectItemIds, options.resetData.editIds, group.id)}</div>`;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (options.renderAll) {
|
if (options.renderAll) {
|
||||||
|
|
|
@ -261,7 +261,7 @@ const renderGroupTable = (options: ITableOptions) => {
|
||||||
options.data.view.groups.forEach((group: IAVTable) => {
|
options.data.view.groups.forEach((group: IAVTable) => {
|
||||||
if (group.groupHidden === 0) {
|
if (group.groupHidden === 0) {
|
||||||
avBodyHTML += `${getGroupTitleHTML(group, group.rows.length)}
|
avBodyHTML += `${getGroupTitleHTML(group, group.rows.length)}
|
||||||
<div data-group-id="${group.id}" data-page-size="${group.pageSize}" style="float: left" class="av__body${group.groupFolded ? " fn__none" : ""}">${getTableHTMLs(group, options.blockElement)}</div>`;
|
<div data-group-id="${group.id}" data-page-size="${group.pageSize}" data-dtype="${group.groupKey.type}" data-content="${group.groupValue.text.content}" style="float: left" class="av__body${group.groupFolded ? " fn__none" : ""}">${getTableHTMLs(group, options.blockElement)}</div>`;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (options.renderAll) {
|
if (options.renderAll) {
|
||||||
|
|
|
@ -128,6 +128,11 @@ export const insertAttrViewBlockAnimation = (options: {
|
||||||
if (hasSort) {
|
if (hasSort) {
|
||||||
previousElement = options.blockElement.querySelector(groupQuery + ".av__row--util").previousElementSibling;
|
previousElement = options.blockElement.querySelector(groupQuery + ".av__row--util").previousElementSibling;
|
||||||
}
|
}
|
||||||
|
const bodyElement = options.blockElement.querySelector(`.av__body[data-group-id="${options.groupID}"] `);
|
||||||
|
if (bodyElement && ["updated", "created"].includes(bodyElement.getAttribute("data-dtype")) &&
|
||||||
|
bodyElement.getAttribute("data-content") !== "_@today@_") {
|
||||||
|
previousElement = options.blockElement.querySelector('.av__body[data-content="_@today@_"] .av__row--util').previousElementSibling;
|
||||||
|
}
|
||||||
|
|
||||||
let cellsHTML = '<div class="av__colsticky"><div class="av__firstcol"><svg><use xlink:href="#iconUncheck"></use></svg></div></div>';
|
let cellsHTML = '<div class="av__colsticky"><div class="av__firstcol"><svg><use xlink:href="#iconUncheck"></use></svg></div></div>';
|
||||||
const pinIndex = previousElement.querySelectorAll(".av__colsticky .av__cell").length - 1;
|
const pinIndex = previousElement.querySelectorAll(".av__colsticky .av__cell").length - 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue