]> git.wh0rd.org Git - tt-rss.git/commitdiff
remove RCHK
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 6 Apr 2013 20:52:39 +0000 (00:52 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 6 Apr 2013 20:52:39 +0000 (00:52 +0400)
classes/feeds.php
js/tt-rss.js
js/viewfeed.js

index 1d0bb5293f0d5c5f13b106ab50cab83cb2aab2c5..ed0785c092af25f17457ac1f735ec9aa62dcea73 100644 (file)
@@ -457,7 +457,7 @@ class Feeds extends Handler_Protected {
 
                                        $reply['content'] .= "<input dojoType=\"dijit.form.CheckBox\"
                                                        type=\"checkbox\" onclick=\"toggleSelectRow2(this)\"
-                                                       id=\"RCHK-$id\">";
+                                                       class='rchk'>";
 
                                        $reply['content'] .= "$marked_pic";
                                        $reply['content'] .= "$published_pic";
@@ -563,7 +563,7 @@ class Feeds extends Handler_Protected {
 
                                        $reply['content'] .= "<input dojoType=\"dijit.form.CheckBox\"
                                                        type=\"checkbox\" onclick=\"toggleSelectRow2(this, false, true)\"
-                                                       id=\"RCHK-$id\">";
+                                                       class='rchk'>";
 
                                        $reply['content'] .= "$marked_pic";
                                        $reply['content'] .= "$published_pic";
index 8c5a657491087500995a7237f316f88cbf12424c..a572e532411a3e643b740ded65fc7fb6500b0628 100644 (file)
@@ -452,11 +452,17 @@ function init() {
                hotkey_actions["select_article_cursor"] = function() {
                                var id = getArticleUnderPointer();
                                if (id) {
-                                       var cb = dijit.byId("RCHK-" + id);
-                                       if (cb) {
-                                               cb.attr("checked", !cb.attr("checked"));
-                                               toggleSelectRowById(cb, "RROW-" + id);
-                                               return false;
+                                       var row = $("RROW-" + id);
+
+                                       if (row) {
+                                               var cb = dijit.getEnclosingWidget(
+                                                       row.getElementsByClassName("rchk")[0]);
+
+                                               if (cb) {
+                                                       cb.attr("checked", !cb.attr("checked"));
+                                                       toggleSelectRowById(cb, "RROW-" + id);
+                                                       return false;
+                                               }
                                        }
                                }
                };
index 108d27ea4dc53855fdf71dee3ef083cde1e30b10..f8a7f373d58ecd2a93c19399a7c3e2a3aa4f6639 100644 (file)
@@ -160,16 +160,10 @@ function headlines_callback2(transport, offset, background, infscroll_req) {
                                        initHeadlinesMenu();
 
                                        new_elems.each(function(child) {
-                                               var cb = dijit.byId(child.id.replace("RROW-", "RCHK-"));
+                                               dojo.parser.parse(child);
 
-                                               if (!cb) {
-                                                       dojo.parser.parse(child);
-
-                                                       if (!Element.visible(child))
-                                                               new Effect.Appear(child, { duration : 0.5 });
-                                               } else {
-                                                       c.domNode.removeChild(child);
-                                               }
+                                               if (!Element.visible(child))
+                                                       new Effect.Appear(child, { duration : 0.5 });
                                        });
 
                                } else {
@@ -617,11 +611,12 @@ function moveToPost(mode, noscroll, noexpand) {
 
 function toggleSelected(id, force_on) {
        try {
-
-               var cb = dijit.byId("RCHK-" + id);
                var row = $("RROW-" + id);
 
                if (row) {
+                       var cb = dijit.getEnclosingWidget(
+                                       row.getElementsByClassName("rchk")[0]);
+
                        if (row.hasClassName('Selected') && !force_on) {
                                row.removeClassName('Selected');
                                if (cb) cb.attr("checked", false);
@@ -904,7 +899,9 @@ function selectArticles(mode) {
 
                children.each(function(child) {
                        var id = child.id.replace("RROW-", "");
-                       var cb = dijit.byId("RCHK-" + id);
+
+                       var cb = dijit.getEnclosingWidget(
+                                       child.getElementsByClassName("rchk")[0]);
 
                        if (mode == "all") {
                                child.addClassName("Selected");
@@ -1739,7 +1736,8 @@ function markHeadline(id, marked) {
 
        var row = $("RROW-" + id);
        if (row) {
-               var check = dijit.byId("RCHK-" + id);
+               var check = dijit.getEnclosingWidget(
+                               row.getElementsByClassName("rchk")[0]);
 
                if (check) {
                        check.attr("checked", marked);