updated workspace size
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@101283 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
c7eb12d982
commit
f9db962850
|
@ -3,6 +3,6 @@
|
|||
>>>>>>>=.r93212
|
||||
eclipse.preferences.version=1
|
||||
jarsExcludedFromWebInfLib=
|
||||
lastWarOutDir=/Users/massi/Documents/workspace/workspace/target/workspace-6.7.0-SNAPSHOT
|
||||
lastWarOutDir=/home/francesco-mangiacrapa/wseclipse/workspace/target/workspace-6.7.0-SNAPSHOT
|
||||
warSrcDir=src/main/webapp
|
||||
warSrcDirIsOutput=false
|
||||
|
|
|
@ -81,6 +81,8 @@ import org.gcube.portlets.user.workspace.client.event.StoreGridChangedEvent;
|
|||
import org.gcube.portlets.user.workspace.client.event.StoreGridChangedEventHandler;
|
||||
import org.gcube.portlets.user.workspace.client.event.TrashEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.TrashEventHandler;
|
||||
import org.gcube.portlets.user.workspace.client.event.UpdateWorkspaceSizeEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.UpdateWorkspaceSizeEventHandler;
|
||||
import org.gcube.portlets.user.workspace.client.event.VREChangePermissionsEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.VREChangePermissionsEventHandler;
|
||||
import org.gcube.portlets.user.workspace.client.event.VRESettingPermissionEvent;
|
||||
|
@ -190,6 +192,14 @@ public class AppController implements SubscriberInterface {
|
|||
AppControllerExplorer.getInstance().doClickUrl(openUrlEvent);
|
||||
}
|
||||
});
|
||||
|
||||
eventBus.addHandler(UpdateWorkspaceSizeEvent.TYPE, new UpdateWorkspaceSizeEventHandler() {
|
||||
|
||||
@Override
|
||||
public void onUpdateWorkspaceSize(UpdateWorkspaceSizeEvent updateWorkspaceSizeEvent) {
|
||||
updateWorksapaceSize(true);
|
||||
}
|
||||
});
|
||||
|
||||
eventBus.addHandler(StoreGridChangedEvent.TYPE, new StoreGridChangedEventHandler() {
|
||||
|
||||
|
@ -1256,7 +1266,7 @@ public class AppController implements SubscriberInterface {
|
|||
}
|
||||
|
||||
private void setWorkspaceSize(String size){
|
||||
String html = "<div style=\"width: 100%; text-align: left; font-size: 9px; padding: 5px;\">" + size +" of private storage used</div>";
|
||||
String html = "<div style=\"width: 100%; text-align: left; font-size: 9px; padding: 5px;\">" + size +" of space storage used</div>";
|
||||
htmlWorkspaceSize.setHTML(html);
|
||||
}
|
||||
|
||||
|
@ -1784,6 +1794,7 @@ public class AppController implements SubscriberInterface {
|
|||
}
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
||||
default:{
|
||||
|
||||
|
|
|
@ -3,7 +3,9 @@ package org.gcube.portlets.user.workspace.client.view.trash;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.workspace.client.AppController;
|
||||
import org.gcube.portlets.user.workspace.client.ConstantsExplorer;
|
||||
import org.gcube.portlets.user.workspace.client.event.UpdateWorkspaceSizeEvent;
|
||||
import org.gcube.portlets.user.workspace.client.model.FileTrashedModel;
|
||||
import org.gcube.portlets.user.workspace.client.resources.Resources;
|
||||
import org.gcube.portlets.user.workspace.shared.WorkspaceTrashOperation;
|
||||
|
@ -90,6 +92,7 @@ public class WindowTrash extends Window {
|
|||
@Override
|
||||
public void handleEvent(StoreEvent<ModelData> be) {
|
||||
updateItemsNumber(storeSize());
|
||||
// AppController.getEventBus().fireEvent(new UpdateWorkspaceSizeEvent());
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -98,6 +101,7 @@ public class WindowTrash extends Window {
|
|||
@Override
|
||||
public void handleEvent(StoreEvent<ModelData> be) {
|
||||
updateItemsNumber(storeSize());
|
||||
AppController.getEventBus().fireEvent(new UpdateWorkspaceSizeEvent());
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -106,6 +110,7 @@ public class WindowTrash extends Window {
|
|||
@Override
|
||||
public void handleEvent(StoreEvent<ModelData> be) {
|
||||
updateItemsNumber(storeSize());
|
||||
AppController.getEventBus().fireEvent(new UpdateWorkspaceSizeEvent());
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue