From: Art Cancro Date: Sat, 11 Nov 2006 18:50:14 +0000 (+0000) Subject: Added a 'Delete Rule' button X-Git-Tag: v7.86~3852 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=88daa30c65185c6d8de01f53e135ac3b9d3585f7 Added a 'Delete Rule' button --- diff --git a/webcit/sieve.c b/webcit/sieve.c index 32c92408a..ba982d328 100644 --- a/webcit/sieve.c +++ b/webcit/sieve.c @@ -430,6 +430,7 @@ void display_rules_editor_inner_div(void) { /* * Show only the active rows... */ + wprintf(" highest_active_rule = (-1); \n"); wprintf(" for (i=0; i<%d; ++i) { \n", MAX_RULES); wprintf(" if ($('active'+i).checked) { \n" " $('rule' + i).style.display = 'block'; \n" @@ -468,14 +469,23 @@ void display_rules_editor_inner_div(void) { " $(things[i]+ra).value = $(things[i]+rb).value; \n" " $(things[i]+rb).value = tempval; \n" " } \n" - " \n" "} \n" - +/* + * Delete a rule (percolate the deleted rule out to the end, + * and then decrement highest_active_rule) + */ + "function DeleteRule(rd) { \n" + " for (i=rd; i \n" ); wprintf("
"); + wprintf("" ); @@ -497,6 +507,10 @@ void display_rules_editor_inner_div(void) { "", i, i+1, i); + wprintf("" + "", + i, i); + wprintf(" %d. %s", i+1, _("If") ); wprintf("
"); @@ -527,7 +541,8 @@ void display_rules_editor_inner_div(void) { wprintf(""); wprintf("
", i); - wprintf("", i, i); + wprintf("