|
|
|
@ -3,7 +3,6 @@
|
|
|
|
|
*/
|
|
|
|
|
package org.gcube.portlets.user.newsfeed.client.ui;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.HashSet;
|
|
|
|
|
|
|
|
|
|
import org.gcube.portlets.user.gcubewidgets.client.elements.Div;
|
|
|
|
@ -28,7 +27,6 @@ import com.google.gwt.user.client.DOM;
|
|
|
|
|
import com.google.gwt.user.client.Event;
|
|
|
|
|
import com.google.gwt.user.client.Random;
|
|
|
|
|
import com.google.gwt.user.client.Timer;
|
|
|
|
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
|
|
|
|
import com.google.gwt.user.client.ui.TextArea;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -45,7 +43,7 @@ public class SuperPosedTextArea extends TextArea {
|
|
|
|
|
private Div highlighterDIV;
|
|
|
|
|
public final static int ARROW_UP = 38;
|
|
|
|
|
public final static int ARROW_DOWN = 40;
|
|
|
|
|
|
|
|
|
|
private String context;
|
|
|
|
|
private HashSet<MentionedDTO> mentionedUsers = new HashSet<MentionedDTO>();
|
|
|
|
|
|
|
|
|
|
private String areaId;
|
|
|
|
@ -87,16 +85,8 @@ public class SuperPosedTextArea extends TextArea {
|
|
|
|
|
this.addFocusHandler(new FocusHandler() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onFocus(FocusEvent event) {
|
|
|
|
|
newsService.getOrganizationUsers(new AsyncCallback<ArrayList<ItemBean>>() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onSuccess(ArrayList<ItemBean> users) {
|
|
|
|
|
pickUserDlg = new PickItemsDialog('@', users, eventBus, 460);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onFailure(Throwable caught) {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
pickUserDlg = new PickItemsDialog('@', eventBus, 430, context);
|
|
|
|
|
pickUserDlg.withPhoto();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -116,6 +106,13 @@ public class SuperPosedTextArea extends TextArea {
|
|
|
|
|
public SuperPosedTextArea(Element element) {
|
|
|
|
|
super(element);
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param context e.g. /gcube/devNext/NextNext
|
|
|
|
|
*/
|
|
|
|
|
public void setContext(String context) {
|
|
|
|
|
this.context = context;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* paste event overridden
|
|
|
|
|