mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	events for updating title (no saving yet)
This commit is contained in:
		@@ -8,7 +8,6 @@ import treeUtils from "./tree_utils.js";
 | 
			
		||||
import tabRow from "../widgets/tab_row.js";
 | 
			
		||||
import appContext from "./app_context.js";
 | 
			
		||||
 | 
			
		||||
const $tabContentsContainer = $("#note-tab-container");
 | 
			
		||||
const $savedIndicator = $(".saved-indicator");
 | 
			
		||||
 | 
			
		||||
let detailLoadedListeners = [];
 | 
			
		||||
@@ -200,30 +199,6 @@ ws.subscribeToAllSyncMessages(syncData => {
 | 
			
		||||
    appContext.trigger('syncData', {data: syncData});
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
$tabContentsContainer.on("dragover", e => e.preventDefault());
 | 
			
		||||
 | 
			
		||||
$tabContentsContainer.on("dragleave", e => e.preventDefault());
 | 
			
		||||
 | 
			
		||||
$tabContentsContainer.on("drop", async e => {
 | 
			
		||||
    const activeNote = appContext.getActiveTabNote();
 | 
			
		||||
 | 
			
		||||
    if (!activeNote) {
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    const files = [...e.originalEvent.dataTransfer.files]; // chrome has issue that dataTransfer.files empties after async operation
 | 
			
		||||
 | 
			
		||||
    const importService = await import("./import.js");
 | 
			
		||||
 | 
			
		||||
    importService.uploadFiles(activeNote.noteId, files, {
 | 
			
		||||
        safeImport: true,
 | 
			
		||||
        shrinkImages: true,
 | 
			
		||||
        textImportedAsText: true,
 | 
			
		||||
        codeImportedAsCode: true,
 | 
			
		||||
        explodeArchives: true
 | 
			
		||||
    });
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
function noteChanged() {
 | 
			
		||||
    const activeTabContext = appContext.getActiveTabContext();
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user