+<script type="text/javascript">
+
/*
* This script should get called by every onChange event...
*
*/
-<script type="text/javascript">
var highest_active_rule = (-1);
function UpdateRules() {
/*
- * Show only the active rows...
+ * Show only the active rows... /// TODO 255-> we need no limit anymore.
*/
highest_active_rule = (-1);
- for (i=0; i< <?SIEVE:MAX_RULES>; ++i) {
+ for (i=0; i< 255; ++i) {
if ($('active'+i).checked) {
$('rule' + i).style.display = 'block';
highest_active_rule = i;
$('rule' + i).style.display = 'none';
}
}
+
/*
* Show only the fields relevant to the rules...
*/
$('div_fileinto'+i).style.display = 'none';
$('div_redirect'+i).style.display = 'none';
$('div_automsg'+i).style.display = 'none';
- }
- if (highest_active_rule < <?SIEVE:MAX_RULES> - 1) {
+ }/* TODO: we don't have any limits anymore */
+ if (highest_active_rule < 255 - 1) {
$('div_addrule').style.display = 'block';
} else {
$('div_addrule').style.display = 'none';
}
}
}
+
/*
* Add a rule (really, just un-hide it)
*/
$('active'+highest_active_rule).checked = true;
UpdateRules();
}
+
/*
* Swap two rules
*/
$(things[i]+rb).value = tempval;
}
}
+
/*
* Delete a rule (percolate the deleted rule out to the end, then deactivate it)
*/
<div id="div_addrule"><a href="javascript:AddRule();"><?_("Add rule")></a><br></div>
<script type="text/javascript">UpdateRules();</script>
-
+</div>
-<?--("iterate over an empty template, so we have the states already loaded for below")><?ITERATE("SIEVE:SCRIPTS", ="sieve_empty")><script type="text/javascript">
+<?=("head")><?=("important_msg")><?%("COND:LOGGEDIN", 1, 1, 1, "", ="paging")>
+
+<?--("iterate over an empty template, so we have the states already loaded for below")><?ITERATE("SIEVE:SCRIPTS", ="sieve_empty")>
+<script type="text/javascript">
+
var previously_active_script;
+
function ToggleSievePanels() {
d = ($('sieveform').bigaction.options[$('sieveform').bigaction.selectedIndex].value);
for (i=0; i<3; ++i) {
}
}
}
-
+
function ToggleScriptPanels() {
d = ($('sieveform').active_script.options[$('sieveform').active_script.selectedIndex].value);
if ($('script_' + previously_active_script)) {
}
</script>
<div id="banner">
-<img src="static/advanpage2_48x.gif">
+<img src="static/webcit_icons/essen/32x32/config.png">
<h1><?_("View/edit server-side mail filters")></h1>
</div>
<?--("The webcit managed scripts div")>
<div id="sievediv1" style="display:none">
- display_rules_editor_inner_div();
+
+<?=("sieve_display")>
</div>
<?--("The I am smart and can write my own Sieve scripts div ")>
<div align="center"><br>
<input type="submit" name="save_button" value='<?_("Save changes")>'>
-<input type="submit" name="cancel_button" value='(?_("Cancel")>'>
+<input type="submit" name="cancel_button" value='<?_("Cancel")>'>
</div></form>
</td></tr></table>
<script type="text/javascript">ToggleSievePanels();</script>
-
-
+</div> <!-- end of 'content' div -->
+<?=("trailing")>