relooking
authorPierre Habouzit <madcoder@debian.org>
Tue, 9 Sep 2003 15:21:42 +0000 (15:21 +0000)
committerPierre Habouzit <madcoder@debian.org>
Tue, 9 Sep 2003 15:21:42 +0000 (15:21 +0000)
philter/philter/css/default.css
philter/philter/include/emails.inc.php
philter/philter/include/plugin_bogofilter.inc.php
philter/philter/index.php
philter/philter/philter.js

index 72d20e5..9d1b45b 100644 (file)
@@ -47,12 +47,16 @@ table.bicol tr.impair {
     background-color: #cccccc;
 }
 
-/********** DIV **********/
-
-div.row {
-    padding: 2px;
+table.bicol div {
+    padding: 3px;
+    border-bottom: 1px solid;
 }
 
+div.rubrique {
+    border-top: 1px solid #000080;
+    border-bottom: 1px solid #000080;
+    background: #cccccc;
+}
 /********************************************************************************
 * $id: header.inc.php,v 1.2 2003/08/03 16:02:41 madcoder exp $
 * vim: set expandtab shiftwidth=4 tabstop=4 softtabstop=4 textwidth=100 nocin:
index 766d91c..e83b5b4 100644 (file)
@@ -98,33 +98,38 @@ class EmailPool {
      */
     function to_form() {
         $res = "<form action=\"{$_SERVER['REQUEST_URI']}\" method=\"post\" onsubmit=\"return del_onsubmit()\">\n"
-            .  "<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n";
+            .  "<table class=\"bicol\" cellpadding=\"1\" cellspacing=\"1\" width=\"95%\" align=\"center\">\n"
+            .  "<tr><th>Email</th>\n"
+            .  "    <th>Active</th>\n"
+            .  "    <th>&nbsp;</th>\n"
+            .  "</tr>\n";
 
         $pair = true;
+
         foreach($this->emails as $id => $email) {
-            $res .= "<tr class=\"".($pair?"pair":"impair")."\"><td>\n"
-                .   "        <input type=\"checkbox\" name=\"emails[$id][active]\""
-                    . ($email->is_active() ? " checked=\"checked\"" : "")." /> ".$email->email."\n"
-                .   "</td><td><input type=\"submit\" name=\"emails[$id][del]\" value=\"Del\" /></td>\n"
+            $res .= "<tr class=\"".($pair?"pair":"impair")."\">\n"
+                .   "<td>".$email->email."</td>\n"
+                .   "<td align=\"center\" width=\"10%\">\n"
+                .   "    <input type=\"checkbox\" name=\"emails[$id][active]\""
+                .   ($email->is_active() ? " checked=\"checked\"" : "")." /></td>\n"
+                .   "<td><input type=\"submit\" name=\"emails[$id][del]\" value=\"Del\" /></td>\n"
                 .   "</tr>\n";
             $pair = !$pair;
         }
 
-        $res .= "<tr><td colspan=\"2\">\n"
-            .   "    <input type=\"submit\" name=\"emails[apply]\" value=\"Apply changes\" /></td>\n"
-            .   "</tr>\n"
-            .   "</table>\n</form>\n";
+        $res .= "</table>\n"
+            .   "<center>\n"
+            .   "    <input type=\"submit\" name=\"emails[apply]\" value=\"Apply changes\" />\n"
+            .   "</center>\n"
+            .   "</form>\n";
 
         $val = 'your email ...';
         
         $res .= "<form action=\"{$_SERVER['REQUEST_URI']}\" method=\"post\">\n"
-            .   "<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n"
-            .   "<tr><td colspan=\"2\">\n"
-            .   "   <input type=\"text\" name=\"emails[new]\" size=\"60\" value='$val' "
-            .   "onfocus=\"text_onfocus(this,'$val')\" onblur=\"text_onblur(this,'$val')\" />\n"
-            .   "   <input type=\"submit\" name=\"emails[add]\" value=\"Add\" />\n"
-            .   "</td></tr>\n"
-            .   "</table>\n</form>\n";
+            .   "<input type=\"text\" name=\"emails[new]\" size=\"50\" value='$val' "
+            .   "    onfocus=\"text_onfocus(this,'$val')\" onblur=\"text_onblur(this,'$val')\" />\n"
+            .   "<input type=\"submit\" name=\"emails[add]\" value=\"Add\" />\n"
+            .   "</form>\n";
         
         return $res;
     }
index 4e2efe4..cb0243a 100644 (file)
@@ -42,7 +42,7 @@ class BogoPlugin extends MatchPlugin {
     }
 
     function to_form() {
-        $res =  "<table width=\"100%\">\n"
+        $res =  "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"1\">\n"
             .   "<tr><th width=\"25%\">BogoFilter</th>\n";
 
         $res .= "<td>TODO</td>\n";
index cb7a870..bdddba1 100644 (file)
@@ -38,11 +38,13 @@ if(count($_POST)) {                             // a FORM has been submitted
 require("include/js_factory.inc.php");
 
 /********** globals plugins **********/
-
+?>
+<div class="rubrique">The global configuration
+</div>
+<?php
 if(count($philter->config['global_plugin'])) {
     echo "<form action=\"{$_SERVER['REQUEST_URI']}\" method=\"post\">\n"
-        ."<table width=\"100%\" class=\"bicol\">\n"
-        ."<tr><th>Global rules</th></tr>\n";
+        ."<table width=\"95%\" class=\"bicol\" cellspacing=\"1\" cellpadding=\"1\" align=\"center\">\n";
 
     foreach($philter->config['global_plugin'] as $g_plugin) {
         echo "<tr><td>\n";
@@ -57,24 +59,23 @@ if(count($philter->config['global_plugin'])) {
 
 /********** emails **********/
 ?>
-
-<table width="100%" class="bicol">
-<tr><th>Emails pool</th></tr>
-<tr><td>
+<br />
+<div class="rubrique">The redirection address pool
+</div>
 <?php
 echo $mail_pool->to_form();
-?>
-</td></tr></table>
 
-<?php
 /********** filters **********/
 ?>
 
-<table width="100%" class="bicol">
-<tr class="impair"><th colspan="2">Filtering rules</th></tr>
-<tr class="impair"><td width="25%" valign="top">
+<br />
+<div class="rubrique">The individuals rules
+</div>
+<table width="95%" cellspacing="0" cellpadding="2" align="center">
+<tr><td width="25%" valign="top">
         <form action="<?php echo $_SERVER['REQUEST_URI']?>" method="post" id="order" name="order" onsubmit="return false;">
-        <table width="100%">
+        <table class="bicol" width="100%" cellpadding="1" cellspacing="1">
+        <tr><th>Filter List</th></tr>
         <tr><td>
 <?php
             foreach($filter->rules as $id=>$rule)
@@ -95,7 +96,7 @@ echo $mail_pool->to_form();
             </select>
         </td></tr><tr><td>
             <input type="submit" value="Up" name="order[up]" onclick="order_up();" />
-            <input type="submit" value="Down" name="order[dn]" onclick="order_dn();" />
+            <input type="submit" value="Down" name="order[dn]" onclick="order_dn();" /><br />
             <input type="submit" value="Delete" name="order[delete]" onclick="order_submit(this)" />
             <input type="submit" value="Submit" name="order[submit]" onclick="order_submit(this)" />
             <input type="hidden" value="" name="order[action]" />
@@ -105,9 +106,9 @@ echo $mail_pool->to_form();
     </td>
     <td valign="top">
         <form action="<?php echo $_SERVER['REQUEST_URI']?>" method="post" id="rule" name="rule" onsubmit="return false;">
-        <table width="100%" class="bicol">
-        <tr class="pair"><th>Rule Configuration
-        </th></tr><tr class="pair"><td>
+        <table width="100%" class="bicol" cellspacing="1" cellpadding="1">
+        <tr class="impair"><th>Rule Configuration
+        </th></tr><tr class="impair"><td>
             <input type="hidden" value="0" id="ruleId" name="rule[id]" />
             Name of this rule :
             <input type="text" size="60" value="" id="ruleName" name="rule[name]"
@@ -117,10 +118,10 @@ echo $mail_pool->to_form();
             <input type="radio" value="0" id="ruleAll0" name="rule[all]" />One match
             <br />
             <input type="checkbox" checked="checked" id="ruleBlock" name="rule[block]" />Blocking Rule
-        </td></tr><tr class="pair"><th>Matches List
-        </th></tr><tr class="pair"><td id="matchesRow">
-        </td></tr><tr class="pair"><th>Actions List
-        </th></tr><tr class="pair"><td id="actionsRow">
+        </td></tr><tr class="impair"><th>Matches List
+        </th></tr><tr class="impair"><td id="matchesRow">
+        </td></tr><tr class="impair"><th>Actions List
+        </th></tr><tr class="impair"><td id="actionsRow">
         </td></tr><tr class="impair"><td>
             <input type="submit" value="New Match" name="rule[new_match]" onclick="newMatch() "/>
             <input type="submit" value="New Action" name="rule[new_action]" onclick="newAction()" />
index f3686bd..4205314 100644 (file)
@@ -120,7 +120,6 @@ function createActionSelect(data,base) {
 
 function createActionRow(Node,data) {
     var div = document.createElement("div");
-    div.className = 'row';
     div.name = 'rule[actions]['+actions_i+']';
     actions_i++;
     Node.appendChild(div);
@@ -164,7 +163,6 @@ function createMatchSelect(data,base) {
 
 function createMatchRow(Node,data) {
     var div = document.createElement("div");
-    div.className = 'row';
     div.name = 'rule[matches]['+actions_i+']';
     actions_i++;
     Node.appendChild(div);