mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-18 10:01:23 +01:00
Merge pull request #18 from n8k99/claude/fix-nested-folder-display-015Ytt8mSX9sfytMQC85P4gA
fix(obsidian): remove async from button handler for jQuery UI compati…
This commit is contained in:
commit
0ece7ed9df
1 changed files with 12 additions and 11 deletions
|
|
@ -48,19 +48,20 @@ function showSearchMethodDialog(elementId, elementType, coordinates) {
|
||||||
closeDialogs("#obsidianNoteLoading");
|
closeDialogs("#obsidianNoteLoading");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
"Browse": async function () {
|
"Browse": function () {
|
||||||
$(this).dialog("close");
|
$(this).dialog("close");
|
||||||
try {
|
promptCreateNewNote(elementId, elementType, coordinates)
|
||||||
const noteData = await promptCreateNewNote(elementId, elementType, coordinates);
|
.then(noteData => {
|
||||||
showMarkdownEditor(noteData, elementType, elementId, coordinates);
|
showMarkdownEditor(noteData, elementType, elementId, coordinates);
|
||||||
} catch (error) {
|
})
|
||||||
|
.catch(error => {
|
||||||
if (error.message !== "Cancelled") {
|
if (error.message !== "Cancelled") {
|
||||||
ERROR && console.error("Failed to load note:", error);
|
ERROR && console.error("Failed to load note:", error);
|
||||||
tip("Failed to load Obsidian note: " + error.message, true, "error", 5000);
|
tip("Failed to load Obsidian note: " + error.message, true, "error", 5000);
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
},
|
},
|
||||||
Cancel: function () {
|
"Cancel": function () {
|
||||||
$(this).dialog("close");
|
$(this).dialog("close");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue