From b5143c152bd1a37596cdf88bf410b4acee8a94d7 Mon Sep 17 00:00:00 2001 From: zadam Date: Sun, 2 Jun 2019 15:35:57 +0200 Subject: [PATCH] link map empty dialog --- src/public/javascripts/desktop.js | 1 + src/public/javascripts/dialogs/link_map.js | 11 +++++++++++ src/public/javascripts/services/entrypoints.js | 5 +++++ src/views/desktop.ejs | 1 + src/views/dialogs/link_map.ejs | 15 +++++++++++++++ src/views/title.ejs | 1 + 6 files changed, 34 insertions(+) create mode 100644 src/public/javascripts/dialogs/link_map.js create mode 100644 src/views/dialogs/link_map.ejs diff --git a/src/public/javascripts/desktop.js b/src/public/javascripts/desktop.js index f0f32956c..b093467e6 100644 --- a/src/public/javascripts/desktop.js +++ b/src/public/javascripts/desktop.js @@ -10,6 +10,7 @@ import markdownImportDialog from './dialogs/markdown_import.js'; import exportDialog from './dialogs/export.js'; import importDialog from './dialogs/import.js'; import protectedSessionDialog from './dialogs/protected_session.js'; +import linkMapDialog from './dialogs/link_map.js'; import cloning from './services/cloning.js'; import contextMenu from './services/tree_context_menu.js'; diff --git a/src/public/javascripts/dialogs/link_map.js b/src/public/javascripts/dialogs/link_map.js new file mode 100644 index 000000000..0df8ab83e --- /dev/null +++ b/src/public/javascripts/dialogs/link_map.js @@ -0,0 +1,11 @@ +const $dialog = $("#link-map-dialog"); + +async function showDialog() { + glob.activeDialog = $dialog; + + $dialog.modal(); +} + +export default { + showDialog +}; \ No newline at end of file diff --git a/src/public/javascripts/services/entrypoints.js b/src/public/javascripts/services/entrypoints.js index 95d5c80e7..beea315d6 100644 --- a/src/public/javascripts/services/entrypoints.js +++ b/src/public/javascripts/services/entrypoints.js @@ -14,6 +14,7 @@ import attributesDialog from "../dialogs/attributes.js"; import helpDialog from "../dialogs/help.js"; import noteInfoDialog from "../dialogs/note_info.js"; import aboutDialog from "../dialogs/about.js"; +import linkMapDialog from "../dialogs/link_map.js"; import protectedSessionService from "./protected_session.js"; function registerEntrypoints() { @@ -58,6 +59,10 @@ function registerEntrypoints() { noteSourceDialog.showDialog(); }); + $noteTabContainer.on("click", ".show-link-map-button", function() { + linkMapDialog.showDialog(); + }); + $("#options-button").click(optionsDialog.showDialog); $("#show-help-button").click(helpDialog.showDialog); diff --git a/src/views/desktop.ejs b/src/views/desktop.ejs index ba9407270..fa172a5ac 100644 --- a/src/views/desktop.ejs +++ b/src/views/desktop.ejs @@ -172,6 +172,7 @@ <% include dialogs/confirm.ejs %> <% include dialogs/help.ejs %> <% include dialogs/note_info.ejs %> + <% include dialogs/link_map.ejs %>