added history button

This commit is contained in:
azivner 2017-10-09 11:28:56 -04:00
parent 5b3dafd395
commit 29f50f47b8
3 changed files with 13 additions and 4 deletions

View File

@ -6,7 +6,7 @@
</head>
<body>
<div id="container">
<div class="hide-toggle" style="grid-area: header; background-color: #f1f1f1;">
<div id="header" class="hide-toggle" style="grid-area: header; background-color: #f1f1f1;">
<div style="display: flex; align-items: center;">
<div id="header-title">
Trilium
@ -81,6 +81,8 @@
&nbsp;
<input autocomplete="off" value="" id="noteTitle" style="font-size: x-large; border: 0; flex-grow: 100;" tabindex="1">
<button class="btn btn-xs" onclick="showCurrentNoteHistory();">History</button>
</div>
</div>

View File

@ -1,5 +1,9 @@
let globalHistoryItems = null;
function showCurrentNoteHistory() {
showNoteHistoryDialog(globalCurrentNote.detail.note_id);
}
function showNoteHistoryDialog(noteId, noteHistoryId) {
$("#noteHistoryDialog").dialog({
modal: true,
@ -37,9 +41,7 @@ function showNoteHistoryDialog(noteId, noteHistoryId) {
});
}
$(document).bind('keydown', 'alt+h', function() {
showNoteHistoryDialog(globalCurrentNote.detail.note_id);
});
$(document).bind('keydown', 'alt+h', showCurrentNoteHistory);
$("#noteHistoryList").on('change', () => {
const optVal = $("#noteHistoryList").find(":selected").val();

View File

@ -90,4 +90,9 @@ span.fancytree-node.encrypted.fancytree-folder > span.fancytree-icon {
padding: 5px 50px 5px 10px;
font-size: large;
font-weight: bold;
}
#header .btn-xs {
margin-bottom: 2px;
margin-right: 8px;
}