Change in ovirt-engine[master]: webadmin, userportal: Implement dialog close button (icon)

vszocs at redhat.com vszocs at redhat.com
Tue Jan 8 14:24:03 UTC 2013


Vojtech Szocs has submitted this change and it was merged.

Change subject: webadmin,userportal: Implement dialog close button (icon)
......................................................................


webadmin,userportal: Implement dialog close button (icon)

This patch adds a close button (icon) into top-right corner
section of each application dialog (SimpleDialogPanel).

This patch also refactors/improves dialog (PresenterWidget)
hierarchy (common behavior) and fixes some issues:

1. Created AbstractPopupPresenterWidget as the base class
   for all application dialogs (previously, each popup
   extended GWTP PresenterWidget class directly)

2. Common close button (bottom-right), close icon button
   (top-right) and key press handling logic moved to
   AbstractPopupPresenterWidget (lots of duplicate code
   in different popup PresenterWidgets eliminated)

3. Fixed a problem with singleton popup PresenterWidgets,
   which were calling unbind() as part of handling Escape
   key (singleton popups MUST NOT call unbind(), their
   handlers must live till the very end!)

Besides unified behavior (AbstractPopupPresenterWidget),
the popup PresenterWidget hierarchy is flexible enough
to handle different kinds of dialogs, for example:

a. Model-bound dialogs (dialogs bound to UiCommon model),
   which don't have dedicated close button (they handle
   this through 'Cancel' Model command/button instead)

b. Login dialog, which doesn't have any kind of close
   button or Escape key handling at all

Change-Id: Ia659415962e9dc01052c501805758a18c90512a2
Signed-off-by: Vojtech Szocs <vszocs at redhat.com>
---
M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/utils/FrontendUrlUtils.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationResources.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/presenter/AbstractLoginPopupPresenterWidget.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/presenter/AbstractModelBoundPopupPresenterWidget.java
A frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/presenter/AbstractPopupPresenterWidget.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/presenter/popup/DefaultConfirmationPopupPresenterWidget.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/presenter/popup/ErrorPopupPresenterWidget.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/presenter/popup/RemoveConfirmationPopupPresenterWidget.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/AbstractLoginPopupView.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/AbstractPopupView.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/popup/AbstractModelBoundPopupView.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/popup/ErrorPopupView.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/dialog/AbstractDialogPanel.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/dialog/SimpleDialogPanel.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/dialog/SimpleDialogPanel.ui.xml
A frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/but_close.png
A frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/but_close_down.png
A frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/images/but_close_over.png
M frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/login/view/LoginPopupView.java
M frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/presenter/AboutPopupPresenterWidget.java
M frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/presenter/popup/vm/VmDiskPopupPresenterWidget.java
M frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/view/AboutPopupView.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/login/view/LoginPopupView.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/AboutPopupPresenterWidget.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/popup/configure/ConfigurePopupPresenterWidget.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/popup/storage/StoragePopupPresenterWidget.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/popup/vm/VmDiskPopupPresenterWidget.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/AboutPopupView.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/configure/ConfigurePopupView.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/configure/ConfigurePopupView.ui.xml
30 files changed, 413 insertions(+), 311 deletions(-)

Approvals:
  Vojtech Szocs: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia659415962e9dc01052c501805758a18c90512a2
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vojtech Szocs <vszocs at redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkaplan at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Einav Cohen <ecohen at redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek at redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs at redhat.com>



More information about the Engine-commits mailing list