diff options
Diffstat (limited to 'js/Headlines.js')
-rwxr-xr-x | js/Headlines.js | 34 |
1 files changed, 5 insertions, 29 deletions
diff --git a/js/Headlines.js b/js/Headlines.js index 00b7f88f4..e0caddc2a 100755 --- a/js/Headlines.js +++ b/js/Headlines.js @@ -173,15 +173,11 @@ define(["dojo/_base/declare"], function (declare) { ft.setAttribute("data-article-id", id); ft.innerHTML = header.innerHTML; - ft.firstChild.innerHTML = "<img class='anchor marked-pic' src='images/page_white_go.png' " + - "onclick=\"Article.cdmScrollToId(" + id + ", true)\">" + ft.firstChild.innerHTML; - this.initFloatingMenu(); + ft.select(".dijitCheckBox")[0].outerHTML = "<i class=\"material-icons anchor\" onclick=\"Article.cdmScrollToId(" + id + ", true)\">expand_more</i>"; - const cb = ft.select(".rchk")[0]; + this.initFloatingMenu(); - if (cb) - cb.parentNode.removeChild(cb); } if (row.hasClassName("Unread")) @@ -498,19 +494,9 @@ define(["dojo/_base/declare"], function (declare) { const row = $("RROW-" + id); if (row) { - const imgs = $$("img[class*=marked-pic][class*=marked-" + id + "]"); - - imgs.each((img) => { - if (!row.hasClassName("marked")) { - img.src = img.src.replace("mark_unset", "mark_set"); - query.mark = 1; - } else { - img.src = img.src.replace("mark_set", "mark_unset"); - query.mark = 0; - } - }); row.toggleClassName("marked"); + query.mark = row.hasClassName("marked") ? 1 : 0; if (!client_only) xhrPost("backend.php", query, (transport) => { @@ -524,19 +510,8 @@ define(["dojo/_base/declare"], function (declare) { if (row) { const query = {op: "rpc", id: id, method: "publ"}; - const imgs = $$("img[class*=pub-pic][class*=pub-" + id + "]"); - - imgs.each((img) => { - if (!row.hasClassName("published")) { - img.src = img.src.replace("pub_unset", "pub_set"); - query.pub = 1; - } else { - img.src = img.src.replace("pub_set", "pub_unset"); - query.pub = 0; - } - }); - row.toggleClassName("published"); + query.pub = row.hasClassName("published") ? 1 : 0; if (!client_only) xhrPost("backend.php", query, (transport) => { @@ -1026,6 +1001,7 @@ define(["dojo/_base/declare"], function (declare) { const menu = new dijit.Menu({ id: "floatingMenu", + selector: ".hlMenuAttach", targetNodeIds: ["floatingTitle"] }); |