Lior Vernia has uploaded a new change for review. Change subject: webadmin: Allowed non-draggable NetworkItemPanel ......................................................................
webadmin: Allowed non-draggable NetworkItemPanel It seems that so far setting draggable to false did nothing, the item would still be draggable. Added some more code to disable the "draggable skin" and the actual drag operation when an item has been constructed as non-draggable. Also, changed bonds to be draggable explicitly, as they have been draggable all this time and I've heard no complaints. Change-Id: I0f130803ce2403cc26297ec8d06ef62d23837b96 Signed-off-by: Lior Vernia <lver...@redhat.com> --- M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/panels/BondPanel.java M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/panels/NetworkItemPanel.java 2 files changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/94/19694/1 diff --git a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/panels/BondPanel.java b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/panels/BondPanel.java index 60d83e3..014142b 100644 --- a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/panels/BondPanel.java +++ b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/panels/BondPanel.java @@ -16,7 +16,7 @@ public class BondPanel extends NicPanel { public BondPanel(BondNetworkInterfaceModel item, NetworkPanelsStyle style) { - super(item, style, false); + super(item, style, true); actionButton.setStyleName(style.actionButtonBond()); } diff --git a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/panels/NetworkItemPanel.java b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/panels/NetworkItemPanel.java index 979e9ad..665e237 100644 --- a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/panels/NetworkItemPanel.java +++ b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/panels/NetworkItemPanel.java @@ -46,6 +46,7 @@ final PushButton actionButton; final NetworkItemModel<?> item; + final private boolean draggable; final protected NetworkPanelsStyle style; protected NetworkItemPanel parentPanel; private MenuBar menu; @@ -59,6 +60,7 @@ public NetworkItemPanel(NetworkItemModel<?> item, NetworkPanelsStyle style, boolean draggable) { super(); + this.draggable = draggable; getElement().setDraggable(draggable ? Element.DRAGGABLE_TRUE : Element.DRAGGABLE_FALSE); dragImage.setVisible(false); @@ -108,7 +110,7 @@ } protected void onMouseOver() { - dragImage.setVisible(true); + dragImage.setVisible(draggable); infoPopup.showItem(item, this); } @@ -140,6 +142,10 @@ addBitlessDomHandler(new DragStartHandler() { @Override public void onDragStart(DragStartEvent event) { + if (!draggable) { + return; + } + NetworkItemPanel sourcePanel = (NetworkItemPanel) event.getSource(); // Required: set data for the event. lastDragData = sourcePanel.item.getType() + " " + sourcePanel.item.getName(); //$NON-NLS-1$ -- To view, visit http://gerrit.ovirt.org/19694 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0f130803ce2403cc26297ec8d06ef62d23837b96 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Lior Vernia <lver...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches