add Prefs::DEBUG_HEADLINE_IDS
This commit is contained in:
parent
05f690c86b
commit
9689f884ab
|
@ -65,7 +65,10 @@ class Pref_Prefs extends Handler_Protected {
|
|||
Prefs::SSL_CERT_SERIAL,
|
||||
'BLOCK_SEPARATOR',
|
||||
Prefs::HEADLINES_NO_DISTINCT,
|
||||
]
|
||||
],
|
||||
__('Debugging') => [
|
||||
Prefs::DEBUG_HEADLINE_IDS,
|
||||
],
|
||||
];
|
||||
|
||||
$this->pref_help_bottom = [
|
||||
|
@ -101,6 +104,7 @@ class Pref_Prefs extends Handler_Protected {
|
|||
Prefs::USER_LANGUAGE => array(__("Language")),
|
||||
Prefs::USER_CSS_THEME => array(__("Theme")),
|
||||
Prefs::HEADLINES_NO_DISTINCT => array(__("Don't enforce DISTINCT headlines"), __("May produce duplicate entries")),
|
||||
Prefs::DEBUG_HEADLINE_IDS => array(__("Show article and feed IDs"), __("In headlines buffer")),
|
||||
];
|
||||
|
||||
// hidden in the main prefs UI (use to hide things that have description set above)
|
||||
|
|
|
@ -57,6 +57,7 @@ class Prefs {
|
|||
const DEFAULT_SEARCH_LANGUAGE = "DEFAULT_SEARCH_LANGUAGE";
|
||||
const _PREFS_MIGRATED = "_PREFS_MIGRATED";
|
||||
const HEADLINES_NO_DISTINCT = "HEADLINES_NO_DISTINCT";
|
||||
const DEBUG_HEADLINE_IDS = "DEBUG_HEADLINE_IDS";
|
||||
|
||||
private const _DEFAULTS = [
|
||||
Prefs::PURGE_OLD_DAYS => [ 60, Config::T_INT ],
|
||||
|
@ -114,6 +115,7 @@ class Prefs {
|
|||
Prefs::DEFAULT_SEARCH_LANGUAGE => [ "" , Config::T_STRING ],
|
||||
Prefs::_PREFS_MIGRATED => [ false, Config::T_BOOL ],
|
||||
Prefs::HEADLINES_NO_DISTINCT => [ false, Config::T_BOOL ],
|
||||
Prefs::DEBUG_HEADLINE_IDS => [ false, Config::T_BOOL ],
|
||||
];
|
||||
|
||||
const _PROFILE_BLACKLIST = [
|
||||
|
|
|
@ -415,7 +415,7 @@ class RPC extends Handler_Protected {
|
|||
Prefs::ENABLE_FEED_CATS, Prefs::FEEDS_SORT_BY_UNREAD,
|
||||
Prefs::CONFIRM_FEED_CATCHUP, Prefs::CDM_AUTO_CATCHUP,
|
||||
Prefs::FRESH_ARTICLE_MAX_AGE, Prefs::HIDE_READ_SHOWS_SPECIAL,
|
||||
Prefs::COMBINED_DISPLAY_MODE] as $param) {
|
||||
Prefs::COMBINED_DISPLAY_MODE, Prefs::DEBUG_HEADLINE_IDS] as $param) {
|
||||
|
||||
$params[strtolower($param)] = (int) get_pref($param);
|
||||
}
|
||||
|
|
|
@ -440,10 +440,12 @@ const Headlines = {
|
|||
|
||||
if (headlines.vfeed_group_enabled && hl.feed_title && this.vgroup_last_feed != hl.feed_id) {
|
||||
const vgrhdr = `<div data-feed-id='${hl.feed_id}' class='feed-title'>
|
||||
<div style='float : right'>${Feeds.renderIcon(hl.feed_id, hl.has_icon)}</div>
|
||||
<a class="title" href="#" onclick="Feeds.open({feed:${hl.feed_id}})">${hl.feed_title}
|
||||
<a class="catchup" title="${__('mark feed as read')}" onclick="Feeds.catchupFeedInGroup(${hl.feed_id})" href="#"><i class="icon-done material-icons">done_all</i></a>
|
||||
</div>`
|
||||
<div class="pull-right">${Feeds.renderIcon(hl.feed_id, hl.has_icon)}</div>
|
||||
<a class="title" href="#" onclick="Feeds.open({feed:${hl.feed_id}})">${hl.feed_title}</a>
|
||||
<a class="catchup" title="${__('mark feed as read')}" onclick="Feeds.catchupFeedInGroup(${hl.feed_id})" href="#">
|
||||
<i class="icon-done material-icons">done_all</i>
|
||||
</a>
|
||||
</div>`
|
||||
|
||||
const tmp = document.createElement("div");
|
||||
tmp.innerHTML = vgrhdr;
|
||||
|
@ -476,6 +478,7 @@ const Headlines = {
|
|||
</div>
|
||||
|
||||
<span onclick="return Headlines.click(event, ${hl.id});" data-article-id="${hl.id}" class="titleWrap hlMenuAttach">
|
||||
${App.getInitParam("debug_headline_ids") ? `<span class="text-muted small">A: ${hl.id} F: ${hl.feed_id}</span>` : ""}
|
||||
<a class="title" title="${App.escapeHtml(hl.title)}" target="_blank" rel="noopener noreferrer" href="${App.escapeHtml(hl.link)}">
|
||||
${hl.title}</a>
|
||||
<span class="author">${hl.author}</span>
|
||||
|
@ -542,6 +545,7 @@ const Headlines = {
|
|||
<i class="pub-pic pub-${hl.id} material-icons" onclick="Headlines.togglePub(${hl.id})">rss_feed</i>
|
||||
</div>
|
||||
<div onclick="return Headlines.click(event, ${hl.id})" class="title">
|
||||
${App.getInitParam("debug_headline_ids") ? `<span class="text-muted small">A: ${hl.id} F: ${hl.feed_id}</span>` : ""}
|
||||
<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>
|
||||
<span class="author">${hl.author}</span>
|
||||
|
|
Loading…
Reference in New Issue