note tooltip displays the whole note with scrollbar, other behavior changes. closes #4120

This commit is contained in:
zadam
2023-07-25 22:27:15 +02:00
parent d0e5ad5b7e
commit ddf75cd5e5
11 changed files with 62 additions and 62 deletions

View File

@@ -2,9 +2,7 @@ const becca = require('../becca/becca');
const NotFoundError = require("../errors/not_found_error");
const protectedSessionService = require("./protected_session");
function getBlobPojo(entityName, entityId, opts = {}) {
opts.preview = !!opts.preview;
function getBlobPojo(entityName, entityId) {
const entity = becca.getEntity(entityName, entityId);
if (!entity) {
@@ -19,10 +17,6 @@ function getBlobPojo(entityName, entityId, opts = {}) {
pojo.content = null;
} else {
pojo.content = processContent(pojo.content, entity.isProtected, true);
if (opts.preview && pojo.content.length > 10000) {
pojo.content = `${pojo.content.substr(0, 10000)}\r\n\r\n... and ${pojo.content.length - 10000} more characters.`;
}
}
return pojo;