mirror of
https://github.com/zadam/trilium.git
synced 2025-11-05 04:45:47 +01:00
renamed currentNote to activeNote to be consistent with frontend API
This commit is contained in:
@@ -27,7 +27,7 @@ function setLinkType(linkType) {
|
||||
async function showDialog() {
|
||||
glob.activeDialog = $dialog;
|
||||
|
||||
if (noteDetailService.getCurrentNoteType() === 'text') {
|
||||
if (noteDetailService.getActiveNoteType() === 'text') {
|
||||
$linkTypeHtml.prop('disabled', false);
|
||||
|
||||
setLinkType('html');
|
||||
@@ -99,14 +99,14 @@ $form.submit(() => {
|
||||
else if (linkType === 'selected-to-current') {
|
||||
const prefix = $clonePrefix.val();
|
||||
|
||||
cloningService.cloneNoteTo(noteId, noteDetailService.getCurrentNoteId(), prefix);
|
||||
cloningService.cloneNoteTo(noteId, noteDetailService.getActiveNoteId(), prefix);
|
||||
|
||||
$dialog.modal('hide');
|
||||
}
|
||||
else if (linkType === 'current-to-selected') {
|
||||
const prefix = $clonePrefix.val();
|
||||
|
||||
cloningService.cloneNoteTo(noteDetailService.getCurrentNoteId(), noteId, prefix);
|
||||
cloningService.cloneNoteTo(noteDetailService.getActiveNoteId(), noteId, prefix);
|
||||
|
||||
$dialog.modal('hide');
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ function AttributesModel() {
|
||||
}
|
||||
|
||||
this.loadAttributes = async function() {
|
||||
const noteId = noteDetailService.getCurrentNoteId();
|
||||
const noteId = noteDetailService.getActiveNoteId();
|
||||
|
||||
const attributes = await server.get('notes/' + noteId + '/attributes');
|
||||
|
||||
@@ -136,7 +136,7 @@ function AttributesModel() {
|
||||
|
||||
self.updateAttributePositions();
|
||||
|
||||
const noteId = noteDetailService.getCurrentNoteId();
|
||||
const noteId = noteDetailService.getActiveNoteId();
|
||||
|
||||
const attributesToSave = self.ownedAttributes()
|
||||
.map(attribute => attribute())
|
||||
|
||||
@@ -13,13 +13,13 @@ function showDialog() {
|
||||
|
||||
$dialog.modal();
|
||||
|
||||
const currentNote = noteDetailService.getCurrentNote();
|
||||
const activeNote = noteDetailService.getActiveNote();
|
||||
|
||||
$noteId.text(currentNote.noteId);
|
||||
$utcDateCreated.text(currentNote.utcDateCreated);
|
||||
$utcDateModified.text(currentNote.utcDateModified);
|
||||
$type.text(currentNote.type);
|
||||
$mime.text(currentNote.mime);
|
||||
$noteId.text(activeNote.noteId);
|
||||
$utcDateCreated.text(activeNote.utcDateCreated);
|
||||
$utcDateModified.text(activeNote.utcDateModified);
|
||||
$type.text(activeNote.type);
|
||||
$mime.text(activeNote.mime);
|
||||
}
|
||||
|
||||
$okButton.click(() => $dialog.modal('hide'));
|
||||
|
||||
@@ -11,7 +11,7 @@ let revisionItems = [];
|
||||
let note;
|
||||
|
||||
async function showCurrentNoteRevisions() {
|
||||
await showNoteRevisionsDialog(noteDetailService.getCurrentNoteId());
|
||||
await showNoteRevisionsDialog(noteDetailService.getActiveNoteId());
|
||||
}
|
||||
|
||||
async function showNoteRevisionsDialog(noteId, noteRevisionId) {
|
||||
@@ -22,7 +22,7 @@ async function showNoteRevisionsDialog(noteId, noteRevisionId) {
|
||||
$list.empty();
|
||||
$content.empty();
|
||||
|
||||
note = noteDetailService.getCurrentNote();
|
||||
note = noteDetailService.getActiveNote();
|
||||
revisionItems = await server.get('notes/' + noteId + '/revisions');
|
||||
|
||||
for (const item of revisionItems) {
|
||||
|
||||
@@ -8,7 +8,7 @@ function showDialog() {
|
||||
|
||||
$dialog.modal();
|
||||
|
||||
const noteText = noteDetailService.getCurrentNote().noteContent.content;
|
||||
const noteText = noteDetailService.getActiveNote().noteContent.content;
|
||||
|
||||
$noteSource.text(formatHtml(noteText));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user