429: Workspace: uploading big files

Task-Url: https://support.d4science.org/issues/429

Deleting many files now is modal

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@119760 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2015-10-14 15:14:48 +00:00
parent 210133ec30
commit 3606011470
4 changed files with 53 additions and 4 deletions

View File

@ -8,6 +8,9 @@
<dependent-module archiveName="workspace-tree-widget-6.9.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/workspace-tree-widget-TRUNK/workspace-tree-widget-TRUNK">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="workspace-uploader-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/workspace-uploader-1.0.0-SNAPSHOT-TRUNK/workspace-uploader-1.0.0-SNAPSHOT-TRUNK">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
<property name="context-root" value="workspace"/>

View File

@ -100,6 +100,7 @@ import org.gcube.portlets.user.workspace.client.view.panels.GxtBorderLayoutPanel
import org.gcube.portlets.user.workspace.client.view.panels.GxtItemsPanel;
import org.gcube.portlets.user.workspace.client.view.toolbars.GxtBreadcrumbPathPanel;
import org.gcube.portlets.user.workspace.client.view.trash.WindowTrash;
import org.gcube.portlets.user.workspace.client.view.windows.DialogConfirm;
import org.gcube.portlets.user.workspace.client.view.windows.DialogGetInfo;
import org.gcube.portlets.user.workspace.client.view.windows.InfoDisplay;
import org.gcube.portlets.user.workspace.client.view.windows.MessageBoxAlert;
@ -122,6 +123,8 @@ import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.RunAsyncCallback;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.shared.HandlerManager;
import com.google.gwt.user.client.Cookies;
import com.google.gwt.user.client.Timer;
@ -853,8 +856,51 @@ public class AppController implements SubscriberInterface {
final FileModel target = parent;
int size = event.getListTarget().size();
final int size = event.getListTarget().size();
final DialogConfirm confirm = new DialogConfirm(null, ConstantsExplorer.MESSAGE_DELETE,"Are you sure you want to delete "+size+" items?");
confirm.setModal(true);
confirm.center();
confirm.getYesButton().addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent clickEvent) {
confirm.loader("Deleting "+size+ " items, please wait");
// wsPortlet.getGridGroupContainer().mask("Deleting",ConstantsExplorer.LOADINGSTYLE);
appContrExplorer.getRpcWorkspaceService().deleteListItemsForIds(event.getListTarget(), new AsyncCallback<Void>() {
@Override
public void onFailure(Throwable arg0) {
confirm.hide();
new MessageBoxAlert("Error", arg0.getMessage(),null);
wsPortlet.getGridGroupContainer().unmask();
appContrExplorer.refreshRoot(true);
}
@Override
public void onSuccess(Void arg0) {
confirm.hide();
//Deleting item from grid
for (String id : event.getListTarget()) {
deleteItem(id);
}
// wsPortlet.getGridGroupContainer().unmask();
GWT.log("target: "+target);
if(wsPortlet.getSearchAndFilterContainer().isSearchActive()){
appContrExplorer.refreshRoot(false);
}else
AppControllerExplorer.getEventBus().fireEvent(new RefreshFolderEvent(target, true, false, true));
}
});
}
});
/*
MessageBoxConfirm mbc = new MessageBoxConfirm(ConstantsExplorer.MESSAGE_DELETE, "Are you sure you want to delete "+size+" items?");
mbc.getMessageBoxConfirm().addCallback(new Listener<MessageBoxEvent>() {
@ -897,7 +943,7 @@ public class AppController implements SubscriberInterface {
});
}
}
});
});*/
}
}

View File

@ -12,7 +12,7 @@ public class ConstantsPortlet {
public static final String REFRESH = "Refresh";
public static final String ADDFOLDER = "New Folder";
public static final String REMOVEITEM = "Remove";
public static final String DELETEITEM = "Delete";
public static final String RENAMEITEM = "Rename";
public static final String UPLOADFILE = "Upload";
public static final String DOWNLOADITEM = "Download";

View File

@ -124,7 +124,7 @@ public class GxtToolBarItemFunctionality {
// toolBar.add(btnGetInfo);
// toolBar.add(new SeparatorToolItem());
btnRemoveItem = new Button(ConstantsPortlet.REMOVEITEM,
btnRemoveItem = new Button(ConstantsPortlet.DELETEITEM,
Resources.getIconDeleteItem());
btnRemoveItem.setScale(ButtonScale.SMALL);
btnRemoveItem.setIconAlign(IconAlign.TOP);