added "jump to note" to header

This commit is contained in:
azivner 2017-10-10 20:37:45 -04:00
parent af8b26cbd5
commit a363b43c2b
3 changed files with 27 additions and 19 deletions

View File

@ -6,27 +6,26 @@
</head> </head>
<body> <body>
<div id="container"> <div id="container">
<div id="header" class="hide-toggle" style="grid-area: header; background-color: #f1f1f1;"> <div id="header" class="hide-toggle">
<div style="display: flex; align-items: center;"> <div id="header-title">
<div id="header-title"> Trilium
Trilium </div>
</div>
<div style="flex-grow: 100;"> <div style="flex-grow: 100;">
<button class="btn btn-xs" onclick="showRecentChanges();">Recent changes</button> <button class="btn btn-xs" onclick="showRecentChanges();">Recent changes</button>
<button class="btn btn-xs" onclick="showRecentNotes();">Recent notes</button> <button class="btn btn-xs" onclick="showRecentNotes();">Recent notes</button>
</div> <button class="btn btn-xs" onclick="showJumpToNote();">Jump to note</button>
</div>
<div> <div>
<span id="top-message"></span> <span id="top-message"></span>
<span id="error-message"></span> <span id="error-message"></span>
<button class="btn btn-xs" onclick="displaySettings();">Settings</button> <button class="btn btn-xs" onclick="displaySettings();">Settings</button>
<form action="logout" method="POST" style="display: inline;"> <form action="logout" method="POST" style="display: inline;">
<input type="submit" class="btn btn-xs" value="Logout"> <input type="submit" class="btn btn-xs" value="Logout">
</form> </form>
</div>
</div> </div>
</div> </div>

View File

@ -1,4 +1,4 @@
$(document).bind('keydown', 'alt+j', () => { function showJumpToNote() {
$("#jump-to-note-autocomplete").val(''); $("#jump-to-note-autocomplete").val('');
$("#jump-to-note-dialog").dialog({ $("#jump-to-note-dialog").dialog({
@ -10,7 +10,9 @@ $(document).bind('keydown', 'alt+j', () => {
source: getAutocompleteItems(globalAllNoteIds), source: getAutocompleteItems(globalAllNoteIds),
minLength: 0 minLength: 0
}); });
}); }
$(document).bind('keydown', 'alt+j', showJumpToNote);
$("#jump-to-note-form").submit(() => { $("#jump-to-note-form").submit(() => {
const val = $("#jump-to-note-autocomplete").val(); const val = $("#jump-to-note-autocomplete").val();

View File

@ -15,6 +15,13 @@
grid-gap: 10px; grid-gap: 10px;
} }
#header {
grid-area: header;
background-color: #f1f1f1;
display: flex;
align-items: center;
}
.note-editable { .note-editable {
/* This is because with empty content height of editor is 0 and it's impossible to click into it */ /* This is because with empty content height of editor is 0 and it's impossible to click into it */
min-height: 400px; min-height: 400px;