]> git.wh0rd.org Git - tt-rss.git/commitdiff
move to dijit checkboxes in headlines/cdm list
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 25 Dec 2012 10:13:52 +0000 (14:13 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 25 Dec 2012 10:13:52 +0000 (14:13 +0400)
classes/feeds.php
js/functions.js
js/tt-rss.js
js/viewfeed.js
tt-rss.css

index dfb3a4b266fe4ebbbb4f7fe416be5476de3aab26..d168bc1c215d08010b4586afcd8e1d96e74b69c5 100644 (file)
@@ -450,7 +450,8 @@ class Feeds extends Handler_Protected {
 \r
                                        $reply['content'] .= "<div class='hlLeft'>";\r
 \r
-                                       $reply['content'] .= "<input type=\"checkbox\" onclick=\"tSR(this)\"\r
+                                       $reply['content'] .= "<input dojoType=\"dijit.form.CheckBox\"\r
+                                                       type=\"checkbox\" onclick=\"toggleSelectRow2(this)\"\r
                                                        id=\"RCHK-$id\">";\r
 \r
                                        $reply['content'] .= "$marked_pic";\r
index e80c860e0e85b7173d9e3e696c77d1ba56c69a28..8776405be8ef357fa0631c88669d033723f3e3d7 100644 (file)
@@ -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) {
 
index 348d6bbd6a360e631bedde021ad75c845de0e7d6..56f7df65d5293427cc808cb550da49fae299fac4 100644 (file)
@@ -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;
                                        }
index c0cc416b6587ecd0929b3c60d687ee3144b21fca..a8589c81cff7b3a4fef6b0e96a4f0b2e0acc6c19 100644 (file)
@@ -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");
index 1e89360b585c1478cdad8fc93deaf7da0ef47ff5..0757df478b3f5f902e8c2c6f902b4facb62a6f53 100644 (file)
@@ -653,6 +653,7 @@ span.hlFeed a:hover {
 
 img.markedPic {
        cursor : pointer;
+       vertical-align : middle;
 }
 
 a.warning {