updated to manage "Add Administrators" https://support.social.isti.cnr.it/ticket/126
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@98507 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
7d87ea6c92
commit
70703a186e
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/workspace-6.6.5-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<classpathentry kind="src" output="target/workspace-6.6.7-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
|
@ -25,5 +25,5 @@
|
|||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/workspace-6.6.5-SNAPSHOT/WEB-INF/classes"/>
|
||||
<classpathentry kind="output" path="target/workspace-6.6.7-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
>>>>>>>=.r93212
|
||||
eclipse.preferences.version=1
|
||||
jarsExcludedFromWebInfLib=
|
||||
lastWarOutDir=/home/francesco-mangiacrapa/wseclipse/workspace-TRUNK/target/workspace-6.6.5-SNAPSHOT
|
||||
lastWarOutDir=/home/francesco-mangiacrapa/wseclipse/workspace-TRUNK/target/workspace-6.6.7-SNAPSHOT
|
||||
warSrcDir=src/main/webapp
|
||||
warSrcDirIsOutput=false
|
||||
|
|
|
@ -5,7 +5,10 @@
|
|||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<dependent-module archiveName="workspace-tree-widget-6.6.6-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/workspace-tree-widget-BRANCH-6.6.6-SNAPSHOT/workspace-tree-widget-BRANCH-6.6.6-SNAPSHOT">
|
||||
<dependent-module archiveName="workspace-tree-widget-6.6.7-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-sharing-widget-1.1.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/workspace-sharing-widget-TRUNK/workspace-sharing-widget-TRUNK">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@ import org.gcube.portlets.user.workspace.client.event.AccountingReadersEvent;
|
|||
import org.gcube.portlets.user.workspace.client.event.AccountingReadersEventHandler;
|
||||
import org.gcube.portlets.user.workspace.client.event.ActiveGroupingView;
|
||||
import org.gcube.portlets.user.workspace.client.event.ActiveGroupingViewHandler;
|
||||
import org.gcube.portlets.user.workspace.client.event.AddAdministratorEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.AddAdministratorEventHandler;
|
||||
import org.gcube.portlets.user.workspace.client.event.AddFolderEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.AddFolderEventHandler;
|
||||
import org.gcube.portlets.user.workspace.client.event.AddSmartFolderEvent;
|
||||
|
@ -184,6 +186,18 @@ public class AppController implements SubscriberInterface {
|
|||
}
|
||||
});
|
||||
|
||||
eventBus.addHandler(AddAdministratorEvent.TYPE, new AddAdministratorEventHandler() {
|
||||
|
||||
@Override
|
||||
public void onAddAdministrator(AddAdministratorEvent addAdministratorEvent) {
|
||||
FileModel parent = wsPortlet.getToolBarPath().getLastParent();
|
||||
|
||||
if(parent!=null)
|
||||
AppControllerExplorer.getEventBus().fireEvent(new AddAdministratorEvent(parent));
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
eventBus.addHandler(TrashEvent.TYPE, new TrashEventHandler() {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,12 +3,14 @@ package org.gcube.portlets.user.workspace.client.view.toolbars;
|
|||
import org.gcube.portlets.user.workspace.client.AppController;
|
||||
import org.gcube.portlets.user.workspace.client.event.AccountingHistoryEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.AccountingReadersEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.AddAdministratorEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.GetInfoEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.TrashEvent;
|
||||
import org.gcube.portlets.user.workspace.client.resources.Resources;
|
||||
import org.gcube.portlets.user.workspace.client.util.GetPermissionIconByACL;
|
||||
import org.gcube.portlets.user.workspace.shared.WorkspaceACL;
|
||||
import org.gcube.portlets.user.workspace.shared.WorkspaceTrashOperation;
|
||||
import org.gcube.portlets.user.workspace.shared.WorkspaceACL.USER_TYPE;
|
||||
|
||||
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
|
||||
import com.extjs.gxt.ui.client.event.BaseEvent;
|
||||
|
@ -44,6 +46,8 @@ public class GxtBottomToolBarItem extends ToolBar{
|
|||
*
|
||||
*/
|
||||
protected static final String HISTORY = "History";
|
||||
private static final String ADD_ADMINISTRATOR = "Add Admnistrator/s";
|
||||
|
||||
private TextField<String> txfName = new TextField<String>();
|
||||
private Text txtOwner = new Text("Empty");
|
||||
private Text txtCreationTime = new Text("Empty");
|
||||
|
@ -56,6 +60,7 @@ public class GxtBottomToolBarItem extends ToolBar{
|
|||
private ACLDivInfo aclDivInfo;
|
||||
private Label labelItemsNumber = new Label();
|
||||
private HorizontalPanel hpItemsNumber;
|
||||
private Button btnAddAdmin;
|
||||
|
||||
public GxtBottomToolBarItem(){
|
||||
super();
|
||||
|
@ -113,6 +118,20 @@ public class GxtBottomToolBarItem extends ToolBar{
|
|||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
btnAddAdmin = new Button(ADD_ADMINISTRATOR);
|
||||
btnAddAdmin.setIcon(Resources.getIconAddAdministrator());
|
||||
btnAddAdmin.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
||||
|
||||
@Override
|
||||
public void componentSelected(ButtonEvent ce) {
|
||||
|
||||
AppController.getEventBus().fireEvent(new AddAdministratorEvent(null));
|
||||
}
|
||||
});
|
||||
|
||||
setVisibleAddAdministrators(false);
|
||||
|
||||
aclDivInfo = new ACLDivInfo("", null);
|
||||
|
||||
|
@ -148,12 +167,17 @@ public class GxtBottomToolBarItem extends ToolBar{
|
|||
FillToolItem filler = new FillToolItem();
|
||||
filler.setId("filler-item");
|
||||
add(filler);
|
||||
add(btnAddAdmin);
|
||||
add(aclDivInfo);
|
||||
|
||||
enableInfoHistoryButtons(false);
|
||||
|
||||
}
|
||||
|
||||
private void setVisibleAddAdministrators(boolean bool){
|
||||
btnAddAdmin.setVisible(bool);
|
||||
}
|
||||
|
||||
|
||||
public void resetDetails(){
|
||||
|
||||
|
@ -194,12 +218,18 @@ public class GxtBottomToolBarItem extends ToolBar{
|
|||
|
||||
|
||||
public void updateACLInfo(WorkspaceACL acl){
|
||||
setVisibleAddAdministrators(false);
|
||||
|
||||
if(acl==null){
|
||||
aclDivInfo.updateInfo(null, null);
|
||||
return;
|
||||
}
|
||||
AbstractImagePrototype img = GetPermissionIconByACL.getImage(acl);
|
||||
|
||||
if(acl.getUserType().equals(USER_TYPE.ADMINISTRATOR)){
|
||||
setVisibleAddAdministrators(true);
|
||||
}
|
||||
|
||||
aclDivInfo.updateInfo(acl.getLabel(), img);
|
||||
this.layout();
|
||||
}
|
||||
|
|
|
@ -17,25 +17,30 @@
|
|||
<servlet-name>uploadprogress</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.widgets.fileupload.server.UploadProgressServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>uploadprogress</servlet-name>
|
||||
<url-pattern>/workspace/uploadprogress</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
|
||||
<!-- DO NOT CHANGE - DO NOT Replace URL PATTERN HERE -->
|
||||
<servlet>
|
||||
<servlet-name>upload</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.widgets.fileupload.server.UploadServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>upload</servlet-name>
|
||||
<url-pattern>/FileUpload/upload</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
|
||||
<servlet>
|
||||
<servlet-name>workspacesharing</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.widgets.workspacesharingwidget.server.WorkspaceSharingServiceImpl</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<!-- END DO NOT CHANGE -->
|
||||
|
||||
|
||||
<servlet>
|
||||
<servlet-name>UploadService</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.user.workspace.server.UploadServlet</servlet-class>
|
||||
|
@ -45,22 +50,21 @@
|
|||
<servlet-name>UploadService</servlet-name>
|
||||
<url-pattern>/workspace/UploadService</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
|
||||
|
||||
|
||||
<servlet>
|
||||
<servlet-name>LocalUploadService</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.user.workspace.server.LocalUploadServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>workspacesharing</servlet-name>
|
||||
<url-pattern>/workspace/workspacesharing</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>LocalUploadService</servlet-name>
|
||||
<url-pattern>/workspace/LocalUploadService</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
|
||||
|
||||
|
||||
<servlet>
|
||||
<servlet-name>LocalUploadService</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.user.workspace.server.LocalUploadServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>DownloadService</servlet-name>
|
||||
|
@ -153,7 +157,7 @@
|
|||
<servlet-name>quicktourServlet</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.widgets.guidedtour.server.TourServiceImpl</servlet-class>
|
||||
</servlet>
|
||||
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>quicktourServlet</servlet-name>
|
||||
<url-pattern>/workspace/quicktourServlet</url-pattern>
|
||||
|
|
Loading…
Reference in New Issue