|
|
@ -462,7 +462,7 @@ const Headlines = {
|
|
|
|
<a class="title" title="${App.escapeHtml(hl.title)}" target="_blank" rel="noopener noreferrer" href="${App.escapeHtml(hl.link)}">
|
|
|
|
<a class="title" title="${App.escapeHtml(hl.title)}" target="_blank" rel="noopener noreferrer" href="${App.escapeHtml(hl.link)}">
|
|
|
|
${hl.title}</a>
|
|
|
|
${hl.title}</a>
|
|
|
|
<span class="author">${hl.author}</span>
|
|
|
|
<span class="author">${hl.author}</span>
|
|
|
|
${hl.labels}
|
|
|
|
${Article.renderLabels(hl.id, hl.labels)}
|
|
|
|
${hl.cdm_excerpt ? hl.cdm_excerpt : ""}
|
|
|
|
${hl.cdm_excerpt ? hl.cdm_excerpt : ""}
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
@ -527,7 +527,7 @@ const Headlines = {
|
|
|
|
<span data-article-id="${hl.id}" class="hl-content hlMenuAttach">
|
|
|
|
<span data-article-id="${hl.id}" class="hl-content hlMenuAttach">
|
|
|
|
<a class="title" href="${App.escapeHtml(hl.link)}">${hl.title} <span class="preview">${hl.content_preview}</span></a>
|
|
|
|
<a class="title" href="${App.escapeHtml(hl.link)}">${hl.title} <span class="preview">${hl.content_preview}</span></a>
|
|
|
|
<span class="author">${hl.author}</span>
|
|
|
|
<span class="author">${hl.author}</span>
|
|
|
|
${hl.labels}
|
|
|
|
${Article.renderLabels(hl.id, hl.labels)}
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<span class="feed">
|
|
|
|
<span class="feed">
|
|
|
@ -1240,11 +1240,16 @@ const Headlines = {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// TODO: maybe this should cause article to be rendered again, although it might cause flicker etc
|
|
|
|
onLabelsUpdated: function (data) {
|
|
|
|
onLabelsUpdated: function (data) {
|
|
|
|
if (data) {
|
|
|
|
if (data) {
|
|
|
|
data['info-for-headlines'].forEach(function (elem) {
|
|
|
|
data["labels-for"].forEach((row) => {
|
|
|
|
App.findAll(".HLLCTR-" + elem.id).forEach(function (ctr) {
|
|
|
|
if (this.headlines[row.id]) {
|
|
|
|
ctr.innerHTML = elem.labels;
|
|
|
|
this.headlines[row.id].labels = row.labels;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
App.findAll(`span[data-labels-for="${row.id}"]`).forEach((ctr) => {
|
|
|
|
|
|
|
|
ctr.innerHTML = Article.renderLabels(row.id, row.labels);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|