link map empty dialog

This commit is contained in:
zadam 2019-06-02 15:35:57 +02:00
parent 6ef8a4c018
commit b5143c152b
6 changed files with 34 additions and 0 deletions

View file

@ -10,6 +10,7 @@ import markdownImportDialog from './dialogs/markdown_import.js';
import exportDialog from './dialogs/export.js'; import exportDialog from './dialogs/export.js';
import importDialog from './dialogs/import.js'; import importDialog from './dialogs/import.js';
import protectedSessionDialog from './dialogs/protected_session.js'; import protectedSessionDialog from './dialogs/protected_session.js';
import linkMapDialog from './dialogs/link_map.js';
import cloning from './services/cloning.js'; import cloning from './services/cloning.js';
import contextMenu from './services/tree_context_menu.js'; import contextMenu from './services/tree_context_menu.js';

View file

@ -0,0 +1,11 @@
const $dialog = $("#link-map-dialog");
async function showDialog() {
glob.activeDialog = $dialog;
$dialog.modal();
}
export default {
showDialog
};

View file

@ -14,6 +14,7 @@ import attributesDialog from "../dialogs/attributes.js";
import helpDialog from "../dialogs/help.js"; import helpDialog from "../dialogs/help.js";
import noteInfoDialog from "../dialogs/note_info.js"; import noteInfoDialog from "../dialogs/note_info.js";
import aboutDialog from "../dialogs/about.js"; import aboutDialog from "../dialogs/about.js";
import linkMapDialog from "../dialogs/link_map.js";
import protectedSessionService from "./protected_session.js"; import protectedSessionService from "./protected_session.js";
function registerEntrypoints() { function registerEntrypoints() {
@ -58,6 +59,10 @@ function registerEntrypoints() {
noteSourceDialog.showDialog(); noteSourceDialog.showDialog();
}); });
$noteTabContainer.on("click", ".show-link-map-button", function() {
linkMapDialog.showDialog();
});
$("#options-button").click(optionsDialog.showDialog); $("#options-button").click(optionsDialog.showDialog);
$("#show-help-button").click(helpDialog.showDialog); $("#show-help-button").click(helpDialog.showDialog);

View file

@ -172,6 +172,7 @@
<% include dialogs/confirm.ejs %> <% include dialogs/confirm.ejs %>
<% include dialogs/help.ejs %> <% include dialogs/help.ejs %>
<% include dialogs/note_info.ejs %> <% include dialogs/note_info.ejs %>
<% include dialogs/link_map.ejs %>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">

View file

@ -0,0 +1,15 @@
<div id="link-map-dialog" class="modal fade mx-auto" tabindex="-1" role="dialog">
<div class="modal-dialog modal-xl" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title mr-auto">Link map</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-left: 0;">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
</div>
</div>
</div>
</div>

View file

@ -65,6 +65,7 @@
<div class="dropdown-menu dropdown-menu-right"> <div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item show-note-revisions-button" data-bind="css: { disabled: type() == 'file' || type() == 'image' }">Revisions</a> <a class="dropdown-item show-note-revisions-button" data-bind="css: { disabled: type() == 'file' || type() == 'image' }">Revisions</a>
<a class="dropdown-item show-attributes-button"><kbd>Alt+A</kbd> Attributes</a> <a class="dropdown-item show-attributes-button"><kbd>Alt+A</kbd> Attributes</a>
<a class="dropdown-item show-link-map-button">Link map</a>
<a class="dropdown-item show-source-button" data-bind="css: { disabled: type() != 'text' && type() != 'code' && type() != 'relation-map' && type() != 'search' }">Note source</a> <a class="dropdown-item show-source-button" data-bind="css: { disabled: type() != 'text' && type() != 'code' && type() != 'relation-map' && type() != 'search' }">Note source</a>
<a class="dropdown-item import-files-button">Import files</a> <a class="dropdown-item import-files-button">Import files</a>
<a class="dropdown-item export-note-button" data-bind="css: { disabled: type() != 'text' }">Export note</a> <a class="dropdown-item export-note-button" data-bind="css: { disabled: type() != 'text' }">Export note</a>