mirror of
https://github.com/zadam/trilium.git
synced 2025-11-11 15:55:52 +01:00
small fixes
This commit is contained in:
@@ -32,7 +32,7 @@ async function showDialog() {
|
||||
glob.activeDialog = $dialog;
|
||||
|
||||
// set default settings
|
||||
$maxNotesInput.val(20);
|
||||
$maxNotesInput.val(10);
|
||||
LINK_TYPES.forEach(lt => $("#link-map-" + lt).prop('checked', true));
|
||||
|
||||
await libraryLoader.requireLibrary(libraryLoader.LINK_MAP);
|
||||
|
||||
@@ -508,6 +508,14 @@ async function saveOpenTabs() {
|
||||
});
|
||||
}
|
||||
|
||||
function noteChanged() {
|
||||
const activeTabContext = getActiveTabContext();
|
||||
|
||||
if (activeTabContext) {
|
||||
activeTabContext.noteChanged();
|
||||
}
|
||||
}
|
||||
|
||||
// this makes sure that when user e.g. reloads the page or navigates away from the page, the note's content is saved
|
||||
// this sends the request asynchronously and doesn't wait for result
|
||||
$(window).on('beforeunload', () => { saveNotesIfChanged(); }); // don't convert to short form, handler doesn't like returned promise
|
||||
@@ -537,5 +545,6 @@ export default {
|
||||
filterTabs,
|
||||
openEmptyTab,
|
||||
noteDeleted,
|
||||
refreshTabs
|
||||
refreshTabs,
|
||||
noteChanged
|
||||
};
|
||||
@@ -34,7 +34,7 @@ class NoteDetailSearch {
|
||||
this.$searchString.val('');
|
||||
}
|
||||
|
||||
this.$searchString.on('input', noteDetailService.noteChanged);
|
||||
this.$searchString.on('input', () => this.ctx.noteChanged());
|
||||
}
|
||||
|
||||
getContent() {
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<strong>max notes:</strong>
|
||||
</label>
|
||||
|
||||
<input id="link-map-max-notes" type="number" value="50" min="5" max="1000" step="10"
|
||||
<input id="link-map-max-notes" type="number" value="50" min="5" max="1000" step="5"
|
||||
class="form-control form-control-sm"
|
||||
style="width: 80px; display: inline-block; text-align: right;"/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user