mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-27 10:46:09 +01:00
This commit is contained in:
parent
eb92b9acf4
commit
3ec2ff243f
5 changed files with 49 additions and 25 deletions
|
|
@ -1,8 +1,8 @@
|
|||
import {Menu} from "../../../plugin/Menu";
|
||||
import {hasClosestByClassName} from "../../util/hasClosest";
|
||||
import {hasClosestByClassName, hasTopClosestByClassName} from "../../util/hasClosest";
|
||||
import {upDownHint} from "../../../util/upDownHint";
|
||||
import {fetchPost} from "../../../util/fetch";
|
||||
import {escapeHtml} from "../../../util/escape";
|
||||
import {escapeGreat, escapeHtml} from "../../../util/escape";
|
||||
import {transaction} from "../../wysiwyg/transaction";
|
||||
import {updateCellsValue} from "./cell";
|
||||
import {updateAttrViewCellAnimation} from "./action";
|
||||
|
|
@ -23,7 +23,7 @@ const genSearchList = (element: Element, keyword: string, avId: string, cb?: ()
|
|||
<div class="b3-list-item__first">
|
||||
<span class="b3-list-item__text">${escapeHtml(item.avName || window.siyuan.languages.title)}</span>
|
||||
</div>
|
||||
<div class="b3-list-item__meta b3-list-item__showall">${escapeHtml(item.hPath)}</div>
|
||||
<div class="b3-list-item__meta b3-list-item__showall">${escapeGreat(item.hPath)}</div>
|
||||
</div>
|
||||
<svg aria-label="${window.siyuan.languages.thisDatabase}" style="margin: 0 0 0 4px" class="b3-list-item__hinticon ariaLabel${item.avID === avId ? "" : " fn__none"}"><use xlink:href="#iconInfo"></use></svg>
|
||||
</div>`;
|
||||
|
|
@ -115,6 +115,8 @@ export const openSearchAV = (avId: string, target: HTMLElement, cb?: (element: H
|
|||
}
|
||||
});
|
||||
menu.element.querySelector(".b3-menu__items").setAttribute("style", "overflow: initial");
|
||||
const popoverElement = hasTopClosestByClassName(target, "block__popover", true);
|
||||
menu.element.setAttribute("data-from", popoverElement ? popoverElement.dataset.level + "popover" : "app");
|
||||
};
|
||||
|
||||
export const updateRelation = (options: {
|
||||
|
|
@ -251,7 +253,7 @@ export const bindRelationEvent = (options: {
|
|||
fetchPost("/api/av/getAttributeViewPrimaryKeyValues", {
|
||||
id: options.menuElement.firstElementChild.getAttribute("data-av-id"),
|
||||
}, response => {
|
||||
const cells=response.data.rows.values as IAVCellValue[];
|
||||
const cells = response.data.rows.values as IAVCellValue[];
|
||||
let html = "";
|
||||
let selectHTML = "";
|
||||
hasIds.forEach(hasId => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue