From 55f834c5de07386ad55948e8ec2cc605799d6c1e Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 9 Nov 2006 05:09:30 +0000 Subject: [PATCH] Added some dynamic form stuff to the rules editor --- webcit/sieve.c | 79 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 57 insertions(+), 22 deletions(-) diff --git a/webcit/sieve.c b/webcit/sieve.c index 56dc27a0c..ab6050ce1 100644 --- a/webcit/sieve.c +++ b/webcit/sieve.c @@ -374,9 +374,50 @@ void create_script(void) { void display_rules_editor_inner_div(void) { int i; +/* + * This script should get called by every onChange event... + * + */ + wprintf(" \n" + ); + + +/* + * Show/hide alternating rows. This is obviously bogus, it's just here to test the show/hide logic. + wprintf(" for (i=0; i<%d; ++i) { \n", MAX_RULES); + wprintf(" if ( (i % 2) == 0 ) { \n" + " $('rule' + i).style.display = 'block'; \n" + " } \n" + " else { \n" + " $('rule' + i).style.display = 'none'; \n" + " } \n" + " } \n" + "} \n" + " \n" +*/ + wprintf("
"); - wprintf(""); + wprintf("
" + ); for (i=0; i%d. %s", i+1, _("If") ); wprintf(""); wprintf(""); wprintf(""); + + wprintf("", _("and then") ); wprintf("
"); - wprintf("", i); wprintf("", _("Sender")); wprintf("", _("Recipient")); wprintf(""); wprintf(""); - wprintf("", i); wprintf("", _("matches")); wprintf("", _("does not match")); wprintf(""); @@ -403,17 +444,28 @@ void display_rules_editor_inner_div(void) { wprintf(""); - wprintf("", + i, i); wprintf("", _("file into")); wprintf("", _("forward to")); wprintf("", _("reject")); wprintf(""); + + wprintf("
", i); + wprintf("", i); + wprintf("
"); + + wprintf("
", i); + wprintf("", i); + wprintf("
"); wprintf("
%s"); - wprintf("", i); wprintf("", _("stop")); wprintf("", _("continue processing")); wprintf(""); @@ -427,25 +479,8 @@ void display_rules_editor_inner_div(void) { -/* - -Show/hide alternating rows. This is obviously bogus, it's just there to test the show/hide logic. - - */ wprintf(" \n" ); -- 2.30.2