minor bug fix, auto scrollbar for smartextarea, smartextarea key events sent only when pickuser is showing

git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portlets/user/share-updates@74042 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2013-04-24 22:52:19 +00:00
parent edd253bccd
commit c5bcc9677e
4 changed files with 13 additions and 7 deletions

View File

@ -5,6 +5,9 @@
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
<dependent-module archiveName="pickuser-widget-0.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/pickuser-widget/pickuser-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
<property name="context-root" value="share-updates"/>
</wb-module>

View File

@ -117,11 +117,14 @@ public class SmartTextArea extends ContentEditDiv {
pickUserDlg.onKeyUp(event.getKeyCode(), this.getAbsoluteLeft(), this.getAbsoluteTop()+65, getText());
break;
}
case Event.ONKEYDOWN: { //avoid the arrow up to move the cursor at the beginning of the textbox and the TAB to move around inputs and enter to go newline
if (event.getKeyCode() == ARROW_UP || event.getKeyCode() == KeyCodes.KEY_TAB || event.getKeyCode() == KeyCodes.KEY_ENTER) {
DOM.eventCancelBubble(event, true);
DOM.eventPreventDefault(event);
return;
case Event.ONKEYDOWN: {
if (pickUserDlg.isShowing()) {
//avoid the arrow up to move the cursor at the beginning of the textbox and the TAB to move around inputs and enter to go newline
if (event.getKeyCode() == ARROW_UP || event.getKeyCode() == KeyCodes.KEY_TAB || event.getKeyCode() == KeyCodes.KEY_ENTER) {
DOM.eventCancelBubble(event, true);
DOM.eventPreventDefault(event);
return;
}
}
break;
}

View File

@ -121,7 +121,6 @@ public class ShareUpdateServiceImpl extends RemoteServiceServlet implements Shar
else {
withinPortal = true;
}
System.out.println("SessionID = " + sessionID);
return SessionManager.getInstance().getASLSession(sessionID, user);
}

View File

@ -142,7 +142,8 @@ a.link:hover {
-webkit-border-radius: 4px;
border-radius: 4px;
letter-spacing: normal;
overflow: hidden;
max-height: 54px;
overflow: auto;
}
.dark-color {