Skip to content

Build your personal knowledge base with Trilium Notes

fix & unify "show recent notes" buttons

azivner936d8449f62b
diff --git a/src/public/javascripts/dialogs/add_link.js b/src/public/javascripts/dialogs/add_link.js
index 8872810a2a..90d793269a 100644
--- a/src/public/javascripts/dialogs/add_link.js
+++ b/src/public/javascripts/dialogs/add_link.js
@@ -15,7 +15,7 @@ const $prefixFormGroup = $("#add-link-prefix-form-group");
const $linkTypeDiv = $("#add-link-type-div");
const $linkTypes = $("input[name='add-link-type']");
const $linkTypeHtml = $linkTypes.filter('input[value="html"]');
-const $showRecentNotesButton = $("#add-link-show-recent-notes");
+const $showRecentNotesButton = $dialog.find(".show-recent-notes-button");
function setLinkType(linkType) {
$linkTypes.each(function () {
diff --git a/src/public/javascripts/dialogs/jump_to_note.js b/src/public/javascripts/dialogs/jump_to_note.js
index 0fd59e0a14..df211d42c2 100644
--- a/src/public/javascripts/dialogs/jump_to_note.js
+++ b/src/public/javascripts/dialogs/jump_to_note.js
@@ -5,7 +5,7 @@ import searchNotesService from '../services/search_notes.js';
const $dialog = $("#jump-to-note-dialog");
const $autoComplete = $("#jump-to-note-autocomplete");
const $showInFullTextButton = $("#show-in-full-text-button");
-const $showRecentNotesButton = $("#jump-to-note-show-recent-notes");
+const $showRecentNotesButton = $dialog.find(".show-recent-notes-button");
async function showDialog() {
glob.activeDialog = $dialog;
diff --git a/src/views/index.ejs b/src/views/index.ejs
index 121b82f3ce..2ba05e7120 100644
--- a/src/views/index.ejs
+++ b/src/views/index.ejs
@@ -286,6 +286,8 @@
<div class="input-group">
<input id="note-autocomplete" class="form-control" placeholder="search for note by its name" style="width: 100%;">
+
+ <span class="input-group-addon show-recent-notes-button" title="Show recent notes"></span>
</div>
</div>
@@ -309,7 +311,7 @@
<div class="input-group">
<input id="jump-to-note-autocomplete" class="form-control" placeholder="search for note by its name" style="width: 100%;">
- <span class="input-group-addon" id="jump-to-note-show-recent-notes" title="Show recent notes" style="background: url('/images/icons/clock-16.png') no-repeat center; cursor: pointer;"></span>
+ <span class="input-group-addon show-recent-notes-button" title="Show recent notes"></span>
</div>
</div>