Skip to content
Snippets Groups Projects
Commit 9818cf52 authored by buczekp's avatar buczekp
Browse files

[LMS-2441] minor: added progress bar to trash operations

SVN: 22404
parent cb4c94b5
No related branches found
No related tags found
No related merge requests found
......@@ -19,8 +19,10 @@ package ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.deleti
import java.util.Collections;
import java.util.List;
import com.google.gwt.user.client.rpc.AsyncCallback;
import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAsync;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.AbstractAsyncCallback;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.AsyncCallbackWithProgressBar;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.AbstractDataConfirmationDialog;
......@@ -35,15 +37,15 @@ public final class EmptyTrashConfirmationDialog extends
private final IViewContext<ICommonClientServiceAsync> viewContext;
private final AbstractAsyncCallback<Void> callback;
private final AsyncCallback<Void> callback;
public EmptyTrashConfirmationDialog(IViewContext<ICommonClientServiceAsync> viewContext,
AbstractAsyncCallback<Void> callback)
AsyncCallback<Void> callback)
{
super(viewContext, Collections.<Deletion> emptyList(), viewContext
.getMessage(Dict.EMPTY_TRASH_CONFIRMATION_TITLE));
this.viewContext = viewContext;
this.callback = callback;
this.callback = AsyncCallbackWithProgressBar.decorate(callback, "Emptying trash...");
}
@Override
......
......@@ -19,8 +19,10 @@ package ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.deleti
import java.util.Collections;
import java.util.List;
import com.google.gwt.user.client.rpc.AsyncCallback;
import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAsync;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.AbstractAsyncCallback;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.AsyncCallbackWithProgressBar;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.AbstractDataConfirmationDialog;
......@@ -36,19 +38,19 @@ public final class PermanentDeletionConfirmationDialog extends
private final IViewContext<ICommonClientServiceAsync> viewContext;
private final AbstractAsyncCallback<Void> callback;
private final AsyncCallback<Void> callback;
public PermanentDeletionConfirmationDialog(IViewContext<ICommonClientServiceAsync> viewContext,
List<Deletion> deletions, AbstractAsyncCallback<Void> callback)
List<Deletion> deletions, AsyncCallback<Void> callback)
{
super(viewContext, deletions, viewContext
.getMessage(Dict.PERMANENT_DELETIONS_CONFIRMATION_TITLE));
this.viewContext = viewContext;
this.callback = callback;
this.callback = AsyncCallbackWithProgressBar.decorate(callback, "Deleting permanently...");
}
public PermanentDeletionConfirmationDialog(IViewContext<ICommonClientServiceAsync> viewContext,
Deletion deletion, AbstractAsyncCallback<Void> callback)
Deletion deletion, AsyncCallback<Void> callback)
{
this(viewContext, Collections.singletonList(deletion), callback);
}
......
......@@ -19,8 +19,10 @@ package ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.deleti
import java.util.Collections;
import java.util.List;
import com.google.gwt.user.client.rpc.AsyncCallback;
import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAsync;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.AbstractAsyncCallback;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.AsyncCallbackWithProgressBar;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.renderer.DateRenderer;
......@@ -40,12 +42,12 @@ public final class RevertDeletionConfirmationDialog extends
private final IViewContext<ICommonClientServiceAsync> viewContext;
private final AbstractAsyncCallback<Void> callback;
private final AsyncCallback<Void> callback;
private final IEntityWithDeletionInformation deletedEntityOrNull;
public RevertDeletionConfirmationDialog(IViewContext<ICommonClientServiceAsync> viewContext,
List<Deletion> deletions, AbstractAsyncCallback<Void> callback)
List<Deletion> deletions, AsyncCallback<Void> callback)
{
super(viewContext, deletions, viewContext
.getMessage(Dict.REVERT_DELETIONS_CONFIRMATION_TITLE));
......@@ -55,18 +57,18 @@ public final class RevertDeletionConfirmationDialog extends
}
public RevertDeletionConfirmationDialog(IViewContext<ICommonClientServiceAsync> viewContext,
Deletion deletion, AbstractAsyncCallback<Void> callback)
Deletion deletion, AsyncCallback<Void> callback)
{
this(viewContext, Collections.singletonList(deletion), callback);
}
public RevertDeletionConfirmationDialog(IViewContext<ICommonClientServiceAsync> viewContext,
IEntityWithDeletionInformation deletedEntity, AbstractAsyncCallback<Void> callback)
IEntityWithDeletionInformation deletedEntity, AsyncCallback<Void> callback)
{
super(viewContext, Collections.singletonList(deletedEntity.getDeletion()), viewContext
.getMessage(Dict.REVERT_DELETIONS_CONFIRMATION_TITLE));
this.viewContext = viewContext;
this.callback = callback;
this.callback = AsyncCallbackWithProgressBar.decorate(callback, "Reverting deletion(s)...");
this.deletedEntityOrNull = deletedEntity;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment