]> git.wh0rd.org - tt-rss.git/commitdiff
move filterDlgCheckAction() to functions.js
authorAndrew Dolgov <fox@madoka.spb.ru>
Fri, 8 Dec 2006 08:05:21 +0000 (09:05 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Fri, 8 Dec 2006 08:05:21 +0000 (09:05 +0100)
functions.js
prefs.js

index 2e7ad680700dcb4bb193492a782f9961e5c34045..b5cf29b266b3eb7a8f426ae3c8f4112ce408909e 100644 (file)
@@ -1527,3 +1527,40 @@ function getFeedName(id, is_cat) {
 function viewContentUrl(url) {
        getContentContext().location = url;
 }
+
+function filterDlgCheckAction(sender) {
+
+       try {
+
+               var action = sender[sender.selectedIndex].value;
+
+               var form = document.forms["filter_add_form"];
+       
+               if (!form) {
+                       form = document.forms["filter_edit_form"];
+               }
+
+               if (!form) {
+                       debug("filterDlgCheckAction: can't find form!");
+                       return;
+               }
+
+               var action_param = form.action_param;
+
+               if (!action_param) {
+                       debug("filterDlgCheckAction: can't find action param!");
+                       return;
+               }
+
+               // if selected action supports parameters, enable params field
+               if (action == 4) {
+                       action_param.disabled = false;
+               } else {
+                       action_param.disabled = true;
+               }
+
+       } catch (e) {
+               exception_error(e, "filterDlgCheckAction");
+       }
+
+}
index 37b738358910182b9d82e4dd85f5b38221a68204..21aa56f54d84626c531476bae75293d23a1480a6 100644 (file)
--- a/prefs.js
+++ b/prefs.js
@@ -1549,39 +1549,4 @@ function showFeedsWithErrors() {
        displayDlg('feedUpdateErrors');
 }
 
-function filterDlgCheckAction(sender) {
 
-       try {
-
-               var action = sender[sender.selectedIndex].value;
-
-               var form = document.forms["filter_add_form"];
-       
-               if (!form) {
-                       form = document.forms["filter_edit_form"];
-               }
-
-               if (!form) {
-                       debug("filterDlgCheckAction: can't find form!");
-                       return;
-               }
-
-               var action_param = form.action_param;
-
-               if (!action_param) {
-                       debug("filterDlgCheckAction: can't find action param!");
-                       return;
-               }
-
-               // if selected action supports parameters, enable params field
-               if (action == 4) {
-                       action_param.disabled = false;
-               } else {
-                       action_param.disabled = true;
-               }
-
-       } catch (e) {
-               exception_error(e, "filterDlgCheckAction");
-       }
-
-}