Headlines: shorten selectArticles
This commit is contained in:
parent
3678315bea
commit
6e625555c9
|
@ -20,10 +20,10 @@ class Feeds extends Handler_Protected {
|
|||
$archive_sel_link = "Headlines.archiveSelection()";
|
||||
$delete_sel_link = "Headlines.deleteSelection()";
|
||||
|
||||
$sel_all_link = "Headlines.selectArticles('all')";
|
||||
$sel_unread_link = "Headlines.selectArticles('unread')";
|
||||
$sel_none_link = "Headlines.selectArticles('none')";
|
||||
$sel_inv_link = "Headlines.selectArticles('invert')";
|
||||
$sel_all_link = "Headlines.select('all')";
|
||||
$sel_unread_link = "Headlines.select('unread')";
|
||||
$sel_none_link = "Headlines.select('none')";
|
||||
$sel_inv_link = "Headlines.select('invert')";
|
||||
|
||||
$tog_unread_link = "Headlines.selectionToggleUnread()";
|
||||
$tog_marked_link = "Headlines.selectionToggleMarked()";
|
||||
|
|
12
js/tt-rss.js
12
js/tt-rss.js
|
@ -315,22 +315,22 @@ const App = {
|
|||
}
|
||||
};
|
||||
this.hotkey_actions["select_all"] = function () {
|
||||
Headlines.selectArticles('all');
|
||||
Headlines.select('all');
|
||||
};
|
||||
this.hotkey_actions["select_unread"] = function () {
|
||||
Headlines.selectArticles('unread');
|
||||
Headlines.select('unread');
|
||||
};
|
||||
this.hotkey_actions["select_marked"] = function () {
|
||||
Headlines.selectArticles('marked');
|
||||
Headlines.select('marked');
|
||||
};
|
||||
this.hotkey_actions["select_published"] = function () {
|
||||
Headlines.selectArticles('published');
|
||||
Headlines.select('published');
|
||||
};
|
||||
this.hotkey_actions["select_invert"] = function () {
|
||||
Headlines.selectArticles('invert');
|
||||
Headlines.select('invert');
|
||||
};
|
||||
this.hotkey_actions["select_none"] = function () {
|
||||
Headlines.selectArticles('none');
|
||||
Headlines.select('none');
|
||||
};
|
||||
this.hotkey_actions["feed_refresh"] = function () {
|
||||
if (Feeds.getActiveFeedId() != undefined) {
|
||||
|
|
|
@ -1109,7 +1109,7 @@ const Headlines = {
|
|||
|
||||
return rv;
|
||||
},
|
||||
selectArticles: function(mode) {
|
||||
select: function(mode) {
|
||||
// mode = all,none,unread,invert,marked,published
|
||||
let query = "#headlines-frame > div[id*=RROW]";
|
||||
|
||||
|
@ -1128,7 +1128,7 @@ const Headlines = {
|
|||
query += "[class*=Unread]";
|
||||
break;
|
||||
default:
|
||||
console.warn("selectArticles: unknown mode", mode);
|
||||
console.warn("select: unknown mode", mode);
|
||||
}
|
||||
|
||||
const rows = $$(query);
|
||||
|
@ -1522,7 +1522,7 @@ const Headlines = {
|
|||
menu.addChild(new dijit.MenuItem({
|
||||
label: __("Select articles in group"),
|
||||
onClick: function (event) {
|
||||
Headlines.selectArticles("all",
|
||||
Headlines.select("all",
|
||||
"#headlines-frame > div[id*=RROW]" +
|
||||
"[data-orig-feed-id='" + this.getParent().currentTarget.getAttribute("data-feed-id") + "']");
|
||||
|
||||
|
@ -1532,8 +1532,8 @@ const Headlines = {
|
|||
menu.addChild(new dijit.MenuItem({
|
||||
label: __("Mark group as read"),
|
||||
onClick: function () {
|
||||
Headlines.selectArticles("none");
|
||||
Headlines.selectArticles("all",
|
||||
Headlines.select("none");
|
||||
Headlines.select("all",
|
||||
"#headlines-frame > div[id*=RROW]" +
|
||||
"[data-orig-feed-id='" + this.getParent().currentTarget.getAttribute("data-feed-id") + "']");
|
||||
|
||||
|
|
Loading…
Reference in New Issue