mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 12:25:56 +00:00
format note on the client
This commit is contained in:
@@ -130,6 +130,11 @@ const Article = {
|
||||
|
||||
Headlines.toggleUnread(id, 0);
|
||||
},
|
||||
renderNote: function (id, note) {
|
||||
return `<div class="article-note" data-note-for="${id}" style="display : ${note ? "" : "none"}">
|
||||
${App.FormFields.icon('note')} <div onclick class='body'>${note ? App.escapeHtml(note) : ""}</div>
|
||||
</div>`;
|
||||
},
|
||||
renderTags: function (id, tags) {
|
||||
const tags_short = tags.length > 5 ? tags.slice(0, 5) : tags;
|
||||
|
||||
@@ -300,7 +305,7 @@ const Article = {
|
||||
<div class="buttons right">${hl.buttons}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="POSTNOTE-${hl.id}">${hl.note}</div>
|
||||
${Article.renderNote(hl.id, hl.note)}
|
||||
<div class="content" lang="${hl.lang ? hl.lang : 'en'}">
|
||||
${hl.content}
|
||||
${Article.renderEnclosures(hl.enclosures)}
|
||||
|
||||
@@ -483,7 +483,7 @@ const Headlines = {
|
||||
</div>
|
||||
|
||||
<div class="content" onclick="return Headlines.click(event, ${hl.id}, true);">
|
||||
<div id="POSTNOTE-${hl.id}">${hl.note}</div>
|
||||
${Article.renderNote(hl.id, hl.note)}
|
||||
<div class="content-inner" lang="${hl.lang ? hl.lang : 'en'}">
|
||||
<img src="${App.getInitParam('icon_indicator_white')}">
|
||||
</div>
|
||||
|
||||
@@ -71,9 +71,9 @@ Element.prototype.fadeOut = function() {
|
||||
}());
|
||||
};
|
||||
|
||||
Element.prototype.fadeIn = function(display){
|
||||
Element.prototype.fadeIn = function(display = undefined){
|
||||
this.style.opacity = 0;
|
||||
this.style.display = display || "block";
|
||||
this.style.display = display == undefined ? "block" : display;
|
||||
const self = this;
|
||||
|
||||
(function fade() {
|
||||
|
||||
Reference in New Issue
Block a user