From 3ad7db39dd0aa54db256e452234c4e7df0b379cd Mon Sep 17 00:00:00 2001 From: azivner Date: Tue, 28 Aug 2018 15:59:37 +0200 Subject: [PATCH] export branch => export subtree --- src/public/javascripts/services/context_menu.js | 16 ++++++++-------- src/public/javascripts/services/export.js | 4 ++-- src/views/index.ejs | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/public/javascripts/services/context_menu.js b/src/public/javascripts/services/context_menu.js index aaacca542..48a5ea37b 100644 --- a/src/public/javascripts/services/context_menu.js +++ b/src/public/javascripts/services/context_menu.js @@ -94,9 +94,9 @@ const contextMenuOptions = { {title: "Paste into Ctrl+V", 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); diff --git a/src/public/javascripts/services/export.js b/src/public/javascripts/services/export.js index 9f92a67c7..7111d1f5e 100644 --- a/src/public/javascripts/services/export.js +++ b/src/public/javascripts/services/export.js @@ -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 }; \ No newline at end of file diff --git a/src/views/index.ejs b/src/views/index.ejs index 4fef027e8..ddc51b5c5 100644 --- a/src/views/index.ejs +++ b/src/views/index.ejs @@ -563,7 +563,7 @@
-