]> git.wh0rd.org Git - tt-rss.git/commitdiff
selectTableRowsByIdPrefix now checks required checkboxes
authorAndrew Dolgov <fox@bah.spb.su>
Fri, 25 Nov 2005 15:48:24 +0000 (16:48 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Fri, 25 Nov 2005 15:48:24 +0000 (16:48 +0100)
backend.php
functions.js

index e0616483df3196c68ef44f292de8810ec40bf698..3a07a0f2395475ed10dd7a5872edd812ed25188c 100644 (file)
                        print "<tr><td class=\"selectPrompt\" colspan=\"8\">
                                Select: 
                                        <a href=\"javascript:selectTableRowsByIdPrefix('prefFeedList', 
-                                               'FEEDR-', true)\">All</a>,
+                                               'FEEDR-', 'FRCHK-', true)\">All</a>,
                                        <a href=\"javascript:selectTableRowsByIdPrefix('prefFeedList', 
-                                               'FEEDR-', false)\">None</a>
+                                               'FEEDR-', 'FRCHK-', false)\">None</a>
                                </td</tr>";
 
                        print "<tr class=\"title\">
                                print "<tr><td class=\"selectPrompt\" colspan=\"8\">
                                Select: 
                                        <a href=\"javascript:selectTableRowsByIdPrefix('prefFeedCatList', 
-                                               'FCATR-', true)\">All</a>,
+                                               'FCATR-', 'FCCHK-', true)\">All</a>,
                                        <a href=\"javascript:selectTableRowsByIdPrefix('prefFeedCatList', 
-                                               'FCATR-', false)\">None</a>
+                                               'FCATR-', 'FCCHK-', false)\">None</a>
                                </td</tr>";
 
                                print "<tr class=\"title\">
                        print "<tr><td class=\"selectPrompt\" colspan=\"8\">
                                Select: 
                                        <a href=\"javascript:selectTableRowsByIdPrefix('prefFilterList', 
-                                               'FILRR-', true)\">All</a>,
+                                               'FILRR-', 'FICHK-', true)\">All</a>,
                                        <a href=\"javascript:selectTableRowsByIdPrefix('prefFilterList', 
-                                               'FILRR-', false)\">None</a>
+                                               'FILRR-', 'FICHK-', false)\">None</a>
                                </td</tr>";
 
                        print "<tr class=\"title\">
                        print "<tr><td class=\"selectPrompt\" colspan=\"8\">
                                Select: 
                                        <a href=\"javascript:selectTableRowsByIdPrefix('prefLabelList', 
-                                               'LILRR-', true)\">All</a>,
+                                               'LILRR-', 'LICHK-', true)\">All</a>,
                                        <a href=\"javascript:selectTableRowsByIdPrefix('prefLabelList', 
-                                               'LILRR-', false)\">None</a>
+                                               'LILRR-', 'LICHK-', false)\">None</a>
                                </td</tr>";
 
                        print "<tr class=\"title\">
                print "<tr><td class=\"selectPrompt\" colspan=\"8\">
                                Select: 
                                        <a href=\"javascript:selectTableRowsByIdPrefix('prefUserList', 
-                                               'UMRR-', true)\">All</a>,
+                                               'UMRR-', 'UMCHK-', true)\">All</a>,
                                        <a href=\"javascript:selectTableRowsByIdPrefix('prefUserList', 
-                                               'UMRR-', false)\">None</a>
+                                               'UMRR-', 'UMCHK-', false)\">None</a>
                                </td</tr>";
 
                print "<tr class=\"title\">
index 83246bfdaafda974a22976cd512b9c4537ea4842..d236c4e18f7dca1134024aa86cc472fab0b1bf0d 100644 (file)
@@ -461,7 +461,7 @@ function selectTableRow(r, do_select) {
        }
 }
 
-function selectTableRowsByIdPrefix(content_id, prefix, do_select) {
+function selectTableRowsByIdPrefix(content_id, prefix, check_prefix, do_select) {
 
        var content = document.getElementById(content_id);
 
@@ -474,6 +474,13 @@ function selectTableRowsByIdPrefix(content_id, prefix, do_select) {
                if (content.rows[i].id.match(prefix)) {
                        selectTableRow(content.rows[i], do_select);
                }
+
+               var row_id = content.rows[i].id.replace(prefix, "");
+               var check = document.getElementById(check_prefix + row_id);
+
+               if (check) {
+                       check.checked = do_select;
+               }
        }
 }