moved tab related stuff to tab manager from app context

This commit is contained in:
zadam
2020-02-07 21:08:55 +01:00
parent 6d912c4897
commit 14d6372bd8
29 changed files with 331 additions and 332 deletions

View File

@@ -78,11 +78,11 @@ function goToLink(e) {
if (notePath) {
if ((e.which === 1 && e.ctrlKey) || e.which === 2) {
const tabContext = appContext.openEmptyTab();
appContext.activateTab(tabContext.tabId);
appContext.tabManager.activateTab(tabContext.tabId);
tabContext.setNote(notePath);
}
else if (e.which === 1) {
const activeTabContext = appContext.getActiveTabContext();
const activeTabContext = appContext.tabManager.getActiveTabContext();
activeTabContext.setNote(notePath)
}
else {
@@ -121,7 +121,7 @@ function newTabContextMenu(e) {
if (cmd === 'openNoteInNewTab') {
const tabContext = appContext.openEmptyTab();
tabContext.setNote(notePath);
appContext.activateTab(tabContext.tabId);
appContext.tabManager.activateTab(tabContext.tabId);
}
}
});
@@ -143,7 +143,7 @@ $(document).on('mousedown', '.note-detail-text a', function (e) {
if (notePath) {
const tabContext = appContext.openEmptyTab();
tabContext.setNote(notePath);
appContext.activateTab(tabContext.tabId);
appContext.tabManager.activateTab(tabContext.tabId);
}
else {
const address = $link.attr('href');