Minor fix
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/application-support-layer/applicationSupportLayerSocial@129134 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
b657904c94
commit
14a6f9f61b
|
@ -79,9 +79,9 @@ public class SocialMailingUtil {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String attachmentsNotice = "";
|
String attachmentsNotice = "";
|
||||||
|
|
||||||
if (notification2Save.getType() == NotificationType.MESSAGE) {
|
if (notification2Save.getType() == NotificationType.MESSAGE) {
|
||||||
body.append("<div>").append(WRITE_ABOVE_MESSAGE_REPLY).append("</div><br />");
|
body.append("<div>").append(WRITE_ABOVE_MESSAGE_REPLY).append("</div><br />");
|
||||||
attachmentsNotice = "<br/><p>Please note that email replies do not support attachments.</p>";
|
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) {
|
if (notification2Save.getType() == NotificationType.MESSAGE) {
|
||||||
body.append(WRITE_ABOVE_MESSAGE_REPLY).append("\n\n");
|
body.append(WRITE_ABOVE_MESSAGE_REPLY).append("\n\n");
|
||||||
attachmentsNotice = "\n\nPlease note that email replies do not support attachments.\n\n";
|
attachmentsNotice = "\n\nPlease note that email replies do not support attachments.\n\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body.append("Dear ").append(userFirstName).append(",") //dear <user>
|
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>"
|
+ "white-space: nowrap; font-size: smaller; color: #999;\">" + formatter.format(feed.getTime()) + "</p>"
|
||||||
+"</div>";
|
+"</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("&", "&");
|
String commentTextNoHtml = comments.get(i).getText().replaceAll("&", "&");
|
||||||
|
|
||||||
if((commentKey != null && comments.get(i).getKey().equals(commentKey)) && !(notification2Save.getType() == NotificationType.POST_ALERT)){
|
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; "
|
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\">"
|
+ "border-left: 3px solid #ccc; font-style: italic; font-weight:bold\">"
|
||||||
+ comments.get(i).getFullName()
|
+ comments.get(i).getFullName()
|
||||||
+ ": "
|
+ ": "
|
||||||
+ commentTextNoHtml
|
+ commentTextNoHtml
|
||||||
+ "<p style=\"font-family:Lucida Grande,"
|
+ "<p style=\"font-family:Lucida Grande,"
|
||||||
+ "Verdana,Bitstream Vera Sans,Arial,sans-serif; "
|
+ "Verdana,Bitstream Vera Sans,Arial,sans-serif; "
|
||||||
+ "white-space: nowrap; font-size: smaller; color: #999;\">" + formatter.format(comments.get(i).getTime()) + "</p>"
|
+ "white-space: nowrap; font-size: smaller; color: #999;\">" + formatter.format(comments.get(i).getTime()) + "</p>"
|
||||||
+"</div>";
|
+"</div>";
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
htmlPost += "<div style=\"margin-top: 10px; margin-bottom: 10px; margin-left: 50px; padding-left: 15px; "
|
htmlPost += "<div style=\"margin-top: 10px; margin-bottom: 10px; margin-left: 50px; padding-left: 15px; "
|
||||||
+ "border-left: 3px solid #ccc; font-style: italic;\">"
|
+ "border-left: 3px solid #ccc; font-style: italic;\">"
|
||||||
+ comments.get(i).getFullName()
|
+ comments.get(i).getFullName()
|
||||||
+ ": "
|
+ ": "
|
||||||
+ commentTextNoHtml
|
+ commentTextNoHtml
|
||||||
+ "<p style=\"font-family:Lucida Grande,"
|
+ "<p style=\"font-family:Lucida Grande,"
|
||||||
+ "Verdana,Bitstream Vera Sans,Arial,sans-serif; "
|
+ "Verdana,Bitstream Vera Sans,Arial,sans-serif; "
|
||||||
+ "white-space: nowrap; font-size: smaller; color: #999;\">" + formatter.format(comments.get(i).getTime()) + "</p>"
|
+ "white-space: nowrap; font-size: smaller; color: #999;\">" + formatter.format(comments.get(i).getTime()) + "</p>"
|
||||||
+"</div>";
|
+"</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
return htmlPost;
|
return htmlPost;
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
|
@ -479,7 +480,7 @@ public class SocialMailingUtil {
|
||||||
protected static String buildPlainTextDiscussion(Notification notification2Save, Feed feed, List<Comment> comments, String commentKey){
|
protected static String buildPlainTextDiscussion(Notification notification2Save, Feed feed, List<Comment> comments, String commentKey){
|
||||||
|
|
||||||
try{
|
try{
|
||||||
|
|
||||||
if(notification2Save.getType().equals(NotificationType.POST_ALERT) || feed == null)
|
if(notification2Save.getType().equals(NotificationType.POST_ALERT) || feed == null)
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue