js: code cleanup
This commit is contained in:
parent
2a5c136e96
commit
b83d72b140
57
viewfeed.js
57
viewfeed.js
|
@ -1003,13 +1003,7 @@ function selectionAssignLabel(id) {
|
||||||
|
|
||||||
function selectionToggleUnread(set_state, callback_func, no_error) {
|
function selectionToggleUnread(set_state, callback_func, no_error) {
|
||||||
try {
|
try {
|
||||||
var rows;
|
var rows = getSelectedArticleIds2();
|
||||||
|
|
||||||
if (isCdmMode()) {
|
|
||||||
rows = cdmGetSelectedArticles();
|
|
||||||
} else {
|
|
||||||
rows = getSelectedTableRowIds("headlinesList", "RROW", "RCHK");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rows.length == 0 && !no_error) {
|
if (rows.length == 0 && !no_error) {
|
||||||
alert(__("No articles are selected."));
|
alert(__("No articles are selected."));
|
||||||
|
@ -1088,14 +1082,8 @@ function selectionToggleUnread(set_state, callback_func, no_error) {
|
||||||
function selectionToggleMarked() {
|
function selectionToggleMarked() {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
var rows;
|
var rows = getSelectedArticleIds2();
|
||||||
|
|
||||||
if (isCdmMode()) {
|
|
||||||
rows = cdmGetSelectedArticles();
|
|
||||||
} else {
|
|
||||||
rows = getSelectedTableRowIds("headlinesList", "RROW", "RCHK");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rows.length == 0) {
|
if (rows.length == 0) {
|
||||||
alert(__("No articles are selected."));
|
alert(__("No articles are selected."));
|
||||||
return;
|
return;
|
||||||
|
@ -1132,13 +1120,7 @@ function selectionToggleMarked() {
|
||||||
function selectionTogglePublished() {
|
function selectionTogglePublished() {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
var rows;
|
var rows = getSelectedArticleIds2();
|
||||||
|
|
||||||
if (isCdmMode()) {
|
|
||||||
rows = cdmGetSelectedArticles();
|
|
||||||
} else {
|
|
||||||
rows = getSelectedTableRowIds("headlinesList", "RROW", "RCHK");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rows.length == 0) {
|
if (rows.length == 0) {
|
||||||
alert(__("No articles are selected."));
|
alert(__("No articles are selected."));
|
||||||
|
@ -1278,21 +1260,14 @@ function catchupPage() {
|
||||||
function deleteSelection() {
|
function deleteSelection() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
var rows = getSelectedArticleIds2();
|
||||||
|
|
||||||
var rows;
|
|
||||||
|
|
||||||
if ($("headlinesList")) {
|
|
||||||
rows = getSelectedTableRowIds("headlinesList", "RROW", "RCHK");
|
|
||||||
} else {
|
|
||||||
rows = cdmGetSelectedArticles();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rows.length == 0) {
|
if (rows.length == 0) {
|
||||||
alert(__("No articles are selected."));
|
alert(__("No articles are selected."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var fn = getFeedName(getActiveFeedId(), activeFeedIsCat());
|
var fn = getFeedName(getActiveFeedId(), activeFeedIsCat());
|
||||||
var str;
|
var str;
|
||||||
var op;
|
var op;
|
||||||
|
@ -1329,20 +1304,13 @@ function archiveSelection() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
var rows;
|
var rows = getSelectedArticleIds2();
|
||||||
|
|
||||||
if ($("headlinesList")) {
|
|
||||||
rows = getSelectedTableRowIds("headlinesList", "RROW", "RCHK");
|
|
||||||
} else {
|
|
||||||
rows = cdmGetSelectedArticles();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rows.length == 0) {
|
if (rows.length == 0) {
|
||||||
alert(__("No articles are selected."));
|
alert(__("No articles are selected."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var fn = getFeedName(getActiveFeedId(), activeFeedIsCat());
|
var fn = getFeedName(getActiveFeedId(), activeFeedIsCat());
|
||||||
var str;
|
var str;
|
||||||
var op;
|
var op;
|
||||||
|
@ -1385,20 +1353,13 @@ function catchupSelection() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
var rows;
|
var rows = getSelectedArticleIds2();
|
||||||
|
|
||||||
if ($("headlinesList")) {
|
|
||||||
rows = getSelectedTableRowIds("headlinesList", "RROW", "RCHK");
|
|
||||||
} else {
|
|
||||||
rows = cdmGetSelectedArticles();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rows.length == 0) {
|
if (rows.length == 0) {
|
||||||
alert(__("No articles are selected."));
|
alert(__("No articles are selected."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var fn = getFeedName(getActiveFeedId(), activeFeedIsCat());
|
var fn = getFeedName(getActiveFeedId(), activeFeedIsCat());
|
||||||
|
|
||||||
var str = __("Mark %d selected articles in %s as read?");
|
var str = __("Mark %d selected articles in %s as read?");
|
||||||
|
|
Loading…
Reference in New Issue