git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@181798 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
c8014db7aa
commit
8acfe7ad09
|
@ -5,18 +5,9 @@
|
|||
<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-uploader-2.0.3-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/workspace-uploader-TRUNK/workspace-uploader-TRUNK">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="storagehub-client-wrapper-0.6.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/storagehub-client-wrapper-TRUNK/storagehub-client-wrapper-TRUNK">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="workspace-tree-widget-6.27.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/WorkspaceTree-TRUNK/WorkspaceTree-TRUNK">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="ws-thredds-sync-widget-1.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/ws-thredds-sync-widget-TRUNK/ws-thredds-sync-widget-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"/>
|
||||
</wb-module>
|
||||
|
|
|
@ -34,8 +34,7 @@ import org.gcube.portlets.user.workspace.client.event.FileUploadEventHandler;
|
|||
import org.gcube.portlets.user.workspace.client.event.GetFolderLinkEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.GetInfoEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.GetInfoEventHandler;
|
||||
import org.gcube.portlets.user.workspace.client.event.GetPublicLinkEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.GetPublicLinkEventHandler;
|
||||
import org.gcube.portlets.user.workspace.client.event.GetShareableLink;
|
||||
import org.gcube.portlets.user.workspace.client.event.ImagePreviewEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.ImagePreviewEventHandler;
|
||||
import org.gcube.portlets.user.workspace.client.event.LoadTreeEvent;
|
||||
|
@ -59,8 +58,6 @@ import org.gcube.portlets.user.workspace.client.gridevent.DoubleClickElementSele
|
|||
import org.gcube.portlets.user.workspace.client.gridevent.DoubleClickElementSelectedEventHandler;
|
||||
import org.gcube.portlets.user.workspace.client.gridevent.FileVersioningEvent;
|
||||
import org.gcube.portlets.user.workspace.client.gridevent.FileVersioningEventHandler;
|
||||
import org.gcube.portlets.user.workspace.client.gridevent.GetShareLinkEvent;
|
||||
import org.gcube.portlets.user.workspace.client.gridevent.GetSharedLinkEventHandler;
|
||||
import org.gcube.portlets.user.workspace.client.gridevent.GridElementSelectedEvent;
|
||||
import org.gcube.portlets.user.workspace.client.gridevent.GridElementSelectedEventHandler;
|
||||
import org.gcube.portlets.user.workspace.client.gridevent.GridElementUnSelectedEvent;
|
||||
|
@ -312,16 +309,16 @@ public class AppController implements SubscriberInterface {
|
|||
});
|
||||
|
||||
|
||||
eventBus.addHandler(GetPublicLinkEvent.TYPE, new GetPublicLinkEventHandler() {
|
||||
|
||||
@Override
|
||||
public void onGetPublicLink(GetPublicLinkEvent getPublicLinkEvent) {
|
||||
// TODO Auto-generated method stub
|
||||
if(getPublicLinkEvent.getSourceFile()!=null){
|
||||
AppControllerExplorer.getEventBus().fireEvent(new GetPublicLinkEvent(getPublicLinkEvent.getSourceFile(), getPublicLinkEvent.getVersion()));
|
||||
}
|
||||
}
|
||||
});
|
||||
// eventBus.addHandler(GetPublicLinkEvent.TYPE, new GetPublicLinkEventHandler() {
|
||||
//
|
||||
// @Override
|
||||
// public void onGetPublicLink(GetPublicLinkEvent getPublicLinkEvent) {
|
||||
// // TODO Auto-generated method stub
|
||||
// if(getPublicLinkEvent.getSourceFile()!=null){
|
||||
// AppControllerExplorer.getEventBus().fireEvent(new GetPublicLinkEvent(getPublicLinkEvent.getSourceFile(), getPublicLinkEvent.getVersion()));
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
eventBus.addHandler(AccountingHistoryEvent.TYPE, new AccountingHistoryEventHandler() {
|
||||
|
||||
|
@ -364,16 +361,16 @@ public class AppController implements SubscriberInterface {
|
|||
}
|
||||
});
|
||||
|
||||
eventBus.addHandler(GetShareLinkEvent.TYPE, new GetSharedLinkEventHandler() {
|
||||
|
||||
@Override
|
||||
public void onGetLink(GetShareLinkEvent getLinkEvent) {
|
||||
|
||||
FileModel getLinkFile = getLinkEvent.getSourceFile()!=null?getLinkEvent.getSourceFile():wsPortlet.getToolBarPath().getLastParent();
|
||||
GWT.log("Fired from WS GetShareLinkEvent on: "+getLinkFile);
|
||||
AppControllerExplorer.getEventBus().fireEvent(new org.gcube.portlets.user.workspace.client.event.GetShareLinkEvent(getLinkFile));
|
||||
}
|
||||
});
|
||||
// eventBus.addHandler(GetShareLinkEvent.TYPE, new GetSharedLinkEventHandler() {
|
||||
//
|
||||
// @Override
|
||||
// public void onGetLink(GetShareLinkEvent getLinkEvent) {
|
||||
//
|
||||
// FileModel getLinkFile = getLinkEvent.getSourceFile()!=null?getLinkEvent.getSourceFile():wsPortlet.getToolBarPath().getLastParent();
|
||||
// GWT.log("Fired from WS GetShareLinkEvent on: "+getLinkFile);
|
||||
// AppControllerExplorer.getEventBus().fireEvent(new org.gcube.portlets.user.workspace.client.event.GetShareLinkEvent(getLinkFile));
|
||||
// }
|
||||
// });
|
||||
|
||||
eventBus.addHandler(GridRefreshEvent.TYPE, new GridRefreshEventHandler() {
|
||||
|
||||
|
@ -2043,7 +2040,9 @@ public class AppController implements SubscriberInterface {
|
|||
|
||||
fileVersioningEvent.getWinVersioning().mask("performing operation...");
|
||||
FileVersionModel version = fileVersioningEvent.getSelectedVersions().get(0);
|
||||
AppControllerExplorer.getEventBus().fireEvent(new GetPublicLinkEvent(currentVersion, version.getName()));
|
||||
//AppControllerExplorer.getEventBus().fireEvent(new GetPublicLinkEvent(currentVersion, version.getName()));
|
||||
//new DialogShareableLink(currentVersion, version.getName());
|
||||
AppControllerExplorer.getEventBus().fireEvent(new GetShareableLink(currentVersion, version.getName()));
|
||||
fileVersioningEvent.getWinVersioning().unmask();
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package org.gcube.portlets.user.workspace.client.view.toolbars;
|
|||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.workspace.client.AppController;
|
||||
import org.gcube.portlets.user.workspace.client.AppControllerExplorer;
|
||||
import org.gcube.portlets.user.workspace.client.ConstantsExplorer.WS_UPLOAD_TYPE;
|
||||
import org.gcube.portlets.user.workspace.client.ConstantsPortlet;
|
||||
import org.gcube.portlets.user.workspace.client.ConstantsPortlet.ViewSwitchTypeInResult;
|
||||
|
@ -11,18 +12,16 @@ import org.gcube.portlets.user.workspace.client.event.DeleteItemEvent;
|
|||
import org.gcube.portlets.user.workspace.client.event.FileDownloadEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.FileDownloadEvent.DownloadType;
|
||||
import org.gcube.portlets.user.workspace.client.event.FileUploadEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.GetPublicLinkEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.GetShareableLink;
|
||||
import org.gcube.portlets.user.workspace.client.event.ImagePreviewEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.RenameItemEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.WebDavUrlEvent;
|
||||
import org.gcube.portlets.user.workspace.client.gridevent.ActiveGroupingView;
|
||||
import org.gcube.portlets.user.workspace.client.gridevent.DoubleClickElementSelectedEvent;
|
||||
import org.gcube.portlets.user.workspace.client.gridevent.GetShareLinkEvent;
|
||||
import org.gcube.portlets.user.workspace.client.gridevent.GridRefreshEvent;
|
||||
import org.gcube.portlets.user.workspace.client.gridevent.MoveItemsGEvent;
|
||||
import org.gcube.portlets.user.workspace.client.gridevent.ShowUrlEvent;
|
||||
import org.gcube.portlets.user.workspace.client.gridevent.VREChangePermissionsEvent;
|
||||
import org.gcube.portlets.user.workspace.client.gridevent.WsGetFolderLinkEvent;
|
||||
import org.gcube.portlets.user.workspace.client.interfaces.GXTFolderItemTypeEnum;
|
||||
import org.gcube.portlets.user.workspace.client.model.FileGridModel;
|
||||
import org.gcube.portlets.user.workspace.client.model.FileModel;
|
||||
|
@ -64,7 +63,7 @@ public class GxtToolBarItemFunctionality {
|
|||
private Button btnPreview;
|
||||
private ToggleButton btnGridView;
|
||||
// private Button btnGetInfo;
|
||||
private Button btnGetSharedLink;
|
||||
//private Button btnGetSharedLink;
|
||||
private Button btnPublicLink;
|
||||
//private Button btnFolderLink;
|
||||
private Button btnMoveItems;
|
||||
|
@ -176,14 +175,14 @@ public class GxtToolBarItemFunctionality {
|
|||
// toolBar.add(new SeparatorToolItem());
|
||||
toolBar.add(new SeparatorToolItem());
|
||||
|
||||
btnGetSharedLink = new Button("Share Link", Resources.getIconShareLink());
|
||||
btnGetSharedLink.setScale(ButtonScale.SMALL);
|
||||
btnGetSharedLink.setIconAlign(IconAlign.TOP);
|
||||
btnGetSharedLink.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
// btnGetSharedLink = new Button("Share Link", Resources.getIconShareLink());
|
||||
// btnGetSharedLink.setScale(ButtonScale.SMALL);
|
||||
// btnGetSharedLink.setIconAlign(IconAlign.TOP);
|
||||
// btnGetSharedLink.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
//
|
||||
// toolBar.add(btnGetSharedLink);
|
||||
|
||||
toolBar.add(btnGetSharedLink);
|
||||
|
||||
btnPublicLink = new Button("Public Link", Resources.getIconPublicLink());
|
||||
btnPublicLink = new Button("Get Shareable Link", Resources.getIconShareLink());
|
||||
btnPublicLink.setScale(ButtonScale.SMALL);
|
||||
btnPublicLink.setIconAlign(IconAlign.TOP);
|
||||
btnPublicLink.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
|
@ -308,17 +307,17 @@ public class GxtToolBarItemFunctionality {
|
|||
});
|
||||
|
||||
|
||||
btnGetSharedLink.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
||||
|
||||
@Override
|
||||
public void componentSelected(ButtonEvent ce) {
|
||||
|
||||
final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem();
|
||||
|
||||
AppController.getEventBus().fireEvent(new GetShareLinkEvent(fileGridModel));
|
||||
|
||||
}
|
||||
});
|
||||
// btnGetSharedLink.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
||||
//
|
||||
// @Override
|
||||
// public void componentSelected(ButtonEvent ce) {
|
||||
//
|
||||
// final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem();
|
||||
//
|
||||
// AppController.getEventBus().fireEvent(new GetShareLinkEvent(fileGridModel));
|
||||
//
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
|
||||
|
@ -364,13 +363,13 @@ public class GxtToolBarItemFunctionality {
|
|||
|
||||
final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem();
|
||||
|
||||
|
||||
|
||||
if(fileGridModel.isDirectory()) {
|
||||
AppController.getEventBus().fireEvent(new WsGetFolderLinkEvent(fileGridModel));
|
||||
}else {
|
||||
AppController.getEventBus().fireEvent(new GetPublicLinkEvent(fileGridModel, null));
|
||||
}
|
||||
// if(fileGridModel.isDirectory()) {
|
||||
// AppController.getEventBus().fireEvent(new WsGetFolderLinkEvent(fileGridModel));
|
||||
// }else {
|
||||
// AppController.getEventBus().fireEvent(new GetPublicLinkEvent(fileGridModel, null));
|
||||
// }
|
||||
//
|
||||
AppControllerExplorer.getEventBus().fireEvent(new GetShareableLink(fileGridModel, null));
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -605,7 +604,7 @@ public class GxtToolBarItemFunctionality {
|
|||
this.btnPreview.disable();
|
||||
this.btnPublicLink.disable();
|
||||
//this.btnFolderLink.disable();
|
||||
this.btnGetSharedLink.disable();
|
||||
//this.btnGetSharedLink.disable();
|
||||
this.btnSetPermission.disable();
|
||||
this.btnMoveItems.disable();
|
||||
|
||||
|
@ -735,7 +734,7 @@ public class GxtToolBarItemFunctionality {
|
|||
*/
|
||||
public void activeButtonForSharing(boolean active){
|
||||
|
||||
this.btnGetSharedLink.setEnabled(active);
|
||||
//this.btnGetSharedLink.setEnabled(active);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -747,7 +746,7 @@ public class GxtToolBarItemFunctionality {
|
|||
|
||||
btnRemoveItem.setEnabled(active);
|
||||
btnRenameItem.setEnabled(active);
|
||||
btnGetSharedLink.setEnabled(active);
|
||||
//btnGetSharedLink.setEnabled(active);
|
||||
btnDownloadFile.setEnabled(active);
|
||||
btnPreview.setEnabled(active);
|
||||
btnOpen.setEnabled(active);
|
||||
|
@ -765,7 +764,7 @@ public class GxtToolBarItemFunctionality {
|
|||
this.btnRenameItem.setEnabled(!active);
|
||||
this.btnDownloadFile.setEnabled(!active);
|
||||
this.btnOpen.setEnabled(!active);
|
||||
this.btnGetSharedLink.setEnabled(!active);
|
||||
//this.btnGetSharedLink.setEnabled(!active);
|
||||
this.btnPublicLink.setEnabled(!active);
|
||||
//this.btnFolderLink.setEnabled(!active);
|
||||
this.btnSetPermission.setEnabled(!active);
|
||||
|
|
Loading…
Reference in New Issue