Frank Kobzik has uploaded a new change for review. Change subject: userportal: Console buttons clickable area fix ......................................................................
userportal: Console buttons clickable area fix [extended userportal] Console buttons of VMs are clickable on wider area as expected (table cell where the button is present). This patch fixes this incorrect behavior. Now the buttons respond when clicking on their area only. Change-Id: Ib8a0da49e86bc01c73e7a2a7226da773d659a6fc Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=953140 Signed-off-by: Frantisek Kobzik <[email protected]> --- M frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/widget/extended/vm/ConsoleButtonCell.java 1 file changed, 9 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/35/14535/1 diff --git a/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/widget/extended/vm/ConsoleButtonCell.java b/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/widget/extended/vm/ConsoleButtonCell.java index f258524..722f55b 100644 --- a/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/widget/extended/vm/ConsoleButtonCell.java +++ b/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/widget/extended/vm/ConsoleButtonCell.java @@ -9,6 +9,7 @@ import com.google.gwt.cell.client.ValueUpdater; import com.google.gwt.core.client.Scheduler; import com.google.gwt.core.client.Scheduler.ScheduledCommand; +import com.google.gwt.dom.client.DivElement; import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.EventTarget; import com.google.gwt.dom.client.NativeEvent; @@ -27,6 +28,8 @@ private final String disabledCss; private final String title; + + private final String cellClass = "consoleButtonCell"; // $NON-NLS-1$ // DOM element ID settings for the text container element private String elementIdPrefix = DOM.createUniqueId(); @@ -62,7 +65,8 @@ super.onBrowserEvent(context, parent, model, event, valueUpdater); EventTarget eventTarget = event.getEventTarget(); - if (!Element.is(eventTarget)) { + + if (!DivElement.is(eventTarget) || !cellClass.equals(DivElement.as(eventTarget).getAttribute("data-class"))) {//$NON-NLS-1$ return; } @@ -86,9 +90,11 @@ if (isConsoleEnabled(model)) { sb.appendHtmlConstant("<div id=\"" //$NON-NLS-1$ + ElementIdUtils.createTableCellElementId(elementIdPrefix, columnId, context) - + "\" title=\"" + title + "\" class=\"" + enabledCss + "\"/>"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + + "\" title=\"" + title + "\" class=\"" + enabledCss + "\""//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + + "data-class=\"" + cellClass + "\""//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + + "/>"); //$NON-NLS-1$ } else { - sb.appendHtmlConstant("<div class=\"" + disabledCss + "\" />"); //$NON-NLS-1$ //$NON-NLS-2$ + sb.appendHtmlConstant("<div class=\"" + disabledCss + "\" data-class=\"" + cellClass + "\" />"); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$ } } -- To view, visit http://gerrit.ovirt.org/14535 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib8a0da49e86bc01c73e7a2a7226da773d659a6fc Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Frank Kobzik <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
