From acbd18e8fc66a1e5204945859b6de6000283d676 Mon Sep 17 00:00:00 2001
From: azivner
Date: Tue, 14 Aug 2018 23:07:50 +0200
Subject: [PATCH] links to documentation for attributes, links and search + fix
for opening external links
---
electron.js | 2 +-
src/public/javascripts/services/tree_builder.js | 10 +---------
src/views/index.ejs | 10 +++++++++-
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/electron.js b/electron.js
index 867cbfc0b..75d1e5fe5 100644
--- a/electron.js
+++ b/electron.js
@@ -36,7 +36,7 @@ async function createMainWindow() {
win.on('closed', onClosed);
win.webContents.on('new-window', (e, url) => {
- if (url !== mainWindow.webContents.getURL()) {
+ if (url !== win.webContents.getURL()) {
e.preventDefault();
require('electron').shell.openExternal(url);
}
diff --git a/src/public/javascripts/services/tree_builder.js b/src/public/javascripts/services/tree_builder.js
index 4cb026a08..27e038b8a 100644
--- a/src/public/javascripts/services/tree_builder.js
+++ b/src/public/javascripts/services/tree_builder.js
@@ -77,14 +77,8 @@ async function prepareSearchBranch(note) {
const results = (await server.get('search/' + encodeURIComponent(fullNote.jsonContent.searchString)))
.filter(res => res.noteId !== note.noteId); // this is necessary because title of the search note is often the same as the search text which would match and create circle
- const noteIds = results.map(res => res.noteId);
-
- console.log("result: ", results);
-
// force to load all the notes at once instead of one by one
- const notes = await treeCache.getNotes(noteIds);
-
- console.log("NOTES", notes);
+ await treeCache.getNotes(results.map(res => res.noteId));
for (const result of results) {
const origBranch = await treeCache.getBranch(result.branchId);
@@ -100,8 +94,6 @@ async function prepareSearchBranch(note) {
treeCache.addBranch(branch);
}
- console.log("fullNote", fullNote);
-
return await prepareRealBranch(fullNote);
}
diff --git a/src/views/index.ejs b/src/views/index.ejs
index 768ef0aa0..83459361f 100644
--- a/src/views/index.ejs
+++ b/src/views/index.ejs
@@ -220,7 +220,7 @@
@abc @def some search string
- same combination
- Complete help on search syntax
+ Documentation on search
@@ -302,6 +302,10 @@
+
+
+
+ Documentation on links
@@ -551,6 +555,10 @@