events for updating title (no saving yet)

This commit is contained in:
zadam
2020-01-19 18:05:06 +01:00
parent 44dc3c28de
commit 8da094cd3c
12 changed files with 116 additions and 73 deletions

View File

@@ -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();