Kanagaraj M has uploaded a new change for review.

Change subject: webadmin: moving the Login popup to center on Browser resize
......................................................................

webadmin: moving the Login popup to center on Browser resize

When the user resizes the browser window, the login popup
will be centered accordingly.

Change-Id: Ibe16a88a094ad5fa4a5cf81892183f44c1ff3600
Bug-Url: https://bugzilla.redhat.com/905853
Signed-off-by: Kanagaraj M <[email protected]>
---
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/login/view/LoginPopupView.java
1 file changed, 13 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/68/12468/1

diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/login/view/LoginPopupView.java
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/login/view/LoginPopupView.java
index 93d60c0..f334459 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/login/view/LoginPopupView.java
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/login/view/LoginPopupView.java
@@ -19,9 +19,12 @@
 
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.editor.client.SimpleBeanEditorDriver;
+import com.google.gwt.event.logical.shared.ResizeEvent;
+import com.google.gwt.event.logical.shared.ResizeHandler;
 import com.google.gwt.event.shared.EventBus;
 import com.google.gwt.uibinder.client.UiBinder;
 import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.user.client.Window;
 import com.google.gwt.user.client.ui.Label;
 import com.google.gwt.user.client.ui.Panel;
 import com.google.inject.Inject;
@@ -125,6 +128,16 @@
             footerWarningMessage.setText(constants.browserNotSupported());
             errorMessagePanel.setVisible(true);
         }
+
+        // Login popup will be centered if the user resizes the browser window
+        Window.addResizeHandler(new ResizeHandler() {
+            @Override
+            public void onResize(ResizeEvent event) {
+                if (asPopupPanel().isShowing()) {
+                    center();
+                }
+            }
+        });
     }
 
     private void localize(ApplicationConstants constants) {


--
To view, visit http://gerrit.ovirt.org/12468
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe16a88a094ad5fa4a5cf81892183f44c1ff3600
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Kanagaraj M <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to