From c4f52830528ecd13e8f335d69a0f3b288c2766b3 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 25 Dec 2012 14:13:52 +0400 Subject: [PATCH] move to dijit checkboxes in headlines/cdm list --- classes/feeds.php | 3 ++- js/functions.js | 4 ---- js/tt-rss.js | 4 ++-- js/viewfeed.js | 32 ++++++++++++++++---------------- tt-rss.css | 1 + 5 files changed, 21 insertions(+), 23 deletions(-) diff --git a/classes/feeds.php b/classes/feeds.php index dfb3a4b2..d168bc1c 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -450,7 +450,8 @@ class Feeds extends Handler_Protected { $reply['content'] .= "
"; - $reply['content'] .= ""; $reply['content'] .= "$marked_pic"; diff --git a/js/functions.js b/js/functions.js index e80c860e..8776405b 100644 --- a/js/functions.js +++ b/js/functions.js @@ -346,10 +346,6 @@ function toggleSelectListRow2(sender) { return toggleSelectRow(sender, row); } -function tSR(sender, row) { - return toggleSelectRow(sender, row); -} - /* this is for dijit Checkbox */ function toggleSelectRow2(sender, row) { diff --git a/js/tt-rss.js b/js/tt-rss.js index 348d6bbd..56f7df65 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -786,10 +786,10 @@ function hotkey_handler(e) { if (keycode == 9) { // tab var id = getArticleUnderPointer(); if (id) { - var cb = $("RCHK-" + id); + var cb = dijit.byId("RCHK-" + id); if (cb) { - cb.checked = !cb.checked; + cb.attr("checked", !cb.attr("checked")); toggleSelectRowById(cb, "RROW-" + id); return false; } diff --git a/js/viewfeed.js b/js/viewfeed.js index c0cc416b..a8589c81 100644 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -586,16 +586,16 @@ function moveToPost(mode) { function toggleSelected(id, force_on) { try { - var cb = $("RCHK-" + id); + var cb = dijit.byId("RCHK-" + id); var row = $("RROW-" + id); if (row) { if (row.hasClassName('Selected') && !force_on) { row.removeClassName('Selected'); - if (cb) cb.checked = false; + if (cb) cb.attr("checked", false); } else { row.addClassName('Selected'); - if (cb) cb.checked = true; + if (cb) cb.attr("checked", true); } } } catch (e) { @@ -881,52 +881,52 @@ function selectArticles(mode) { children.each(function(child) { var id = child.id.replace("RROW-", ""); - var cb = $("RCHK-" + id); + var cb = dijit.byId("RCHK-" + id); if (mode == "all") { child.addClassName("Selected"); - cb.checked = true; + cb.attr("checked", true); } else if (mode == "unread") { if (child.hasClassName("Unread")) { child.addClassName("Selected"); - cb.checked = true; + cb.attr("checked", true); } else { child.removeClassName("Selected"); - cb.checked = false; + cb.attr("checked", false); } } else if (mode == "marked") { var img = $("FMPIC-" + child.id.replace("RROW-", "")); if (img && img.src.match("mark_set")) { child.addClassName("Selected"); - cb.checked = true; + cb.attr("checked", true); } else { child.removeClassName("Selected"); - cb.checked = false; + cb.attr("checked", false); } } else if (mode == "published") { var img = $("FPPIC-" + child.id.replace("RROW-", "")); if (img && img.src.match("pub_set")) { child.addClassName("Selected"); - cb.checked = true; + cb.attr("checked", true); } else { child.removeClassName("Selected"); - cb.checked = false; + cb.attr("checked", false); } } else if (mode == "invert") { if (child.hasClassName("Selected")) { child.removeClassName("Selected"); - cb.checked = false; + cb.attr("checked", false); } else { child.addClassName("Selected"); - cb.checked = true; + cb.attr("checked", true); } } else { child.removeClassName("Selected"); - cb.checked = false; + cb.attr("checked", false); } }); @@ -1751,10 +1751,10 @@ function isCdmMode() { function markHeadline(id) { var row = $("RROW-" + id); if (row) { - var check = $("RCHK-" + id); + var check = dijit.byId("RCHK-" + id); if (check) { - check.checked = true; + check.attr("checked", true); } row.addClassName("Selected"); diff --git a/tt-rss.css b/tt-rss.css index 1e89360b..0757df47 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -653,6 +653,7 @@ span.hlFeed a:hover { img.markedPic { cursor : pointer; + vertical-align : middle; } a.warning { -- 2.39.5