mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-04 03:50:16 +08:00
This commit is contained in:
parent
b1617a3d0a
commit
504d3f6155
@ -341,7 +341,7 @@ export const bindEditEvent = (options: {
|
|||||||
})
|
})
|
||||||
if (oldValue.avID) {
|
if (oldValue.avID) {
|
||||||
fetchPost("/api/av/getAttributeView", {id: oldValue.avID}, (response) => {
|
fetchPost("/api/av/getAttributeView", {id: oldValue.avID}, (response) => {
|
||||||
goSearchElement.querySelector(".b3-menu__accelerator").textContent = response.data.av.name || window.siyuan.languages.title;
|
goSearchElement.querySelector(".b3-menu__accelerator").textContent = oldValue.avID === avID ? window.siyuan.languages.thisDatabase : (response.data.av.name || window.siyuan.languages.title)
|
||||||
response.data.av.keyValues.find((item: { key: { id: string, name: string } }) => {
|
response.data.av.keyValues.find((item: { key: { id: string, name: string } }) => {
|
||||||
if (item.key.id === oldValue.backKeyID) {
|
if (item.key.id === oldValue.backKeyID) {
|
||||||
inputElement.setAttribute("data-old-value", item.key.name || window.siyuan.languages.title);
|
inputElement.setAttribute("data-old-value", item.key.name || window.siyuan.languages.title);
|
||||||
|
@ -123,7 +123,7 @@ export const toggleUpdateRelationBtn = (menuItemsElement: HTMLElement, avId: str
|
|||||||
const btnElement = inputItemElement.nextElementSibling;
|
const btnElement = inputItemElement.nextElementSibling;
|
||||||
const oldValue = JSON.parse(searchElement.dataset.oldValue);
|
const oldValue = JSON.parse(searchElement.dataset.oldValue);
|
||||||
if (oldValue.avID) {
|
if (oldValue.avID) {
|
||||||
if (searchElement.dataset.avId !== avId) {
|
if (searchElement.dataset.avId !== avId || (searchElement.dataset.avId === avId && oldValue.avID !== avId)) {
|
||||||
switchItemElement.classList.remove("fn__none");
|
switchItemElement.classList.remove("fn__none");
|
||||||
if (switchElement.checked) {
|
if (switchElement.checked) {
|
||||||
inputItemElement.classList.remove("fn__none");
|
inputItemElement.classList.remove("fn__none");
|
||||||
|
Loading…
Reference in New Issue
Block a user