|
|
|
@ -444,7 +444,21 @@ function toggleMark(id, client_only) {
|
|
|
|
|
var row = $("RROW-" + id);
|
|
|
|
|
if (!row) return;
|
|
|
|
|
|
|
|
|
|
var imgs = row.getElementsByClassName("markedPic");
|
|
|
|
|
var imgs = [];
|
|
|
|
|
|
|
|
|
|
var row_imgs = row.getElementsByClassName("markedPic");
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < row_imgs.length; i++)
|
|
|
|
|
imgs.push(row_imgs[i]);
|
|
|
|
|
|
|
|
|
|
var ft = $("floatingTitle");
|
|
|
|
|
|
|
|
|
|
if (ft && ft.getAttribute("rowid") == "RROW-" + id) {
|
|
|
|
|
var fte = ft.getElementsByClassName("markedPic");
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < fte.length; i++)
|
|
|
|
|
imgs.push(fte[i]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < imgs.length; i++) {
|
|
|
|
|
var img = imgs[i];
|
|
|
|
@ -488,7 +502,21 @@ function togglePub(id, client_only, no_effects, note) {
|
|
|
|
|
var row = $("RROW-" + id);
|
|
|
|
|
if (!row) return;
|
|
|
|
|
|
|
|
|
|
var imgs = row.getElementsByClassName("pubPic");
|
|
|
|
|
var imgs = [];
|
|
|
|
|
|
|
|
|
|
var row_imgs = row.getElementsByClassName("pubPic");
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < row_imgs.length; i++)
|
|
|
|
|
imgs.push(row_imgs[i]);
|
|
|
|
|
|
|
|
|
|
var ft = $("floatingTitle");
|
|
|
|
|
|
|
|
|
|
if (ft && ft.getAttribute("rowid") == "RROW-" + id) {
|
|
|
|
|
var fte = ft.getElementsByClassName("pubPic");
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < fte.length; i++)
|
|
|
|
|
imgs.push(fte[i]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < imgs.length; i++) {
|
|
|
|
|
var img = imgs[i];
|
|
|
|
@ -1280,6 +1308,10 @@ function headlines_scroll_handler(e) {
|
|
|
|
|
if (hsp) hsp.innerHTML = "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (getInitParam("cdm_expanded") && isCdmMode()) {
|
|
|
|
|
updateFloatingTitle();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (getInitParam("cdm_auto_catchup") == 1) {
|
|
|
|
|
|
|
|
|
|
// let's get DOM some time to settle down
|
|
|
|
@ -2157,3 +2189,34 @@ function openSelectedAttachment(elem) {
|
|
|
|
|
exception_error("openSelectedAttachment", e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function updateFloatingTitle() {
|
|
|
|
|
try {
|
|
|
|
|
var hf = $("headlines-frame");
|
|
|
|
|
|
|
|
|
|
var elems = $$("#headlines-frame > div[id*=RROW]");
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < elems.length; i++) {
|
|
|
|
|
var child = elems[i];
|
|
|
|
|
|
|
|
|
|
if (child.offsetTop + child.offsetHeight > hf.scrollTop) {
|
|
|
|
|
|
|
|
|
|
var header = child.getElementsByClassName("cdmHeader")[0];
|
|
|
|
|
|
|
|
|
|
$("floatingTitle").setAttribute("rowid", child.id);
|
|
|
|
|
$("floatingTitle").innerHTML =
|
|
|
|
|
header.innerHTML;
|
|
|
|
|
|
|
|
|
|
if (child.offsetTop < hf.scrollTop - header.offsetHeight - 100 &&
|
|
|
|
|
child.offsetTop + child.offsetHeight - hf.scrollTop > 100)
|
|
|
|
|
Element.show("floatingTitle");
|
|
|
|
|
else
|
|
|
|
|
Element.hide("floatingTitle");
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
exception_error("updateFloatingTitle", e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|