Vojtech Szocs has submitted this change and it was merged.

Change subject: webadmin: UI plugin dialog API improved
......................................................................


webadmin: UI plugin dialog API improved

This patch improves the existing UI plugin API for handling dialogs.

(0) Minor dialog / UI plugin infrastructure improvements

(1) Function improved: showDialog

New signature:
    showDialog(title, dialogToken, contentUrl, width, height [, options])

Example usage:
    showDialog('My Dialog', 'my-dialog',
        'http://www.foobar.com/',
        '800px', '600px',
        {
            // Default value = empty array (no buttons)
            buttons: [
                {
                    label: 'Do stuff',
                    onClick: function() {
                        alert('Bump!');
                    }
                }
            ],

            // Default value = false
            resizeEnabled: true,

            // Default value = true
            closeIconVisible: true,

            // Default value = true
            closeOnEscKey: true
        }
    );

The implementation now uses WebAdmin's GWTP dialog infrastructure
via non-singleton DynamicUrlContentPopupPresenterWidget component
so that multiple dynamic dialog instances can be shown at a time
if necessary.

(2) New function: setDialogContentUrl

New signature:
    setDialogContentUrl(dialogToken, contentUrl)

Example usage:
    setDialogContentUrl('my-dialog', 'http://www.example.com/')

(3) New function: closeDialog

New signature:
    closeDialog(dialogToken)

Example usage:
    closeDialog('my-dialog')

Change-Id: I4654a25bed7122c45d432e3860ed710fa4ca3dd9
Signed-off-by: Vojtech Szocs <vsz...@redhat.com>
---
M 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/presenter/AbstractModelBoundPopupPresenterWidget.java
M 
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/widget/UiCommandButton.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/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/gin/PluginModule.java
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/plugin/PluginManager.java
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/plugin/api/ActionButtonInterface.java
A 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/plugin/api/DialogButtonInterface.java
A 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/plugin/api/DialogOptions.java
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/plugin/api/PluginUiFunctions.java
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/plugin/jsni/JsArrayHelper.java
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/plugin/jsni/JsInterfaceObject.java
A 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/plugin/jsni/JsObjectWithProperties.java
A 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/popup/CloseDynamicPopup.java
A 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/popup/DynamicUrlContentPopupPresenterWidget.java
A 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/popup/SetDynamicPopupContentUrl.java
A 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/DynamicUrlContentPopupView.java
A 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/DynamicUrlContentPopupView.ui.xml
19 files changed, 495 insertions(+), 54 deletions(-)

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


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4654a25bed7122c45d432e3860ed710fa4ca3dd9
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vojtech Szocs <vsz...@redhat.com>
Gerrit-Reviewer: Chris Morrissey <cmorr...@netapp.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Einav Cohen <eco...@redhat.com>
Gerrit-Reviewer: Keith Robertson <krobe...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Spenser Shumaker <sshum...@redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to