mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	link map empty dialog
This commit is contained in:
		| @@ -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'; | ||||||
|   | |||||||
							
								
								
									
										11
									
								
								src/public/javascripts/dialogs/link_map.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								src/public/javascripts/dialogs/link_map.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | |||||||
|  | const $dialog = $("#link-map-dialog"); | ||||||
|  |  | ||||||
|  | async function showDialog() { | ||||||
|  |     glob.activeDialog = $dialog; | ||||||
|  |  | ||||||
|  |     $dialog.modal(); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | export default { | ||||||
|  |     showDialog | ||||||
|  | }; | ||||||
| @@ -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); | ||||||
|   | |||||||
| @@ -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"> | ||||||
|   | |||||||
							
								
								
									
										15
									
								
								src/views/dialogs/link_map.ejs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/views/dialogs/link_map.ejs
									
									
									
									
									
										Normal 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">×</span> | ||||||
|  |                 </button> | ||||||
|  |             </div> | ||||||
|  |             <div class="modal-body"> | ||||||
|  |             </div> | ||||||
|  |         </div> | ||||||
|  |     </div> | ||||||
|  | </div> | ||||||
| @@ -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> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user