mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2026-02-10 16:01:33 +00:00
experimentally rebase labels; make base index configurable
This commit is contained in:
+2
-2
@@ -106,7 +106,7 @@ dojo.declare("fox.FeedTree", dijit.Tree, {
|
||||
var id = args.item.id[0];
|
||||
var bare_id = parseInt(id.substr(id.indexOf(':')+1));
|
||||
|
||||
if (bare_id < -10) {
|
||||
if (bare_id < _label_base_index) {
|
||||
var span = dojo.doc.createElement('span');
|
||||
var fg_color = args.item.fg_color[0];
|
||||
var bg_color = args.item.bg_color[0];
|
||||
@@ -380,7 +380,7 @@ dojo.declare("fox.FeedTree", dijit.Tree, {
|
||||
var node = tree._itemNodesMap[id];
|
||||
|
||||
if (node) {
|
||||
if (hide && unread == 0 && (bare_id > 0 || bare_id < -10 || !show_special)) {
|
||||
if (hide && unread == 0 && (bare_id > 0 || bare_id < _label_base_index || !show_special)) {
|
||||
Effect.Fade(node[0].rowNode, {duration : 0.3,
|
||||
queue: { position: 'end', scope: 'FFADE-' + id, limit: 1 }});
|
||||
} else {
|
||||
|
||||
@@ -2,6 +2,7 @@ var notify_silent = false;
|
||||
var loading_progress = 0;
|
||||
var sanity_check_done = false;
|
||||
var init_params = {};
|
||||
var _label_base_index = -1024;
|
||||
|
||||
Ajax.Base.prototype.initialize = Ajax.Base.prototype.initialize.wrap(
|
||||
function (callOriginal, options) {
|
||||
@@ -1986,3 +1987,13 @@ function htmlspecialchars_decode (string, quote_style) {
|
||||
|
||||
return string;
|
||||
}
|
||||
|
||||
|
||||
function label_to_feed_id(label) {
|
||||
return _label_base_index - 1 - Math.abs(label);
|
||||
}
|
||||
|
||||
function feed_to_label_id(feed) {
|
||||
return _label_base_index - 1 + Math.abs(feed);
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -1920,7 +1920,7 @@ function initHeadlinesMenu() {
|
||||
var bare_id = id.substr(id.indexOf(":")+1);
|
||||
var name = label.name[0];
|
||||
|
||||
bare_id = -11-bare_id;
|
||||
bare_id = feed_to_label_id(bare_id);
|
||||
|
||||
labelAddMenu.addChild(new dijit.MenuItem({
|
||||
label: name,
|
||||
@@ -2120,3 +2120,4 @@ function displayArticleUrl(id) {
|
||||
exception_error("changeScore", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user