Neues Design für VMail-Editor-Interface
bernd

bernd commited on 2008-02-22 12:09:53
Zeige 2 geänderte Dateien mit 46 Einfügungen und 34 Löschungen.


git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@963 87cf0b9e-d624-0410-a070-f6ee81989793
... ...
@@ -169,6 +169,18 @@ div#beta h3 {
169 169
   margin: 0;
170 170
 }
171 171
 
172
+div.vmail-forward {
173
+  border: 1px solid black;
174
+  padding: 0.5em;
175
+  margin-bottom: 0.5em;
176
+  display: table;
177
+}
178
+div.vmail-forward p {
179
+  display: block;
180
+  margin: 0;
181
+  margin-bottom: 0.5em;
182
+  padding: 0;
183
+}
172 184
 
173 185
 div.content {
174 186
         margin-left: 200px;
... ...
@@ -37,15 +37,22 @@ output("<script type=\"text/javascript\">
37 37
   {
38 38
     numForwards += 1;
39 39
 
40
-    TR = document.createElement('tr');
41
-    TD1 = document.createElement('td');
42
-    TD2 = document.createElement('td');
40
+    P1 = document.createElement('p');
41
+
42
+    TXT1 = document.createTextNode('Weiterleiten an ');
43 43
 
44 44
     INPUT = document.createElement('input');
45 45
     INPUT.type = 'text';
46 46
     INPUT.name = 'forward_to_' + numForwards;
47 47
     INPUT.value = '';
48 48
 
49
+    P1.appendChild(TXT1);
50
+    P1.appendChild(INPUT);
51
+
52
+    P2 = document.createElement('p');
53
+
54
+    TXT2 = document.createTextNode('Spam-Mails an diese Adresse ');
55
+
49 56
     SELECT = document.createElement('select');
50 57
     SELECT.name = 'spamfilter_action_' + numForwards;
51 58
 
... ...
@@ -53,14 +60,17 @@ output("<script type=\"text/javascript\">
53 60
     SELECT.options[1] = new Option('markieren und zustellen', 'tag', 1);
54 61
     SELECT.options[2] = new Option('nicht zustellen', 'delete', 0);
55 62
 
56
-    TD1.appendChild(INPUT);
57
-    TD2.appendChild(SELECT);
63
+    P2.appendChild(TXT2);
64
+    P2.appendChild(SELECT);
58 65
 
59
-    TR.appendChild(TD1);
60
-    TR.appendChild(TD2);
66
+    DIV = document.createElement('div');
67
+    DIV.className = 'vmail-forward';
61 68
 
62
-    table = document.getElementById('forward_table');
63
-    table.appendChild(TR);
69
+    DIV.appendChild(P1);
70
+    DIV.appendChild(P2);
71
+
72
+    parent = document.getElementById('forward_config');
73
+    parent.appendChild(DIV);
64 74
   }
65 75
 </script>
66 76
 ");
... ...
@@ -85,50 +95,40 @@ $form .= "
85 95
 <p style=\"margin-left: 2em;\" class=\"spamfilter_options\">
86 96
   <em>Wählen Sie, was mit unerwünschten E-Mails (Spam, Viren) passieren soll</em><br />";
87 97
 
88
-$form.= "".html_select('spamfilter_action', array("none" => 'kein Filter', "folder" => 'In Unterordner »Spam« ablegen', "tag" => 'markieren und zustellen', "delete" => 'löschen'), $account['spamfilter'])."</p>";
89
-
90
-/*  <input type=\"radio\" id=\"spamfilter_none\" name=\"spamfilter_action\" value=\"none\" ".($account['spamfilter'] == NULL ? 'checked="checked" ' : '')."/><label for=\"spamfilter_none\">&#160;Keine Überprüfung durchführen (alle E-Mails zustellen)</label><br />
98
+$form .=  "<input type=\"radio\" id=\"spamfilter_none\" name=\"spamfilter_action\" value=\"none\" ".($account['spamfilter'] == NULL ? 'checked="checked" ' : '')."/><label for=\"spamfilter_none\">&#160;Keine Überprüfung durchführen (alle E-Mails zustellen)</label><br />
91 99
   <input type=\"radio\" id=\"spamfilter_folder\" name=\"spamfilter_action\" value=\"folder\" ".($account['spamfilter'] == 'folder' ? 'checked="checked" ' : '')."/><label for=\"spamfilter_folder\">&#160;In IMAP-Unterordner »Spam« ablegen</label><br />
92 100
   <input type=\"radio\" id=\"spamfilter_tag\" name=\"spamfilter_action\" value=\"tag\" ".($account['spamfilter'] == 'tag' ? 'checked="checked" ' : '')."/><label for=\"spamfilter_tag\">&#160;Markieren und ganz normal zustellen</label><br />
93 101
   <input type=\"radio\" id=\"spamfilter_delete\" name=\"spamfilter_action\" value=\"delete\" ".($account['spamfilter'] == 'delete' ? 'checked="checked" ' : '')."/><label for=\"spamfilter_delete\">&#160;Nicht zustellen (Löschen)</label>
94 102
 </p>
95
-  ";*/
103
+  ";
96 104
 
97 105
 $form .= "<p><input type=\"checkbox\" id=\"forward\" name=\"forward\" value=\"yes\" ".($is_forward ? 'checked="checked" ' : '')." /><label for=\"forward\">&#160;Weiterleitung an andere E-Mail-Adressen</label></p>";
98 106
 
99
-$form .= "<table style=\"margin-left: 2em;\" id=\"forward_table\">
100
-<tr><th>Ziel-Adresse</th><th>Unerwünschte E-Mails</th></tr>
101
-";
107
+
108
+$form .= "<div style=\"margin-left: 2em;\" id=\"forward_config\">";
102 109
 
103 110
 if ($is_forward)
104 111
 {
105 112
   for ($i = 0 ; $i < $numforwards ; $i++)
106 113
   {
107 114
     $num = $i+1;
108
-  $form .= "
109
-<tr>
110
-  <td><input type=\"text\" id=\"forward_to_{$num}\" name=\"forward_to_{$num}\" value=\"{$account['forwards'][$i]['destination']}\" /></td>
111
-  <td>
112
-  ".html_select('spamfilter_action_'.$num, array("none" => 'kein Filter', "tag" => 'markieren und zustellen', "delete" => 'löschen'), $account['forwards'][$i]['spamfilter'])."
113
-  </td>
114
-</tr>
115
-";
115
+    $form .= "<div class=\"vmail-forward\">
116
+    <p>Weiterleiten an <input type=\"text\" id=\"forward_to_{$num}\" name=\"forward_to_{$num}\" value=\"{$account['forwards'][$i]['destination']}\" /></p>
117
+    <p>Spam-Mails an diese Adresse ".html_select('spamfilter_action_'.$num, array("none" => 'nicht filtern', "tag" => 'markieren und zustellen', "delete" => 'nicht zustellen'), $account['forwards'][$i]['spamfilter'])."</p>
118
+    </div>\n";
116 119
   }
117 120
 }
118 121
 else
119 122
 {
120
-  $form .= "
121
-<tr>
122
-  <td><input type=\"text\" id=\"forward_to_1\" name=\"forward_to_1\" value=\"\" /></td>
123
-  <td>
124
-  ".html_select('spamfilter_action_1', array("none" => 'kein Filter', "tag" => 'markieren und zustellen', "delete" => 'löschen'), "tag")."
125
-  </td>
126
-</tr>
127
-  ";
123
+    $form .= "<div class=\"vmail-forward\">
124
+    <p>Weiterleiten an <input type=\"text\" id=\"forward_to_1\" name=\"forward_to_1\" value=\"\" /></p>
125
+    <p>Spam-Mails an diese Adresse ".html_select('spamfilter_action_1', array("none" => 'nicht filtern', "tag" => 'markieren und zustellen', "delete" => 'nicht zustellen'), "none")."</p>
126
+    </div>\n";
128 127
 }
129 128
 
130
-$form .= '</table>
131
-  <p style="margin-left: 2em;">[ <a href="#" onclick="moreForward();">mehr Empfänger</a> ]</p>
129
+$form .= '</div>';
130
+
131
+$form .= '<p style="margin-left: 2em;">[ <a href="#" onclick="moreForward();">mehr Empfänger</a> ]</p>
132 132
   <p><input type="submit" value="Speichern" />&#160;&#160;&#160;&#160;'.internal_link('accounts.php', 'Abbrechen').'</p>';
133 133
 
134 134
 output(html_form('vmail_edit_mailbox', 'save.php', 'action=edit'.($id != 0 ? '&id='.$id : ''), $form));
135 135