From 914cef09a93883a107702772f5de50cb60224672 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Fri, 4 Apr 2014 17:03:49 +0000 Subject: [PATCH] Minor Update git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget@94400 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/batch/ReplaceBatchDialog.java | 1 + .../client/batch/ReplaceBatchPanel.java | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/ReplaceBatchDialog.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/ReplaceBatchDialog.java index 506e773..1ed7493 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/ReplaceBatchDialog.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/ReplaceBatchDialog.java @@ -83,6 +83,7 @@ public class ReplaceBatchDialog extends Window { + caught.getLocalizedMessage()); UtilsGXT3.alert("Error on batch replace", "Error on batch replace"); + close(); } diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/ReplaceBatchPanel.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/ReplaceBatchPanel.java index 92a1742..5e1c7ab 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/ReplaceBatchPanel.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/ReplaceBatchPanel.java @@ -85,7 +85,7 @@ public class ReplaceBatchPanel extends FramedPanel implements protected static final String DON_T_REPLACE = "Don't replace"; - private TextButton btnApply; + private TextButton btnSave; private TextButton btnClose; protected ListLoader> loader; @@ -250,14 +250,15 @@ public class ReplaceBatchPanel extends FramedPanel implements toolBar.addStyleName(ThemeStyles.getStyle().borderTop()); toolBar.getElement().getStyle().setProperty("borderBottom", "none"); - btnApply = new TextButton("Save"); - btnApply.setIcon(ResourceBundle.INSTANCE.save()); - btnApply.setIconAlign(IconAlign.RIGHT); - btnApply.setTitle("Apply Filter"); - btnApply.addSelectHandler(new SelectHandler() { + btnSave = new TextButton("Save"); + btnSave.setIcon(ResourceBundle.INSTANCE.save()); + btnSave.setIconAlign(IconAlign.RIGHT); + btnSave.setTitle("Save"); + btnSave.addSelectHandler(new SelectHandler() { public void onSelect(SelectEvent event) { - Log.debug("Pressed Apply"); + Log.debug("Pressed Save"); + btnSave.disable(); save(); } @@ -279,7 +280,7 @@ public class ReplaceBatchPanel extends FramedPanel implements flowButton.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE); flowButton.setPack(BoxLayoutPack.CENTER); - flowButton.add(btnApply, new BoxLayoutData(new Margins(2, 4, 2, 4))); + flowButton.add(btnSave, new BoxLayoutData(new Margins(2, 4, 2, 4))); flowButton.add(btnClose, new BoxLayoutData(new Margins(2, 4, 2, 4))); VerticalLayoutContainer v = new VerticalLayoutContainer(); @@ -449,6 +450,7 @@ public class ReplaceBatchPanel extends FramedPanel implements if (effectiveReplaceList.size() == 0) { UtilsGXT3 .alert("Attention", "Select at least one value to replace"); + btnSave.enable(); } else { startReplaceBatch(effectiveReplaceList); }