mirror of
https://github.com/zadam/trilium.git
synced 2025-11-17 02:30:42 +01:00
reloading notes after script changes
This commit is contained in:
@@ -33,7 +33,7 @@ export async function showDialog(linkType) {
|
||||
|
||||
glob.activeDialog = $dialog;
|
||||
|
||||
if (noteDetailService.getActiveNoteType() === 'text') {
|
||||
if (noteDetailService.getActiveTabNoteType() === 'text') {
|
||||
$linkTypeHtml.prop('disabled', false);
|
||||
|
||||
setLinkType('html');
|
||||
@@ -110,14 +110,14 @@ $form.submit(() => {
|
||||
else if (linkType === 'selected-to-active') {
|
||||
const prefix = $clonePrefix.val();
|
||||
|
||||
cloningService.cloneNoteTo(noteId, noteDetailService.getActiveNoteId(), prefix);
|
||||
cloningService.cloneNoteTo(noteId, noteDetailService.getActiveTabNoteId(), prefix);
|
||||
|
||||
$dialog.modal('hide');
|
||||
}
|
||||
else if (linkType === 'active-to-selected') {
|
||||
const prefix = $clonePrefix.val();
|
||||
|
||||
cloningService.cloneNoteTo(noteDetailService.getActiveNoteId(), noteId, prefix);
|
||||
cloningService.cloneNoteTo(noteDetailService.getActiveTabNoteId(), noteId, prefix);
|
||||
|
||||
$dialog.modal('hide');
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ function AttributesModel() {
|
||||
}
|
||||
|
||||
this.loadAttributes = async function() {
|
||||
const noteId = noteDetailService.getActiveNoteId();
|
||||
const noteId = noteDetailService.getActiveTabNoteId();
|
||||
|
||||
const attributes = await server.get('notes/' + noteId + '/attributes');
|
||||
|
||||
@@ -138,7 +138,7 @@ function AttributesModel() {
|
||||
|
||||
self.updateAttributePositions();
|
||||
|
||||
const noteId = noteDetailService.getActiveNoteId();
|
||||
const noteId = noteDetailService.getActiveTabNoteId();
|
||||
|
||||
const attributesToSave = self.ownedAttributes()
|
||||
.map(attribute => attribute())
|
||||
|
||||
@@ -23,7 +23,7 @@ export async function showDialog() {
|
||||
// set default settings
|
||||
$maxNotesInput.val(20);
|
||||
|
||||
const note = noteDetailService.getActiveNote();
|
||||
const note = noteDetailService.getActiveTabNote();
|
||||
|
||||
if (!note) {
|
||||
return;
|
||||
|
||||
@@ -16,7 +16,7 @@ export function showDialog() {
|
||||
|
||||
$dialog.modal();
|
||||
|
||||
const activeNote = noteDetailService.getActiveNote();
|
||||
const activeNote = noteDetailService.getActiveTabNote();
|
||||
|
||||
$noteId.text(activeNote.noteId);
|
||||
$dateCreated.text(activeNote.dateCreated);
|
||||
|
||||
@@ -11,7 +11,7 @@ let revisionItems = [];
|
||||
let note;
|
||||
|
||||
export async function showCurrentNoteRevisions() {
|
||||
await showNoteRevisionsDialog(noteDetailService.getActiveNoteId());
|
||||
await showNoteRevisionsDialog(noteDetailService.getActiveTabNoteId());
|
||||
}
|
||||
|
||||
export async function showNoteRevisionsDialog(noteId, noteRevisionId) {
|
||||
@@ -24,7 +24,7 @@ export async function showNoteRevisionsDialog(noteId, noteRevisionId) {
|
||||
$list.empty();
|
||||
$content.empty();
|
||||
|
||||
note = noteDetailService.getActiveNote();
|
||||
note = noteDetailService.getActiveTabNote();
|
||||
revisionItems = await server.get('notes/' + noteId + '/revisions');
|
||||
|
||||
for (const item of revisionItems) {
|
||||
|
||||
@@ -11,7 +11,7 @@ export function showDialog() {
|
||||
|
||||
$dialog.modal();
|
||||
|
||||
const noteText = noteDetailService.getActiveNote().content;
|
||||
const noteText = noteDetailService.getActiveTabNote().content;
|
||||
|
||||
$noteSource.text(formatHtml(noteText));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user