mirror of
https://github.com/zadam/trilium.git
synced 2025-11-04 20:36:13 +01:00
Merge branch 'stable'
# Conflicts: # package-lock.json # package.json
This commit is contained in:
@@ -62,14 +62,4 @@ $list.on('change', () => {
|
||||
else {
|
||||
$content.text("Preview isn't available for this note type.");
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', "a[data-action='note-revision']", event => {
|
||||
const linkEl = $(event.target);
|
||||
const noteId = linkEl.attr('data-note-path');
|
||||
const noteRevisionId = linkEl.attr('data-note-revision-id');
|
||||
|
||||
showNoteRevisionsDialog(noteId, noteRevisionId);
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
@@ -172,6 +172,19 @@ function registerEntrypoints() {
|
||||
utils.bindGlobalShortcut('ctrl+-', zoomService.decreaseZoomFactor);
|
||||
utils.bindGlobalShortcut('ctrl+=', zoomService.increaseZoomFactor);
|
||||
}
|
||||
|
||||
$(document).on('click', "a[data-action='note-revision']", async event => {
|
||||
const linkEl = $(event.target);
|
||||
const noteId = linkEl.attr('data-note-path');
|
||||
const noteRevisionId = linkEl.attr('data-note-revision-id');
|
||||
|
||||
const attributesDialog = await import("../dialogs/note_revisions.js");
|
||||
|
||||
attributesDialog.showNoteRevisionsDialog(noteId, noteRevisionId);
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
export default {
|
||||
|
||||
@@ -117,7 +117,7 @@ function addTextToEditor(text) {
|
||||
}
|
||||
}
|
||||
|
||||
function tabContextMenu(e) {
|
||||
function newTabContextMenu(e) {
|
||||
const $link = $(e.target);
|
||||
|
||||
const notePath = getNotePathFromLink($link);
|
||||
@@ -142,9 +142,9 @@ function tabContextMenu(e) {
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('contextmenu', '.note-detail-text a', tabContextMenu);
|
||||
$(document).on('contextmenu', "a[data-action='note']", tabContextMenu);
|
||||
$(document).on('contextmenu', ".note-detail-render a", tabContextMenu);
|
||||
$(document).on('contextmenu', '.note-detail-text a', newTabContextMenu);
|
||||
$(document).on('contextmenu', "a[data-action='note']", newTabContextMenu);
|
||||
$(document).on('contextmenu', ".note-detail-render a", newTabContextMenu);
|
||||
|
||||
// when click on link popup, in case of internal link, just go the the referenced note instead of default behavior
|
||||
// of opening the link in new window/tab
|
||||
|
||||
@@ -385,6 +385,8 @@ tabRow.addListener('tabRemove', async ({ detail }) => {
|
||||
});
|
||||
|
||||
$(tabRow.el).on('contextmenu', '.note-tab', e => {
|
||||
e.preventDefault();
|
||||
|
||||
const tab = $(e.target).closest(".note-tab");
|
||||
|
||||
contextMenuService.initContextMenu(e, {
|
||||
|
||||
@@ -122,7 +122,7 @@ class NoteDetailRelationMap {
|
||||
this.clipboard = null;
|
||||
|
||||
this.$createChildNote.click(async () => {
|
||||
const promptDialog = await import('"../dialogs/prompt.js"');
|
||||
const promptDialog = await import('../dialogs/prompt.js');
|
||||
const title = await promptDialog.ask({ message: "Enter title of new note", defaultValue: "new note" });
|
||||
|
||||
if (!title.trim()) {
|
||||
|
||||
@@ -20,7 +20,7 @@ class NoteRevisionsWidget extends StandardWidget {
|
||||
const $showFullButton = $("<a>").append("show dialog").addClass('widget-header-action');
|
||||
$showFullButton.click(async () => {
|
||||
const attributesDialog = await import("../dialogs/note_revisions.js");
|
||||
attributesDialog.showDialog();
|
||||
attributesDialog.showCurrentNoteRevisions(this.ctx.note.noteId);
|
||||
});
|
||||
|
||||
return [$showFullButton];
|
||||
|
||||
@@ -1 +1 @@
|
||||
module.exports = { buildDate:"2019-09-30T22:18:23+02:00", buildRevision: "f6fc24d11d9c9a15086c0726dde30f6c382c578f" };
|
||||
module.exports = { buildDate:"2019-10-09T23:09:38+02:00", buildRevision: "6c3809e1db71ebca7bf0ca69f664c3c3f1af793a" };
|
||||
|
||||
Reference in New Issue
Block a user