From a2af5c0cefe2cccb338fa1401ac6e48df8604102 Mon Sep 17 00:00:00 2001 From: znek Date: Tue, 12 Oct 2004 12:38:09 +0000 Subject: [PATCH] work in progress git-svn-id: http://svn.opengroupware.org/SOGo/trunk@384 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/UI/Mailer/ChangeLog | 6 ++ SOGo/UI/Mailer/English.lproj/default.strings | 11 ++-- SOGo/UI/Mailer/UIxMailToSelection.m | 66 +++++++++++++++++++- SOGo/UI/Mailer/UIxMailToSelection.wox | 30 ++++----- SOGo/UI/Mailer/Version | 2 +- 5 files changed, 93 insertions(+), 22 deletions(-) diff --git a/SOGo/UI/Mailer/ChangeLog b/SOGo/UI/Mailer/ChangeLog index 2490be34..c627f105 100644 --- a/SOGo/UI/Mailer/ChangeLog +++ b/SOGo/UI/Mailer/ChangeLog @@ -1,5 +1,11 @@ 2004-10-12 Marcus Mueller + * v0.9.33 + + * UIxMailToSelection.[wox|m]: updated + + * English.lproj/default.strings: new localizable strings + * v0.9.32 * UIxMailEditor.wox: changed API for UIxMailToSelection diff --git a/SOGo/UI/Mailer/English.lproj/default.strings b/SOGo/UI/Mailer/English.lproj/default.strings index 7e03676e..318ac1e6 100644 --- a/SOGo/UI/Mailer/English.lproj/default.strings +++ b/SOGo/UI/Mailer/English.lproj/default.strings @@ -1,8 +1,9 @@ /* this file is in ISO-8859-1 format! */ -"From" = "From"; -"Subject" = "Subject"; +"From" = "From"; +"Subject" = "Subject"; +"Add address" = "Add address"; -"TO" = "To"; -"CC" = "Cc"; -"BCC" = "Bcc"; +"TO" = "To"; +"CC" = "Cc"; +"BCC" = "Bcc"; diff --git a/SOGo/UI/Mailer/UIxMailToSelection.m b/SOGo/UI/Mailer/UIxMailToSelection.m index 275df8ce..e10f290b 100644 --- a/SOGo/UI/Mailer/UIxMailToSelection.m +++ b/SOGo/UI/Mailer/UIxMailToSelection.m @@ -128,6 +128,8 @@ [self debugWithFormat:@"Note: will take values ..."]; + NSLog(@"formValues: %@", [_rq formValues]); + tmp = [self getAddressesOfType:@"to" fromFormValues:[_rq formValuesForKey:@"to"]]; [self setTo:tmp]; @@ -143,8 +145,70 @@ - (NSString *)jsCode { static NSString *script = \ + @"var currentIndex = 0;\n" + @"\n" + @"function hasAddress(email) {\n" + @" var e = document.getElementById(email);\n" + @" if(e)\n" + @" return true;\n" + @" return false;\n" + @"}\n" + @"\n" + @"function rememberAddress(email) {\n" + @" var list, e;\n" + @" \n" + @" list = document.getElementById(\"addr_addresses\");\n" + @" e = document.createElement(\"span\");\n" + @" e.id = email;\n" + @" list.appendChild(e);\n" + @"}\n" + @"\n" @"function addAddress(type, cn, dn, email, uid, sn) {\n" - @"}\n"; + @" var shouldAddRow, s;\n" + @" \n" + @" shouldAddRow = true;\n" + @" s = cn + \" <\" + email + \">\";\n" + @"\n" + @" if(this.hasAddress(email))\n" + @" return;\n" + @"\n" + @" this.rememberAddress(email);\n" + @"\n" + @" var e = document.getElementById(\"addr_0\");\n" + @" if(e.value == '') {\n" + @" e.value = s;\n" + @" shouldAddRow = false;\n" + @" }\n" + @" if(shouldAddRow) {\n" + @" this.fancyAddRow(false, s);\n" + @" }\n" + @"}\n" + @"\n" + @"function fancyAddRow(shouldEdit, text) {\n" + @" var table = document.getElementById(\"addr_table\").childNodes[1];\n" + @" var lastChild = document.getElementById(\"addr_lastentry\");\n" + @" var proto, row, select, input;\n" + @"\n" + @" currentIndex++;\n" + @"\n" + @" proto = document.getElementById(\"addr_proto\");\n" + @" row = proto.cloneNode(true);\n" + @" row.id = \"\";\n" + @"\n" + @" select = row.childNodes[1].childNodes[1];\n" + @" select.name = \"popup_\" + currentIndex;\n" + @" input = row.childNodes[3].childNodes[1];\n" + @" input.name = \"addr_\" + currentIndex;\n" + @" input.id = \"addr_\" + currentIndex;\n" + @" input.value = text;\n" + @"\n" + @" table.insertBefore(row, lastChild);\n" + @" if(shouldEdit) {\n" + @" input.focus();\n" + @" input.select();\n" + @" }\n" + @"}\n" + @"\n"; return script; } diff --git a/SOGo/UI/Mailer/UIxMailToSelection.wox b/SOGo/UI/Mailer/UIxMailToSelection.wox index b67abbd8..15a0906f 100644 --- a/SOGo/UI/Mailer/UIxMailToSelection.wox +++ b/SOGo/UI/Mailer/UIxMailToSelection.wox @@ -10,29 +10,29 @@ - - - - +
+ - - - - + + + +
- - - -
- - - +
+ + + +
+ \ No newline at end of file diff --git a/SOGo/UI/Mailer/Version b/SOGo/UI/Mailer/Version index 97a71362..a416fb2d 100644 --- a/SOGo/UI/Mailer/Version +++ b/SOGo/UI/Mailer/Version @@ -1,3 +1,3 @@ # $Id$ -SUBMINOR_VERSION:=32 +SUBMINOR_VERSION:=33 -- 2.39.5