mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-11-04 07:01:31 +08:00 
			
		
		
		
	added history button
This commit is contained in:
		
							parent
							
								
									5b3dafd395
								
							
						
					
					
						commit
						29f50f47b8
					
				@ -6,7 +6,7 @@
 | 
				
			|||||||
  </head>
 | 
					  </head>
 | 
				
			||||||
  <body>
 | 
					  <body>
 | 
				
			||||||
    <div id="container">
 | 
					    <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 style="display: flex; align-items: center;">
 | 
				
			||||||
          <div id="header-title">
 | 
					          <div id="header-title">
 | 
				
			||||||
            Trilium
 | 
					            Trilium
 | 
				
			||||||
@ -81,6 +81,8 @@
 | 
				
			|||||||
           
 | 
					           
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          <input autocomplete="off" value="" id="noteTitle" style="font-size: x-large; border: 0; flex-grow: 100;" tabindex="1">
 | 
					          <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>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,9 @@
 | 
				
			|||||||
let globalHistoryItems = null;
 | 
					let globalHistoryItems = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function showCurrentNoteHistory() {
 | 
				
			||||||
 | 
					    showNoteHistoryDialog(globalCurrentNote.detail.note_id);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function showNoteHistoryDialog(noteId, noteHistoryId) {
 | 
					function showNoteHistoryDialog(noteId, noteHistoryId) {
 | 
				
			||||||
    $("#noteHistoryDialog").dialog({
 | 
					    $("#noteHistoryDialog").dialog({
 | 
				
			||||||
        modal: true,
 | 
					        modal: true,
 | 
				
			||||||
@ -37,9 +41,7 @@ function showNoteHistoryDialog(noteId, noteHistoryId) {
 | 
				
			|||||||
    });
 | 
					    });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(document).bind('keydown', 'alt+h', function() {
 | 
					$(document).bind('keydown', 'alt+h', showCurrentNoteHistory);
 | 
				
			||||||
    showNoteHistoryDialog(globalCurrentNote.detail.note_id);
 | 
					 | 
				
			||||||
});
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
$("#noteHistoryList").on('change', () => {
 | 
					$("#noteHistoryList").on('change', () => {
 | 
				
			||||||
    const optVal = $("#noteHistoryList").find(":selected").val();
 | 
					    const optVal = $("#noteHistoryList").find(":selected").val();
 | 
				
			||||||
 | 
				
			|||||||
@ -91,3 +91,8 @@ span.fancytree-node.encrypted.fancytree-folder > span.fancytree-icon {
 | 
				
			|||||||
    font-size: large;
 | 
					    font-size: large;
 | 
				
			||||||
    font-weight: bold;
 | 
					    font-weight: bold;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#header .btn-xs {
 | 
				
			||||||
 | 
					    margin-bottom: 2px;
 | 
				
			||||||
 | 
					    margin-right: 8px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user