From: Andrew Dolgov Date: Fri, 8 Dec 2006 08:05:21 +0000 (+0100) Subject: move filterDlgCheckAction() to functions.js X-Git-Tag: 1.2.6~5 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=350f0ad1859b5b530840b4610a2a30bcb3cdbb5f;p=tt-rss.git move filterDlgCheckAction() to functions.js --- diff --git a/functions.js b/functions.js index 2e7ad680..b5cf29b2 100644 --- a/functions.js +++ b/functions.js @@ -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"); + } + +} diff --git a/prefs.js b/prefs.js index 37b73835..21aa56f5 100644 --- 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"); - } - -}