middle click can now open links in new tab (and close tab)

This commit is contained in:
zadam
2019-05-15 21:50:27 +02:00
parent dd1fc23fe8
commit f22cc37df7
10 changed files with 1411 additions and 956 deletions

View File

@@ -46,7 +46,8 @@ function initNoteAutocomplete($el, options) {
.prop("title", "Show recent notes");
const $goToSelectedNoteButton = $("<a>")
.addClass("input-group-text go-to-selected-note-button jam jam-arrow-right");
.addClass("input-group-text go-to-selected-note-button jam jam-arrow-right")
.attr("data-action", "note");
const $sideButtons = $("<div>")
.addClass("input-group-append")
@@ -69,14 +70,6 @@ function initNoteAutocomplete($el, options) {
return false;
});
$goToSelectedNoteButton.click(() => {
if ($el.hasClass("disabled")) {
return;
}
treeService.activateNote($el.getSelectedPath());
});
$el.autocomplete({
appendTo: document.querySelector('body'),
hint: false,