Merge branch 'stable'

# Conflicts:
#	package-lock.json
#	package.json
This commit is contained in:
zadam
2019-10-10 21:26:57 +02:00
9 changed files with 97 additions and 197 deletions

View File

@@ -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;
});
});

View File

@@ -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 {

View File

@@ -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

View File

@@ -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, {

View File

@@ -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()) {

View File

@@ -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];

View File

@@ -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" };