mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-01-31 01:28:31 -06:00
Merge branch 'master' into dev31
This commit is contained in:
@@ -137,6 +137,10 @@ function linkTypeChanged() {
|
||||
|
||||
$linkTypes.change(linkTypeChanged);
|
||||
|
||||
// return back focus to note text detail after quitting add link
|
||||
// the problem is that cursor position is reset
|
||||
$dialog.on("hidden.bs.modal", () => noteDetailText.focus());
|
||||
|
||||
export default {
|
||||
showDialog
|
||||
};
|
||||
@@ -9,6 +9,8 @@ async function getAndExecuteBundle(noteId, originEntity = null) {
|
||||
}
|
||||
|
||||
async function executeBundle(bundle, originEntity) {
|
||||
console.log(bundle);
|
||||
|
||||
const apiContext = await ScriptContext(bundle.noteId, bundle.allNoteIds, originEntity);
|
||||
|
||||
try {
|
||||
@@ -17,7 +19,7 @@ async function executeBundle(bundle, originEntity) {
|
||||
}.call(apiContext));
|
||||
}
|
||||
catch (e) {
|
||||
infoService.showAndLogError(`Execution of script "${bundle.note.title}" (${bundle.note.noteId}) failed with error: ${e.message}`);
|
||||
infoService.showAndLogError(`Execution of ${bundle.noteId} failed with error: ${e.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +117,10 @@ async function saveNote() {
|
||||
}
|
||||
|
||||
note.title = $noteTitle.val();
|
||||
note.noteContent.content = getCurrentNoteContent(note);
|
||||
|
||||
if (note.noteContent != null) { // might be null for file/image
|
||||
note.noteContent.content = getCurrentNoteContent(note);
|
||||
}
|
||||
|
||||
// it's important to set the flag back to false immediatelly after retrieving title and content
|
||||
// otherwise we might overwrite another change (especially async code)
|
||||
|
||||
Reference in New Issue
Block a user