Alexander Wels has posted comments on this change. Change subject: webadmin: double click invokes default command ......................................................................
Patch Set 2: (5 inline comments) .................................................... File frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/action/AbstractActionStackPanelItem.java Line 42: protected abstract W createDataDisplayWidget(M modelProvider); Line 43: Line 44: protected abstract AbstractActionPanel<T> createActionPanel(M modelProvider); Line 45: Line 46: void addDoubleClickHandler(final W widget, final M modelProvider) { Done Line 47: if(modelProvider instanceof SearchableTableModelProvider<?, ?>) { Line 48: widget.addDomHandler(new DoubleClickHandler() { Line 49: @Override Line 50: public void onDoubleClick(DoubleClickEvent event) { Line 48: widget.addDomHandler(new DoubleClickHandler() { Line 49: @Override Line 50: public void onDoubleClick(DoubleClickEvent event) { Line 51: Model model = ((SearchableTableModelProvider<?, ?>)modelProvider).getModel(); Line 52: UICommand defaultCommand = model.getDefaultCommand(); No, I didn't want to be stuck on 'Edit'. I wanted double click to be the 'default' command. In all our current use cases that is edit, but I can see use cases where it can be something else, and we would want double click to behave consistently at that point. Line 53: if(defaultCommand != null && defaultCommand.getIsExecutionAllowed()) { Line 54: DeferredModelCommandInvoker invoker = new DeferredModelCommandInvoker(model); Line 55: invoker.invokeDefaultCommand(); Line 56: } .................................................... File frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/AbstractActionTable.java Line 78: Line 79: // Minimum width of a column used with column resizing, in pixels Line 80: private static final int RESIZE_MINIMUM_COLUMN_WIDTH = 30; Line 81: // Click event type Line 82: private static final String CLICK = "click"; //$NON-NLS-1$ You mean the extra space, fixed. Line 83: // Edit button id Line 84: private static final String EDIT = "Edit"; //$NON-NLS-1$ Line 85: Line 86: @UiField Line 80: private static final int RESIZE_MINIMUM_COLUMN_WIDTH = 30; Line 81: // Click event type Line 82: private static final String CLICK = "click"; //$NON-NLS-1$ Line 83: // Edit button id Line 84: private static final String EDIT = "Edit"; //$NON-NLS-1$ Done Line 85: Line 86: @UiField Line 87: @WithElementId Line 88: public ButtonBase prevPageButton; Line 191: @Override Line 192: public void onDoubleClick(DoubleClickEvent event) { Line 193: Model model = dataProvider.getModel(); Line 194: UICommand defaultCommand = model.getDefaultCommand(); Line 195: if(defaultCommand != null && defaultCommand.getIsExecutionAllowed()) { Done Line 196: DeferredModelCommandInvoker invoker = new DeferredModelCommandInvoker(model); Line 197: invoker.invokeDefaultCommand(); Line 198: } Line 199: } -- To view, visit http://gerrit.ovirt.org/10640 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I701036539547130a0c1581d179ad2f6de6519427 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alexander Wels <aw...@redhat.com> Gerrit-Reviewer: Alexander Wels <aw...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Einav Cohen <eco...@redhat.com> Gerrit-Reviewer: Gilad Chaplik <gchap...@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