mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 07:08:55 +02:00
feat(views/table): open in new tab/quick edit
This commit is contained in:
parent
458d66cb21
commit
6c157675d7
@ -3,6 +3,7 @@ import contextMenu from "../../../menus/context_menu.js";
|
|||||||
import { TableData } from "./rows.js";
|
import { TableData } from "./rows.js";
|
||||||
import branches from "../../../services/branches.js";
|
import branches from "../../../services/branches.js";
|
||||||
import { t } from "../../../services/i18n.js";
|
import { t } from "../../../services/i18n.js";
|
||||||
|
import link_context_menu from "../../../menus/link_context_menu.js";
|
||||||
|
|
||||||
export function setupContextMenu(tabulator: Tabulator) {
|
export function setupContextMenu(tabulator: Tabulator) {
|
||||||
tabulator.on("rowContext", showRowContextMenu);
|
tabulator.on("rowContext", showRowContextMenu);
|
||||||
@ -13,13 +14,17 @@ export function showRowContextMenu(_e: UIEvent, row: RowComponent) {
|
|||||||
const rowData = row.getData() as TableData;
|
const rowData = row.getData() as TableData;
|
||||||
contextMenu.show({
|
contextMenu.show({
|
||||||
items: [
|
items: [
|
||||||
|
...link_context_menu.getItems(),
|
||||||
|
{ title: "----" },
|
||||||
{
|
{
|
||||||
title: t("table_context_menu.delete_row"),
|
title: t("table_context_menu.delete_row"),
|
||||||
uiIcon: "bx bx-trash",
|
uiIcon: "bx bx-trash",
|
||||||
handler: () => branches.deleteNotes([ rowData.branchId ], false, false)
|
handler: () => branches.deleteNotes([ rowData.branchId ], false, false)
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
selectMenuItemHandler: () => {},
|
selectMenuItemHandler: ({ command }) => {
|
||||||
|
link_context_menu.handleLinkContextMenuItem(command, rowData.noteId);
|
||||||
|
},
|
||||||
x: e.pageX,
|
x: e.pageX,
|
||||||
y: e.pageY
|
y: e.pageY
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user