add special class for feeds with disabled updates
This commit is contained in:
parent
cc16b7ba39
commit
f6269d1bc4
|
@ -69,7 +69,7 @@ class Pref_Feeds extends Handler_Protected {
|
||||||
}
|
}
|
||||||
|
|
||||||
$fsth = $this->pdo->prepare("SELECT id, title, last_error,
|
$fsth = $this->pdo->prepare("SELECT id, title, last_error,
|
||||||
".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated
|
".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated, update_interval
|
||||||
FROM ttrss_feeds
|
FROM ttrss_feeds
|
||||||
WHERE cat_id = :cat AND
|
WHERE cat_id = :cat AND
|
||||||
owner_uid = :uid AND
|
owner_uid = :uid AND
|
||||||
|
@ -90,6 +90,7 @@ class Pref_Feeds extends Handler_Protected {
|
||||||
$feed['icon'] = Feeds::getFeedIcon($feed_line['id']);
|
$feed['icon'] = Feeds::getFeedIcon($feed_line['id']);
|
||||||
$feed['param'] = make_local_datetime(
|
$feed['param'] = make_local_datetime(
|
||||||
$feed_line['last_updated'], true);
|
$feed_line['last_updated'], true);
|
||||||
|
$feed['updates_disabled'] = (int)($feed_line['update_interval'] < 0);
|
||||||
|
|
||||||
array_push($items, $feed);
|
array_push($items, $feed);
|
||||||
}
|
}
|
||||||
|
@ -237,7 +238,7 @@ class Pref_Feeds extends Handler_Protected {
|
||||||
$cat['child_unread'] = 0;
|
$cat['child_unread'] = 0;
|
||||||
|
|
||||||
$fsth = $this->pdo->prepare("SELECT id, title,last_error,
|
$fsth = $this->pdo->prepare("SELECT id, title,last_error,
|
||||||
".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated
|
".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated, update_interval
|
||||||
FROM ttrss_feeds
|
FROM ttrss_feeds
|
||||||
WHERE cat_id IS NULL AND
|
WHERE cat_id IS NULL AND
|
||||||
owner_uid = :uid AND
|
owner_uid = :uid AND
|
||||||
|
@ -258,6 +259,7 @@ class Pref_Feeds extends Handler_Protected {
|
||||||
$feed_line['last_updated'], true);
|
$feed_line['last_updated'], true);
|
||||||
$feed['unread'] = 0;
|
$feed['unread'] = 0;
|
||||||
$feed['type'] = 'feed';
|
$feed['type'] = 'feed';
|
||||||
|
$feed['updates_disabled'] = (int)($feed_line['update_interval'] < 0);
|
||||||
|
|
||||||
array_push($cat['items'], $feed);
|
array_push($cat['items'], $feed);
|
||||||
}
|
}
|
||||||
|
@ -272,7 +274,7 @@ class Pref_Feeds extends Handler_Protected {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$fsth = $this->pdo->prepare("SELECT id, title, last_error,
|
$fsth = $this->pdo->prepare("SELECT id, title, last_error,
|
||||||
".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated
|
".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated, update_interval
|
||||||
FROM ttrss_feeds
|
FROM ttrss_feeds
|
||||||
WHERE owner_uid = :uid AND
|
WHERE owner_uid = :uid AND
|
||||||
(:search = '' OR (LOWER(title) LIKE :search OR LOWER(feed_url) LIKE :search))
|
(:search = '' OR (LOWER(title) LIKE :search OR LOWER(feed_url) LIKE :search))
|
||||||
|
@ -292,6 +294,7 @@ class Pref_Feeds extends Handler_Protected {
|
||||||
$feed_line['last_updated'], true);
|
$feed_line['last_updated'], true);
|
||||||
$feed['unread'] = 0;
|
$feed['unread'] = 0;
|
||||||
$feed['type'] = 'feed';
|
$feed['type'] = 'feed';
|
||||||
|
$feed['updates_disabled'] = (int)($feed_line['update_interval'] < 0);
|
||||||
|
|
||||||
array_push($root['items'], $feed);
|
array_push($root['items'], $feed);
|
||||||
}
|
}
|
||||||
|
|
|
@ -828,6 +828,10 @@ body.ttrss_main {
|
||||||
color : red;
|
color : red;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#feedTree .dijitTreeRow.UpdatesDisabled .dijitTreeLabel {
|
||||||
|
color : #909090;
|
||||||
|
}
|
||||||
|
|
||||||
#feedTree.dijitTree .dijitTreeNode .dijitTreeRowSelected {
|
#feedTree.dijitTree .dijitTreeNode .dijitTreeRowSelected {
|
||||||
box-shadow : -1px 0px 2px -1px rgba(0,0,0,0.1);
|
box-shadow : -1px 0px 2px -1px rgba(0,0,0,0.1);
|
||||||
border-right-color : white;
|
border-right-color : white;
|
||||||
|
|
|
@ -267,6 +267,7 @@ require(["dojo/_base/declare", "dojo/dom-construct", "dijit/Tree", "dijit/Menu"]
|
||||||
"dijitTreeRow Error";
|
"dijitTreeRow Error";
|
||||||
|
|
||||||
if (item.unread > 0) rc += " Unread";
|
if (item.unread > 0) rc += " Unread";
|
||||||
|
if (item.updates_disabled > 0) rc += " UpdatesDisabled";
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue