]> git.wh0rd.org - tt-rss.git/blobdiff - functions.js
implement test button in filter dialogs
[tt-rss.git] / functions.js
index 3b18b00725059f6037ce6ac6f9d05b864cd41f57..ee92674eb74d7dcc8bdfe0ea416e4eb79b2693b9 100644 (file)
@@ -969,6 +969,24 @@ function quickAddFilter() {
                        id: "filterEditDlg",
                        title: __("Create Filter"),
                        style: "width: 600px",
+                       test: function() {
+                               if (this.validate()) {
+
+                                       if (dijit.byId("filterTestDlg"))
+                                               dijit.byId("filterTestDlg").destroyRecursive();
+
+                                       tdialog = new dijit.Dialog({
+                                               id: "filterTestDlg",
+                                               title: __("Filter Test Results"),
+                                               style: "width: 600px",
+                                               href: "backend.php?savemode=test&" +
+                                                       dojo.objectToQuery(dialog.attr('value')),
+                                               });
+
+                                       tdialog.show();
+
+                               }
+                       },
                        execute: function() {
                                if (this.validate()) {