costantino.perciante 2016-06-16 09:27:36 +00:00
parent b657904c94
commit 14a6f9f61b
1 changed files with 30 additions and 29 deletions

View File

@ -79,9 +79,9 @@ public class SocialMailingUtil {
}
String attachmentsNotice = "";
if (notification2Save.getType() == NotificationType.MESSAGE) {
body.append("<div>").append(WRITE_ABOVE_MESSAGE_REPLY).append("</div><br />");
attachmentsNotice = "<br/><p>Please note that email replies do not support attachments.</p>";
@ -167,7 +167,7 @@ public class SocialMailingUtil {
if (notification2Save.getType() == NotificationType.MESSAGE) {
body.append(WRITE_ABOVE_MESSAGE_REPLY).append("\n\n");
attachmentsNotice = "\n\nPlease note that email replies do not support attachments.\n\n";
}
body.append("Dear ").append(userFirstName).append(",") //dear <user>
@ -432,34 +432,35 @@ public class SocialMailingUtil {
+ "white-space: nowrap; font-size: smaller; color: #999;\">" + formatter.format(feed.getTime()) + "</p>"
+"</div>";
for (int i = 0; i < comments.size(); i++) {
if(comments != null)
for (int i = 0; i < comments.size(); i++) {
String commentTextNoHtml = comments.get(i).getText().replaceAll("&amp;", "&");
String commentTextNoHtml = comments.get(i).getText().replaceAll("&amp;", "&");
if((commentKey != null && comments.get(i).getKey().equals(commentKey)) && !(notification2Save.getType() == NotificationType.POST_ALERT)){
htmlPost += "<div style=\"margin-top: 10px; margin-bottom: 10px; margin-left: 50px; padding-left: 15px; "
+ "border-left: 3px solid #ccc; font-style: italic; font-weight:bold\">"
+ comments.get(i).getFullName()
+ ": "
+ commentTextNoHtml
+ "<p style=\"font-family:Lucida Grande,"
+ "Verdana,Bitstream Vera Sans,Arial,sans-serif; "
+ "white-space: nowrap; font-size: smaller; color: #999;\">" + formatter.format(comments.get(i).getTime()) + "</p>"
+"</div>";
if((commentKey != null && comments.get(i).getKey().equals(commentKey)) && !(notification2Save.getType() == NotificationType.POST_ALERT)){
htmlPost += "<div style=\"margin-top: 10px; margin-bottom: 10px; margin-left: 50px; padding-left: 15px; "
+ "border-left: 3px solid #ccc; font-style: italic; font-weight:bold\">"
+ comments.get(i).getFullName()
+ ": "
+ commentTextNoHtml
+ "<p style=\"font-family:Lucida Grande,"
+ "Verdana,Bitstream Vera Sans,Arial,sans-serif; "
+ "white-space: nowrap; font-size: smaller; color: #999;\">" + formatter.format(comments.get(i).getTime()) + "</p>"
+"</div>";
break;
}
else
htmlPost += "<div style=\"margin-top: 10px; margin-bottom: 10px; margin-left: 50px; padding-left: 15px; "
+ "border-left: 3px solid #ccc; font-style: italic;\">"
+ comments.get(i).getFullName()
+ ": "
+ commentTextNoHtml
+ "<p style=\"font-family:Lucida Grande,"
+ "Verdana,Bitstream Vera Sans,Arial,sans-serif; "
+ "white-space: nowrap; font-size: smaller; color: #999;\">" + formatter.format(comments.get(i).getTime()) + "</p>"
+"</div>";
}
break;
}
else
htmlPost += "<div style=\"margin-top: 10px; margin-bottom: 10px; margin-left: 50px; padding-left: 15px; "
+ "border-left: 3px solid #ccc; font-style: italic;\">"
+ comments.get(i).getFullName()
+ ": "
+ commentTextNoHtml
+ "<p style=\"font-family:Lucida Grande,"
+ "Verdana,Bitstream Vera Sans,Arial,sans-serif; "
+ "white-space: nowrap; font-size: smaller; color: #999;\">" + formatter.format(comments.get(i).getTime()) + "</p>"
+"</div>";
}
return htmlPost;
}catch(Exception e){
@ -479,7 +480,7 @@ public class SocialMailingUtil {
protected static String buildPlainTextDiscussion(Notification notification2Save, Feed feed, List<Comment> comments, String commentKey){
try{
if(notification2Save.getType().equals(NotificationType.POST_ALERT) || feed == null)
return "";