}
+div#floatingTitle {
+ position : absolute;
+ z-index : 5;
+ top : 30px;
+ right : 20px;
+ border : 1px solid #ccc;
+ background : white;
+ border-radius : 3px;
+ box-shadow : 0px 0px 3px 0px rgba(0,0,0,0.1);
+ color : #555;
+ font-size : 10px;
+ padding : 3px;
+}
+
+div#floatingTitle > * {
+ display : table-cell;
+ white-space : nowrap;
+ vertical-align : middle;
+}
+
+div#floatingTitle img {
+ padding-right : 3px;
+}
+
+div#floatingTitle .dijit,
+div#floatingTitle span.updated,
+div#floatingTitle div.scoreWrap,
+div#floatingTitle div.hlFeed,
+div#floatingTitle span.author,
+div#floatingTitle img.tinyFeedIcon {
+ display : none;
+}
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];
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];
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
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);
+ }
+}