]> git.wh0rd.org Git - tt-rss.git/commitdiff
implement select all/none in filterEditDlg
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 31 Aug 2012 08:38:45 +0000 (12:38 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 31 Aug 2012 08:38:45 +0000 (12:38 +0400)
js/functions.js
js/prefs.js

index f2c5e3bf5f9cd1c7902bc7e7a4860099479d443c..284b2cc563cd733e593348b3299b07873b74327d 100644 (file)
@@ -1105,6 +1105,26 @@ function quickAddFilter() {
                        id: "filterEditDlg",
                        title: __("Create Filter"),
                        style: "width: 600px",
+                       selectRules: function(select) {
+                               $$("#filterDlg_Matches input[type=checkbox]").each(function(e) {
+                                       e.checked = select;
+                                       if (select)
+                                               e.parentNode.addClassName("Selected");
+                                       else
+                                               e.parentNode.removeClassName("Selected");
+                               });
+                       },
+                       selectActions: function(select) {
+                               $$("#filterDlg_Actions input[type=checkbox]").each(function(e) {
+                                       e.checked = select;
+
+                                       if (select)
+                                               e.parentNode.addClassName("Selected");
+                                       else
+                                               e.parentNode.removeClassName("Selected");
+
+                               });
+                       },
                        editRule: function(e) {
                                var li = e.parentNode;
                                var rule = li.getElementsByTagName("INPUT")[1].value;
index 1fbbc55a58c8654a87d218e6a9dd0075fe145c60..72d253a95cca9f749caaa6d16be9b9ed285ead86 100644 (file)
@@ -136,6 +136,26 @@ function editFilter(id) {
                        id: "filterEditDlg",
                        title: __("Edit Filter"),
                        style: "width: 600px",
+                       selectRules: function(select) {
+                               $$("#filterDlg_Matches input[type=checkbox]").each(function(e) {
+                                       e.checked = select;
+                                       if (select)
+                                               e.parentNode.addClassName("Selected");
+                                       else
+                                               e.parentNode.removeClassName("Selected");
+                               });
+                       },
+                       selectActions: function(select) {
+                               $$("#filterDlg_Actions input[type=checkbox]").each(function(e) {
+                                       e.checked = select;
+
+                                       if (select)
+                                               e.parentNode.addClassName("Selected");
+                                       else
+                                               e.parentNode.removeClassName("Selected");
+
+                               });
+                       },
                        editRule: function(e) {
                                var li = e.parentNode;
                                var rule = li.getElementsByTagName("INPUT")[1].value;