* SusiMail:

- New reply button icon (from Silk, same license as the others)
   - Save BCC-to-self preference in the session
   - Tweak the BCC-to-self layout
   - Fix date format in reply
This commit is contained in:
zzz
2014-04-20 02:45:01 +00:00
parent b75ad1ca5a
commit 5a683149ab
6 changed files with 24 additions and 10 deletions

View File

@@ -157,7 +157,7 @@ public class Mail {
}
public void parseHeaders()
{
DateFormat dateFormatter = new SimpleDateFormat("yyyy-mm-dd HH:mm");
DateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm");
DateFormat localDateFormatter = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
DateFormat longLocalDateFormatter = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM);
// the router sets the JVM time zone to UTC but saves the original here so we can get it

View File

@@ -177,6 +177,7 @@ public class WebMail extends HttpServlet
private static final String spacer = "   ";
private static final String thSpacer = "<th>&nbsp;</th>\n";
/**
* sorts Mail objects by id field
*
@@ -313,7 +314,7 @@ public class WebMail extends HttpServlet
* @author susi
*/
private static class SessionObject {
boolean pageChanged, markAll, clear, invert;;
boolean pageChanged, markAll, clear, invert;
int state, smtpPort;
POP3MailBox mailbox;
MailCache mailCache;
@@ -327,11 +328,12 @@ public class WebMail extends HttpServlet
public boolean reallyDelete;
String themePath, imgPath;
boolean isMobile;
boolean bccToSelf;
SessionObject()
{
state = STATE_AUTH;
bccToSelf = Boolean.parseBoolean(Config.getProperty( CONFIG_BCC_TO_SELF, "true" ));
}
}
@@ -1502,8 +1504,10 @@ public class WebMail extends HttpServlet
recipients.addAll( bccList );
String bccToSelf = request.getParameter( NEW_BCC_TO_SELF );
if( bccToSelf != null && bccToSelf.equals("1"))
boolean toSelf = "1".equals(bccToSelf);
// save preference in session
sessionObject.bccToSelf = toSelf;
if (toSelf)
recipients.add( sender );
if( toList.isEmpty() ) {
@@ -1629,7 +1633,6 @@ public class WebMail extends HttpServlet
String bcc = request.getParameter( NEW_BCC, "" );
String subject = request.getParameter( NEW_SUBJECT, sessionObject.subject != null ? sessionObject.subject : "" );
String text = request.getParameter( NEW_TEXT, sessionObject.body != null ? sessionObject.body : "" );
String bccToSelf = Config.getProperty( CONFIG_BCC_TO_SELF, "true" );
sessionObject.replyTo = null;
sessionObject.replyCC = null;
sessionObject.subject = null;
@@ -1641,8 +1644,8 @@ public class WebMail extends HttpServlet
"<tr><td align=\"right\">" + _("To:") + "</td><td align=\"left\"><input type=\"text\" size=\"80\" name=\"" + NEW_TO + "\" value=\"" + to + "\"></td></tr>\n" +
"<tr><td align=\"right\">" + _("Cc:") + "</td><td align=\"left\"><input type=\"text\" size=\"80\" name=\"" + NEW_CC + "\" value=\"" + cc + "\"></td></tr>\n" +
"<tr><td align=\"right\">" + _("Bcc:") + "</td><td align=\"left\"><input type=\"text\" size=\"80\" name=\"" + NEW_BCC + "\" value=\"" + bcc + "\"></td></tr>\n" +
"<tr><td align=\"right\">" + _("Bcc to self") + ": </td><td align=\"left\"><input type=\"checkbox\" class=\"optbox\" name=\"" + NEW_BCC_TO_SELF + "\" value=\"1\"" + (sessionObject.bccToSelf ? "checked" : "" ) + "></td></tr>\n" +
"<tr><td align=\"right\">" + _("Subject:") + "</td><td align=\"left\"><input type=\"text\" size=\"80\" name=\"" + NEW_SUBJECT + "\" value=\"" + subject + "\"></td></tr>\n" +
"<tr><td>&nbsp;</td><td align=\"left\"><input type=\"checkbox\" class=\"optbox\" name=\"" + NEW_BCC_TO_SELF + "\" value=\"1\"" + ( !bccToSelf.equalsIgnoreCase("false") ? "checked" : "" )+ ">" + _("Bcc to self") + "</td></tr>\n" +
"<tr><td colspan=\"2\" align=\"center\"><textarea cols=\"" + Config.getProperty( CONFIG_COMPOSER_COLS, 80 )+ "\" rows=\"" + Config.getProperty( CONFIG_COMPOSER_ROWS, 10 )+ "\" name=\"" + NEW_TEXT + "\">" + text + "</textarea>" +
"<tr><td colspan=\"2\" align=\"center\"><hr></td></tr>\n" +
"<tr><td align=\"right\">" + _("New Attachment:") + "</td><td align=\"left\"><input type=\"file\" size=\"50%\" name=\"" + NEW_FILENAME + "\" value=\"\"><input type=\"submit\" name=\"" + NEW_UPLOAD + "\" value=\"" + _("Upload File") + "\"></td></tr>" );

View File

@@ -172,9 +172,9 @@ public class HeaderLine implements Encoding {
if( length > 0 ) {
if( in[offset] == '?' ) {
// System.err.println( "=? found at " + ( offset -1 ) );
// save charset position here f1+1 to f2-1
int f1 = offset;
int f2 = f1 + 1;
// FIXME save charset here ticket #508
for( ; f2 < end && in[f2] != '?'; f2++ );
if( f2 < end ) {
/*

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 B

View File

@@ -213,11 +213,16 @@ input.markall, input.show {
min-height: 22px;
}
input.new, input.reply, input.replyall {
input.new {
background: #000 url('/themes/console/images/email.png') no-repeat 2px center;
min-height: 22px;
}
input.reply, input.replyall {
background: #000 url('/themes/console/images/arrow_turn_left.png') no-repeat 2px center;
min-height: 22px;
}
input.prevpage, input.prev {
background: #000 url('/themes/console/images/arrow_left.png') no-repeat 2px center;
min-height: 22px;

View File

@@ -206,12 +206,18 @@ input.markall, input.show {
min-height: 22px;
}
input.new, input.reply, input.replyall {
input.new {
background: #ddf url('/themes/console/images/email.png') no-repeat 0px center;
padding: 2px 3px 2px 36px;
min-height: 22px;
}
input.reply, input.replyall {
background: #ddf url('/themes/console/images/arrow_turn_left.png') no-repeat 4px center;
padding: 2px 3px 2px 24px;
min-height: 22px;
}
input.prevpage, input.prev {
background: #ddf url('/themes/console/images/arrow_left.png') no-repeat 4px center;
padding: 2px 3px 2px 24px;