small fixes

This commit is contained in:
zadam
2019-09-09 20:29:07 +02:00
parent 30c56cd8af
commit 76f3e87790
7 changed files with 151 additions and 142 deletions

View File

@@ -59,7 +59,7 @@ export default class SidebarOptions {
widget.option = this.parseJsonSafely(options[widget.name + 'Widget']) || {
enabled: true,
expanded: true,
position: 100
position: 1000
};
return widget;
@@ -117,7 +117,7 @@ export default class SidebarOptions {
opts[widgetName + 'Widget'] = JSON.stringify({
enabled: $.contains(this.$widgetsEnabled[0], el),
expanded: $(el).find("input[type=checkbox]").is(":checked"),
position: (i + 1) * 10
position: (i + 1) * 100
});
});

View File

@@ -89,6 +89,15 @@ export default class LinkMap {
.prop("id", noteBoxId);
linkService.createNoteLink(noteId, note.title).then($link => {
$link.click(e => {
try {
$link.tooltip('dispose');
}
catch (e) {}
linkService.goToLink(e);
});
$noteBox.append($("<span>").addClass("title").append($link));
});

View File

@@ -7,14 +7,14 @@ const utils = require('../../services/utils');
const optionService = require('../../services/options');
async function getAutocomplete(req) {
const query = req.query.query;
const query = req.query.query.trim();
const activeNoteId = req.query.activeNoteId || 'none';
let results;
const timestampStarted = Date.now();
if (query.trim().length === 0) {
if (query.length === 0) {
results = await getRecentNotes(activeNoteId);
}
else {

View File

@@ -23,7 +23,7 @@ async function searchForNoteIds(searchString) {
const isArchivedFilter = filters.find(filter => filter.name.toLowerCase() === 'isarchived');
if (isArchivedFilter) {console.log(isArchivedFilter);
if (isArchivedFilter) {
if (isArchivedFilter.operator === 'exists') {
noteIds = noteIds.filter(noteCacheService.isArchived);
}