mirror of
https://github.com/zadam/trilium.git
synced 2025-01-02 21:32:51 +08:00
export branch => export subtree
This commit is contained in:
parent
bc207d5e30
commit
3ad7db39dd
3 changed files with 11 additions and 11 deletions
|
@ -94,9 +94,9 @@ const contextMenuOptions = {
|
|||
{title: "Paste into <kbd>Ctrl+V</kbd>", cmd: "pasteInto", uiIcon: "ui-icon-clipboard"},
|
||||
{title: "Paste after", cmd: "pasteAfter", uiIcon: "ui-icon-clipboard"},
|
||||
{title: "----"},
|
||||
{title: "Export branch", cmd: "exportBranch", uiIcon: " ui-icon-arrowthick-1-ne", children: [
|
||||
{title: "Native Tar", cmd: "exportBranchToTar"},
|
||||
{title: "OPML", cmd: "exportBranchToOpml"}
|
||||
{title: "Export subtree", cmd: "exportSubTree", uiIcon: " ui-icon-arrowthick-1-ne", children: [
|
||||
{title: "Native Tar", cmd: "exportSubTreeToTar"},
|
||||
{title: "OPML", cmd: "exportSubTreeToOpml"}
|
||||
]},
|
||||
{title: "Import into branch (tar, opml)", cmd: "importBranch", uiIcon: "ui-icon-arrowthick-1-sw"},
|
||||
{title: "----"},
|
||||
|
@ -120,7 +120,7 @@ const contextMenuOptions = {
|
|||
$tree.contextmenu("enableEntry", "pasteAfter", clipboardIds.length > 0 && isNotRoot && parentNote.type !== 'search');
|
||||
$tree.contextmenu("enableEntry", "pasteInto", clipboardIds.length > 0 && note.type !== 'search');
|
||||
$tree.contextmenu("enableEntry", "importBranch", note.type !== 'search');
|
||||
$tree.contextmenu("enableEntry", "exportBranch", note.type !== 'search');
|
||||
$tree.contextmenu("enableEntry", "exportSubTree", note.type !== 'search');
|
||||
$tree.contextmenu("enableEntry", "editBranchPrefix", isNotRoot && parentNote.type !== 'search');
|
||||
|
||||
// Activate node on right-click
|
||||
|
@ -166,11 +166,11 @@ const contextMenuOptions = {
|
|||
else if (ui.cmd === "delete") {
|
||||
treeChangesService.deleteNodes(treeService.getSelectedNodes(true));
|
||||
}
|
||||
else if (ui.cmd === "exportBranchToTar") {
|
||||
exportService.exportBranch(node.data.noteId, 'tar');
|
||||
else if (ui.cmd === "exportSubTreeToTar") {
|
||||
exportService.exportSubTree(node.data.noteId, 'tar');
|
||||
}
|
||||
else if (ui.cmd === "exportBranchToOpml") {
|
||||
exportService.exportBranch(node.data.noteId, 'opml');
|
||||
else if (ui.cmd === "exportSubTreeToOpml") {
|
||||
exportService.exportSubTree(node.data.noteId, 'opml');
|
||||
}
|
||||
else if (ui.cmd === "importBranch") {
|
||||
exportService.importBranch(node.data.noteId);
|
||||
|
|
|
@ -3,7 +3,7 @@ import protectedSessionHolder from './protected_session_holder.js';
|
|||
import utils from './utils.js';
|
||||
import server from './server.js';
|
||||
|
||||
function exportBranch(noteId, format) {
|
||||
function exportSubTree(noteId, format) {
|
||||
const url = utils.getHost() + "/api/notes/" + noteId + "/export/" + format +
|
||||
"?protectedSessionId=" + encodeURIComponent(protectedSessionHolder.getProtectedSessionId());
|
||||
|
||||
|
@ -35,6 +35,6 @@ $("#import-upload").change(async function() {
|
|||
});
|
||||
|
||||
export default {
|
||||
exportBranch,
|
||||
exportSubTree,
|
||||
importBranch
|
||||
};
|
|
@ -563,7 +563,7 @@
|
|||
<div style="display: flex; justify-content: space-between;">
|
||||
<button class="btn btn-sm">Save</button>
|
||||
|
||||
<button class="btn btn-sm" type="button" data-help-page="Prefix">
|
||||
<button class="btn btn-sm" type="button" data-help-page="Tree-concepts#prefix">
|
||||
<i class="glyphicon glyphicon-info-sign"></i> Help
|
||||
</button>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue