fix catchupPage/bottom subtoolbar in CDM
This commit is contained in:
parent
183ad07bc2
commit
b47b5af7b9
20
backend.php
20
backend.php
|
@ -833,12 +833,12 @@
|
||||||
|
|
||||||
print "<td class=\"headlineActions$rtl_cpart\">
|
print "<td class=\"headlineActions$rtl_cpart\">
|
||||||
Select:
|
Select:
|
||||||
<a href='#' onclick=\"javascript:selectTableRowsByIdPrefix('headlinesList', 'RROW-', 'RCHK-', true, '', true)\">All</a>,
|
<a href=\"javascript:selectTableRowsByIdPrefix('headlinesList', 'RROW-', 'RCHK-', true, '', true)\">All</a>,
|
||||||
<a href='#' onclick=\"javascript:selectTableRowsByIdPrefix('headlinesList', 'RROW-', 'RCHK-', true, 'Unread', true)\">Unread</a>,
|
<a href=\"javascript:selectTableRowsByIdPrefix('headlinesList', 'RROW-', 'RCHK-', true, 'Unread', true)\">Unread</a>,
|
||||||
<a href='#' onclick=\"javascript:selectTableRowsByIdPrefix('headlinesList', 'RROW-', 'RCHK-', false)\">None</a>
|
<a href=\"javascript:selectTableRowsByIdPrefix('headlinesList', 'RROW-', 'RCHK-', false)\">None</a>
|
||||||
|
|
||||||
Toggle: <a href='#' onclick=\"javascript:selectionToggleUnread()\">Unread</a>,
|
Toggle: <a href=\"javascript:selectionToggleUnread()\">Unread</a>,
|
||||||
<a href='#' onclick=\"javascript:selectionToggleMarked()\">Starred</a>";
|
<a href=\"javascript:selectionToggleMarked()\">Starred</a>";
|
||||||
|
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
|
||||||
|
@ -853,12 +853,12 @@
|
||||||
|
|
||||||
print "<td class=\"headlineActions$rtl_cpart\">
|
print "<td class=\"headlineActions$rtl_cpart\">
|
||||||
Select:
|
Select:
|
||||||
<a href=\"#\" onclick=\"javascript:cdmSelectArticles('all')\">All</a>,
|
<a href=\"javascript:cdmSelectArticles('all')\">All</a>,
|
||||||
<a href=\"#\" onclick=\"javascript:cdmSelectArticles('unread')\">Unread</a>,
|
<a href=\"javascript:cdmSelectArticles('unread')\">Unread</a>,
|
||||||
<a href=\"#\" onclick=\"javascript:cdmSelectArticles('none')\">None</a>
|
<a href=\"javascript:cdmSelectArticles('none')\">None</a>
|
||||||
|
|
||||||
Toggle: <a href=\"#\" onclick=\"javascript:selectionToggleUnread(true)\">Unread</a>,
|
Toggle: <a href=\"javascript:selectionToggleUnread(true)\">Unread</a>,
|
||||||
<a href=\"#\" onclick=\"javascript:selectionToggleMarked(true)\">Starred</a>";
|
<a href=\"javascript:selectionToggleMarked(true)\">Starred</a>";
|
||||||
|
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
|
||||||
|
|
35
viewfeed.js
35
viewfeed.js
|
@ -175,7 +175,7 @@ function toggleUnread(id, cmode) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectionToggleUnread(cdm_mode) {
|
function selectionToggleUnread(cdm_mode, set_state) {
|
||||||
try {
|
try {
|
||||||
if (!xmlhttp_ready(xmlhttp_rpc)) {
|
if (!xmlhttp_ready(xmlhttp_rpc)) {
|
||||||
printLockingError();
|
printLockingError();
|
||||||
|
@ -207,8 +207,18 @@ function selectionToggleUnread(cdm_mode) {
|
||||||
|
|
||||||
if (rows.length > 0) {
|
if (rows.length > 0) {
|
||||||
|
|
||||||
|
var cmode = "";
|
||||||
|
|
||||||
|
if (set_state == undefined) {
|
||||||
|
cmode = "2";
|
||||||
|
} else if (set_state == true) {
|
||||||
|
cmode = "1";
|
||||||
|
} else if (set_state == false) {
|
||||||
|
cmode = "0";
|
||||||
|
}
|
||||||
|
|
||||||
var query = "backend.php?op=rpc&subop=catchupSelected&ids=" +
|
var query = "backend.php?op=rpc&subop=catchupSelected&ids=" +
|
||||||
param_escape(rows.toString()) + "&cmode=2";
|
param_escape(rows.toString()) + "&cmode=" + cmode;
|
||||||
|
|
||||||
xmlhttp_rpc.open("GET", query, true);
|
xmlhttp_rpc.open("GET", query, true);
|
||||||
xmlhttp_rpc.onreadystatechange=all_counters_callback;
|
xmlhttp_rpc.onreadystatechange=all_counters_callback;
|
||||||
|
@ -320,9 +330,16 @@ function cdmSelectArticles(mode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function catchupPage() {
|
function catchupPage() {
|
||||||
selectTableRowsByIdPrefix('headlinesList', 'RROW-', 'RCHK-', true, 'Unread', true);
|
|
||||||
selectionToggleUnread();
|
if (document.getElementById("headlinesList")) {
|
||||||
selectTableRowsByIdPrefix('headlinesList', 'RROW-', 'RCHK-', false);
|
selectTableRowsByIdPrefix('headlinesList', 'RROW-', 'RCHK-', true, 'Unread', true);
|
||||||
|
selectionToggleUnread();
|
||||||
|
selectTableRowsByIdPrefix('headlinesList', 'RROW-', 'RCHK-', false);
|
||||||
|
} else {
|
||||||
|
cdmSelectArticles('all');
|
||||||
|
selectionToggleUnread(true, false)
|
||||||
|
cdmSelectArticles('none');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function labelFromSearch(search, search_mode, match_on, feed_id, is_cat) {
|
function labelFromSearch(search, search_mode, match_on, feed_id, is_cat) {
|
||||||
|
@ -359,7 +376,13 @@ function init() {
|
||||||
document.onkeydown = hotkey_handler;
|
document.onkeydown = hotkey_handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
var hw = document.getElementById("headlinesList").scrollHeight;
|
var hl = document.getElementById("headlinesList");
|
||||||
|
|
||||||
|
if (!hl) {
|
||||||
|
hl = document.getElementById("headlinesContainer");
|
||||||
|
}
|
||||||
|
|
||||||
|
var hw = hl.scrollHeight;
|
||||||
var pw = parent.document.getElementById("headlines").scrollHeight;
|
var pw = parent.document.getElementById("headlines").scrollHeight;
|
||||||
|
|
||||||
if (hw >= pw) {
|
if (hw >= pw) {
|
||||||
|
|
Loading…
Reference in New Issue