added addComment form if there is at least on comment already on a tweet
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/news-feed@94749 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
3e9e5fb981
commit
aa935c0f79
|
@ -882,6 +882,7 @@ public class NewsFeedPanel extends Composite {
|
|||
if (commentForm2Add)
|
||||
owner.showAddCommentForm();
|
||||
owner.updateCommentsNumberCount();
|
||||
owner.showAddCommentForm();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ public class AddCommentTemplate extends Composite {
|
|||
private static CommentTemplateUiBinder uiBinder = GWT.create(CommentTemplateUiBinder.class);
|
||||
|
||||
|
||||
public final static String COMMENT_TEXT = "Add a comment ... use @ to mention someone";
|
||||
public final static String COMMENT_TEXT = "Write a comment, use @ to mention someone";
|
||||
public final static String ERROR_UPDATE_TEXT = "Looks like empty to me!";
|
||||
public static final String avatar_default = GWT.getModuleBaseURL() + "../images/Avatar_default.png";
|
||||
|
||||
|
@ -45,7 +45,7 @@ public class AddCommentTemplate extends Composite {
|
|||
@UiField SuperPosedTextArea commentTextArea;
|
||||
@UiField Div highlighterDIV;
|
||||
@UiField Button submitButton;
|
||||
@UiField Button cancelButton;
|
||||
@UiField Button cancelButton; //obsolete
|
||||
|
||||
|
||||
/**
|
||||
|
@ -60,6 +60,8 @@ public class AddCommentTemplate extends Composite {
|
|||
owner = caller;
|
||||
avatarImage.setPixelSize(30, 30);
|
||||
avatarImage.setUrl(myUserInfo.getAvatarId());
|
||||
submitButton.setVisible(false);
|
||||
cancelButton.setVisible(false);
|
||||
}
|
||||
/**
|
||||
* called on edit comment
|
||||
|
@ -87,7 +89,7 @@ public class AddCommentTemplate extends Composite {
|
|||
}
|
||||
|
||||
public void setFocus() {
|
||||
commentTextArea.setFocus(true);
|
||||
//commentTextArea.setFocus(true);
|
||||
}
|
||||
|
||||
@UiHandler("submitButton")
|
||||
|
@ -150,6 +152,7 @@ public class AddCommentTemplate extends Composite {
|
|||
commentTextArea.addStyleName("comment-dark-color");
|
||||
commentTextArea.removeStyleName("error");
|
||||
}
|
||||
submitButton.setVisible(true);
|
||||
}
|
||||
|
||||
@UiHandler("commentTextArea")
|
||||
|
|
|
@ -61,7 +61,7 @@ public class SuperPosedTextArea extends TextArea {
|
|||
|
||||
@Override
|
||||
public void onSuccess(ArrayList<PickingUser> users) {
|
||||
pickUserDlg = new PickUsersDialog(users, eventBus, 450);
|
||||
pickUserDlg = new PickUsersDialog(users, eventBus, 460);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -74,7 +74,6 @@ public class SuperPosedTextArea extends TextArea {
|
|||
@Override
|
||||
public void run() {
|
||||
myAutoSize(areaId);
|
||||
setCaretPositionToBegin(areaId);
|
||||
}
|
||||
};
|
||||
t.schedule(200);
|
||||
|
|
|
@ -218,7 +218,8 @@ public class TweetTemplate extends Composite {
|
|||
}
|
||||
for (Comment comment : myFeed.getComments()) {
|
||||
addComment(new SingleComment(comment, this, (comment.getUserid().equals(myUserInfo.getUsername()))));
|
||||
}
|
||||
}
|
||||
showAddCommentForm();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -335,7 +336,9 @@ public class TweetTemplate extends Composite {
|
|||
if (! commentsFetched && totalComments > 2) { //if so, need to load all comments before adding a comment
|
||||
fireSeeComments(true);
|
||||
}
|
||||
showAddCommentForm();
|
||||
else {
|
||||
showAddCommentForm();
|
||||
}
|
||||
}
|
||||
else
|
||||
GWT.log("Commenting disabled");
|
||||
|
|
|
@ -110,6 +110,10 @@ public class NewsServiceImpl extends RemoteServiceServlet implements NewsService
|
|||
}
|
||||
return SessionManager.getInstance().getASLSession(sessionID, user);
|
||||
}
|
||||
/**
|
||||
* when packaging test will fail if the user is not set to test.user
|
||||
* @return .
|
||||
*/
|
||||
public String getDevelopmentUser() {
|
||||
String user = "test.user";
|
||||
//user = "massimiliano.assante";
|
||||
|
|
|
@ -17,7 +17,7 @@ table {
|
|||
left: 0;
|
||||
top: 0;
|
||||
cursor: text;
|
||||
width: 525px;
|
||||
width: 460px;
|
||||
height: 54px;
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ table {
|
|||
|
||||
border: 1px solid transparent;
|
||||
|
||||
width: 450px;
|
||||
width: 460px;
|
||||
min-height: 40px;
|
||||
|
||||
word-wrap: break-word; /* this is very important when usere paste long links*/
|
||||
|
@ -58,7 +58,7 @@ table {
|
|||
|
||||
border: 1px solid #C3CDE7;
|
||||
|
||||
width: 450px;
|
||||
width: 460px;
|
||||
min-height: 40px;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue