From 693b6ec6fa26c0d1d818638f2f949a50aba7382a Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Thu, 28 Aug 2003 10:36:34 +0000 Subject: [PATCH] Opera7 compatibility cvs upcvs upcvs upcvs up! some IE ameliorations, still buggy --- philter/philter/include/philter.js | 31 ++-- philter/philter/include/philter.js2 | 211 ----------------------- philter/philter/include/plugin_autoreply.inc.php | 3 +- philter/philter/index.php | 22 +-- 4 files changed, 31 insertions(+), 236 deletions(-) delete mode 100644 philter/philter/include/philter.js2 diff --git a/philter/philter/include/philter.js b/philter/philter/include/philter.js index 834f07c..f7a9c6a 100644 --- a/philter/philter/include/philter.js +++ b/philter/philter/include/philter.js @@ -6,6 +6,14 @@ * Copyright: See COPYING files that comes with this distribution ********************************************************************************/ +function ta_onfocus(obj) { + obj.setAttribute('rows', '10'); +} + +function ta_onblur(obj) { + obj.setAttribute('rows', '2'); +} + function text_onfocus(object,val) { if(object.value == val) object.value = ''; @@ -21,15 +29,11 @@ function cleanChilds(Node, nbChilds) { Node.removeChild(Node.childNodes[nbChilds]); } -function getElement(obj) { - return getNthElement(obj,0); -} - -function getNthElement(obj, index) { - if(document.getElementsByName) - return document.getElementsByName(obj)[index]; +function getElement(obj, index) { + if(document.getElementById) + return document.getElementById(obj); if(document.all) - return document.all[obj][index]; + return document.all[obj]; } /********** ORDER FORM FUNCTIONS **********/ @@ -138,7 +142,7 @@ function createActionRow(Node,data) { } function newAction() { - createActionRow(getElement('actions_row'), 0); + createActionRow(getElement('actionsRow'), [-1]); } /********** RULE.MATCH FORM FUNCTIONS **********/ @@ -181,7 +185,7 @@ function createMatchRow(Node,data) { } function newMatch() { - createMatchRow(getElement('matches_row'), 0); + createMatchRow(getElement('matchesRow'), [-1]); } /********** RULE FORM FUNCTIONS **********/ @@ -202,15 +206,16 @@ function createRuleForm() { getElement('rule[id]').value = index; getElement('rule[name]').value = current_rule.name; - getNthElement('rule[all]',[1-current_rule.all]).checked = true; + var c = (current_rule.all ? '1' : '0'); + getElement('rule[all'+c+']').checked = true; getElement('rule[block]').checked = current_rule.block; - var mr = getElement('matches_row'); + var mr = getElement('matchesRow'); cleanChilds(mr,0); for(i=0; inbChilds) - Node.removeChild(Node.childNodes[nbChilds]); -} - -/********** ORDER FORM FUNCTIONS **********/ - -function order_up() { - form = document.forms['order']; - select = form.elements['order[select]']; - - if(select.selectedIndex>1) { - i = select.selectedIndex; - value1 = select.options[i].value; - text1 = select.options[i].text; - value2 = select.options[i-1].value; - text2 = select.options[i-1].text; - - select.options[i] = new Option(text2,value2,false,false); - select.options[i-1] = new Option(text1,value1,false,false); - select.selectedIndex = i-1; - - form.elements['order['+value1+']'].value = i-1; - form.elements['order['+value2+']'].value = i; - } -} - -function order_dn() { - form = document.forms['order']; - select = form.elements['order[select]']; - - if(select.selectedIndex>0 && select.selectedIndex\n\n";
Filtering rules
-
+ \n
rules as $id=>$rule) - echo "rank}\" />\n"; + echo "rank}\" />\n"; $presel = (isset($_POST['rule']['id']) ? $_POST['rule']['id'] : (isset($_POST['order']['select']) ? $_POST['order']['select'] : 0)); - echo "\n"; echo "\n"; @@ -104,23 +104,23 @@ echo "
\n";
-
+
Rule Configuration
- + Name of this rule : -
- All matches - One match + All matches + One match
- Blocking Rule + Blocking Rule
Matches List -
+
Actions List -
+
-- 2.1.4