|
|
|
@ -77,7 +77,7 @@ public class TweetTemplate extends Composite {
|
|
|
|
|
private HTML showAllComments = new HTML();
|
|
|
|
|
private boolean isAppPost = false;
|
|
|
|
|
private HTML submitCommentPreloader = new HTML("<div class=\"more-comment\"><img style=\"padding-right:15px;\"src=\""+ loading +"\" /></div>");
|
|
|
|
|
private TweetTemplate myInstance;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Carousel from the image-previewer widget
|
|
|
|
|
private Carousel carousel;
|
|
|
|
@ -133,6 +133,7 @@ public class TweetTemplate extends Composite {
|
|
|
|
|
* @param displaySingle tells if you're displaying a single fedd or not
|
|
|
|
|
* @param eventBus
|
|
|
|
|
*/
|
|
|
|
|
@SuppressWarnings("deprecation")
|
|
|
|
|
public TweetTemplate(boolean displaySingle, boolean showTimelineSource, UserInfo myUserInfo, EnhancedFeed myPost, HandlerManager eventBus) {
|
|
|
|
|
initWidget(uiBinder.createAndBindUi(this));
|
|
|
|
|
commentsNo.getElement().getStyle().setPaddingTop(0, Unit.PX);
|
|
|
|
@ -142,7 +143,6 @@ public class TweetTemplate extends Composite {
|
|
|
|
|
likesNo.getElement().getStyle().setPaddingLeft(2, Unit.PX);
|
|
|
|
|
commentsNo.getElement().getStyle().setPaddingLeft(2, Unit.PX);
|
|
|
|
|
|
|
|
|
|
myInstance = this;
|
|
|
|
|
this.myUserInfo = myUserInfo;
|
|
|
|
|
this.vreSourceInMetadata.setVisible(false);
|
|
|
|
|
this.separator.setVisible(false);
|
|
|
|
@ -191,7 +191,7 @@ public class TweetTemplate extends Composite {
|
|
|
|
|
linkPreviewer.onFileNameClickOpenCarousel(carousel);
|
|
|
|
|
|
|
|
|
|
// remove next and prev buttons of the carousel since we have only an image
|
|
|
|
|
carousel.hideArrows();
|
|
|
|
|
carousel.showArrows(false);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -278,7 +278,7 @@ public class TweetTemplate extends Composite {
|
|
|
|
|
|
|
|
|
|
// hide arrows if there is no more than 1 image
|
|
|
|
|
if(imagesAvailableInCarousel <= 1)
|
|
|
|
|
carousel.hideArrows();
|
|
|
|
|
carousel.showArrows(false);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -463,8 +463,6 @@ public class TweetTemplate extends Composite {
|
|
|
|
|
@UiHandler("seeMore")
|
|
|
|
|
void onSeeMoreClick(ClickEvent e) {
|
|
|
|
|
String postText = myPost.getFeed().getDescription();
|
|
|
|
|
//replace the < & and >
|
|
|
|
|
postText = postText.replaceAll("<","<").replaceAll(">",">");
|
|
|
|
|
postText = postText.replaceAll("&","&");
|
|
|
|
|
|
|
|
|
|
contentArea.setHTML(postText);
|
|
|
|
|