Merge branch 'change-screen-deps'
* change-screen-deps: Add change level actions map to ChangeInfo Automatically refresh GWT UI on each page load Make parts of SubmitInfo and SubmitFailureDialog public Add no-arg constructor for CopyableLabel Fix visible length of CopyableLabel on Change-Id Support ListChangesOption in ChangeApi.detail() calls Add ChangeApi method to invoke rebase Add KeyDownHandler for escape to close popups Extract ReviewInput to top level class Add NativeMap.create() as a utility Change-Id: Ic1cbc9fd51cde4a6b0fc748ce9488a9d2259f01b
This commit is contained in:
@@ -71,6 +71,10 @@ public class CopyableLabel extends Composite implements HasText {
|
||||
private TextBox textBox;
|
||||
private Element swf;
|
||||
|
||||
public CopyableLabel() {
|
||||
this("");
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new label
|
||||
*
|
||||
@@ -117,7 +121,6 @@ public class CopyableLabel extends Composite implements HasText {
|
||||
public void setPreviewText(final String text) {
|
||||
if (textLabel != null) {
|
||||
textLabel.setText(text);
|
||||
visibleLen = text.length();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
package com.google.gwtexpui.globalkey.client;
|
||||
|
||||
import com.google.gwt.event.dom.client.KeyCodes;
|
||||
import com.google.gwt.event.dom.client.KeyDownEvent;
|
||||
import com.google.gwt.event.dom.client.KeyDownHandler;
|
||||
import com.google.gwt.event.dom.client.KeyPressEvent;
|
||||
import com.google.gwt.event.dom.client.KeyPressHandler;
|
||||
import com.google.gwt.event.logical.shared.CloseEvent;
|
||||
@@ -92,6 +94,14 @@ public class GlobalKey {
|
||||
active = new State(panel);
|
||||
active.add(new HidePopupPanelCommand(0, KeyCodes.KEY_ESCAPE, panel));
|
||||
panel.addCloseHandler(restoreGlobal);
|
||||
panel.addDomHandler(new KeyDownHandler() {
|
||||
@Override
|
||||
public void onKeyDown(KeyDownEvent event) {
|
||||
if (event.getNativeKeyCode() == KeyCodes.KEY_ESCAPE) {
|
||||
panel.hide();
|
||||
}
|
||||
}
|
||||
}, KeyDownEvent.getType());
|
||||
}
|
||||
|
||||
public static HandlerRegistration addApplication(final Widget widget,
|
||||
|
||||
Reference in New Issue
Block a user