mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
cleanup
This commit is contained in:
parent
81c534104f
commit
573e2f7ace
@ -108,9 +108,6 @@ function getNodeIdFromLabel(label) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).bind('keydown', 'alt+l', function() {
|
$(document).bind('keydown', 'alt+l', function() {
|
||||||
var range = $('#noteDetail').summernote('createRange');
|
|
||||||
console.log("range:", range);
|
|
||||||
|
|
||||||
$("#noteAutocomplete").val('');
|
$("#noteAutocomplete").val('');
|
||||||
$("#linkTitle").val('');
|
$("#linkTitle").val('');
|
||||||
|
|
||||||
@ -124,7 +121,7 @@ $(document).bind('keydown', 'alt+l', function() {
|
|||||||
|
|
||||||
let autocompleteItems = [];
|
let autocompleteItems = [];
|
||||||
|
|
||||||
for (let noteId in globalNoteNames) {
|
for (const noteId of globalAllNoteIds) {
|
||||||
let fullName = getFullName(noteId);
|
let fullName = getFullName(noteId);
|
||||||
|
|
||||||
autocompleteItems.push({
|
autocompleteItems.push({
|
||||||
|
@ -42,8 +42,6 @@ function saveNoteIfChanged(callback) {
|
|||||||
|
|
||||||
note.detail.note_title = title;
|
note.detail.note_title = title;
|
||||||
|
|
||||||
globalNoteNames[note.detail.note_id] = title;
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: baseUrl + 'notes/' + note.detail.note_id,
|
url: baseUrl + 'notes/' + note.detail.note_id,
|
||||||
type: 'PUT',
|
type: 'PUT',
|
||||||
@ -112,7 +110,7 @@ function createNote(node, parentKey, target) {
|
|||||||
"note_id": result.note_id
|
"note_id": result.note_id
|
||||||
};
|
};
|
||||||
|
|
||||||
globalNoteNames[result.note_id] = newNoteName;
|
globalAllNoteIds.push(result.note_id);
|
||||||
|
|
||||||
newNoteCreated = true;
|
newNoteCreated = true;
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ const keybindings = {
|
|||||||
node.getParent().renderTitle();
|
node.getParent().renderTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
delete globalNoteNames[node.key];
|
globalAllNoteIds = globalAllNoteIds.filter(e => e !== node.key);
|
||||||
|
|
||||||
// remove from recent notes
|
// remove from recent notes
|
||||||
recentNotes = recentNotes.filter(note => note !== node.key);
|
recentNotes = recentNotes.filter(note => note !== node.key);
|
||||||
@ -102,7 +102,7 @@ const keybindings = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const globalNoteNames = {};
|
let globalAllNoteIds = [];
|
||||||
|
|
||||||
let globalTree;
|
let globalTree;
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ $(function(){
|
|||||||
|
|
||||||
function copyTitle(notes) {
|
function copyTitle(notes) {
|
||||||
for (const note of notes) {
|
for (const note of notes) {
|
||||||
globalNoteNames[note.note_id] = note.note_title;
|
globalAllNoteIds.push(note.note_id);
|
||||||
|
|
||||||
note.title = note.note_title;
|
note.title = note.note_title;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user