mirror of
https://github.com/wekan/wekan.git
synced 2025-12-23 19:00:12 +01:00
Fix list view issues. Allow creation of boards from templates
This commit is contained in:
parent
13c2157e36
commit
dc7286a0ef
12 changed files with 122 additions and 35 deletions
|
|
@ -36,7 +36,10 @@ import sanitizeXss from 'xss';
|
|||
const at = HTML.CharRef({html: '@', str: '@'});
|
||||
Blaze.Template.registerHelper('mentions', new Template('mentions', function() {
|
||||
const view = this;
|
||||
let content = Blaze.toHTML(view.templateContentBlock);
|
||||
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||
if (!currentBoard)
|
||||
return HTML.Raw(sanitizeXss(content));
|
||||
const knowedUsers = currentBoard.members.map((member) => {
|
||||
const u = Users.findOne(member.userId);
|
||||
if(u){
|
||||
|
|
@ -45,7 +48,6 @@ Blaze.Template.registerHelper('mentions', new Template('mentions', function() {
|
|||
return member;
|
||||
});
|
||||
const mentionRegex = /\B@([\w.]*)/gi;
|
||||
let content = Blaze.toHTML(view.templateContentBlock);
|
||||
|
||||
let currentMention;
|
||||
while ((currentMention = mentionRegex.exec(content)) !== null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue