[Task #13106] Provide public links for versioned files
Updated pom version at 6.21.1 git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@176393 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
b0e10c9a65
commit
a39fb24f13
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/workspace-6.20.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<classpathentry kind="src" output="target/workspace-6.21.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/workspace-6.20.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<classpathentry excluding="**" kind="src" output="target/workspace-6.21.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
@ -34,5 +34,5 @@
|
|||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="com.gwtplugins.gwt.eclipse.core.GWT_CONTAINER/gwt-2.7.0"/>
|
||||
<classpathentry kind="output" path="target/workspace-6.20.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
<classpathentry kind="output" path="target/workspace-6.21.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
<wb-module deploy-name="workspace-portlet">
|
||||
<wb-module deploy-name="workspace-TRUNK-portlet">
|
||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
<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="client-context-library-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/client-context-library/client-context-library">
|
||||
<dependent-module archiveName="storagehub-client-wrapper-0.4.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/storagehub-client-wrapper/storagehub-client-wrapper">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="workspace-tree-widget-6.21.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/WorkspaceTree/WorkspaceTree">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="storagehub-icons-library-1.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/storagehub-icons-library/storagehub-icons-library">
|
||||
<dependent-module archiveName="workspace-tree-widget-6.24.1-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>
|
||||
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.portlets-user.workspace-portlet.6-21-0"
|
||||
date="${buildDate}">
|
||||
<Change>Task #13106: Provide public links for versioned files
|
||||
</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets-user.workspace-portlet.6-20-0"
|
||||
date="${buildDate}">
|
||||
<Change>Task #12604: Migrate Move operation to StorageHub
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -11,7 +11,7 @@
|
|||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>workspace</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>6.20.0-SNAPSHOT</version>
|
||||
<version>6.21.0-SNAPSHOT</version>
|
||||
<name>gCube Workspace Portlet</name>
|
||||
<description>
|
||||
gCube Workspace Portlet is a web-gui to manage the gCube workspace a collaborative area where users can exchange and organize information objects (workspace items) according to their specific needs.
|
||||
|
|
|
@ -237,7 +237,6 @@ public class AppController implements SubscriberInterface {
|
|||
|
||||
@Override
|
||||
public void onFileVersioning(FileVersioningEvent fileVersioningEvent) {
|
||||
ConstantsExplorer.log("quiqui");
|
||||
performVersioningOperation(fileVersioningEvent);
|
||||
}
|
||||
});
|
||||
|
@ -334,7 +333,7 @@ public class AppController implements SubscriberInterface {
|
|||
public void onGetPublicLink(GetPublicLinkEvent getPublicLinkEvent) {
|
||||
// TODO Auto-generated method stub
|
||||
if(getPublicLinkEvent.getSourceFile()!=null){
|
||||
AppControllerExplorer.getEventBus().fireEvent(new GetPublicLinkEvent(getPublicLinkEvent.getSourceFile()));
|
||||
AppControllerExplorer.getEventBus().fireEvent(new GetPublicLinkEvent(getPublicLinkEvent.getSourceFile(), getPublicLinkEvent.getVersion()));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -2047,10 +2046,10 @@ public class AppController implements SubscriberInterface {
|
|||
private void performVersioningOperation(final FileVersioningEvent fileVersioningEvent){
|
||||
|
||||
FileModel currentVersion = fileVersioningEvent.getCurrentVersion();
|
||||
List<FileVersionModel> olderVersions = fileVersioningEvent.getOlderVersion();
|
||||
List<FileVersionModel> selectedVersions = fileVersioningEvent.getSelectedVersions();
|
||||
|
||||
GWT.log("current version: "+currentVersion);
|
||||
GWT.log("olderVersions: "+olderVersions);
|
||||
GWT.log("selected versions: "+selectedVersions);
|
||||
//INVOKING FROM TOOLBAR??
|
||||
if(currentVersion==null) {
|
||||
currentVersion = getGridSelectedItem();
|
||||
|
@ -2079,7 +2078,7 @@ public class AppController implements SubscriberInterface {
|
|||
break;
|
||||
}
|
||||
case DOWNLOAD:{
|
||||
for (FileVersionModel fileVersionModel : olderVersions) {
|
||||
for (FileVersionModel fileVersionModel : selectedVersions) {
|
||||
//I'm passing the versionName as versionID
|
||||
AppControllerExplorer.getEventBus().fireEvent(new FileDownloadEvent(currentVersion.getIdentifier(), currentVersion.getName(), DownloadType.DOWNLOAD, false, fileVersionModel.getName()));
|
||||
}
|
||||
|
@ -2090,8 +2089,8 @@ public class AppController implements SubscriberInterface {
|
|||
case DELETE_PERMANENTLY: {
|
||||
|
||||
fileVersioningEvent.getWinVersioning().mask("performing operation...");
|
||||
List<String> olderVsIds = new ArrayList<String>(olderVersions.size());
|
||||
for (FileVersionModel fileVersionModel : olderVersions) {
|
||||
List<String> olderVsIds = new ArrayList<String>(selectedVersions.size());
|
||||
for (FileVersionModel fileVersionModel : selectedVersions) {
|
||||
olderVsIds.add(fileVersionModel.getIdentifier());
|
||||
}
|
||||
|
||||
|
@ -2138,8 +2137,8 @@ public class AppController implements SubscriberInterface {
|
|||
case DELETE_ALL_OLDER_VERSIONS: {
|
||||
|
||||
fileVersioningEvent.getWinVersioning().mask("performing operation...");
|
||||
List<String> olderVsIds = new ArrayList<String>(olderVersions.size());
|
||||
for (FileVersionModel fileVersionModel : olderVersions) {
|
||||
List<String> olderVsIds = new ArrayList<String>(fileVersioningEvent.getOlderVersions().size());
|
||||
for (FileVersionModel fileVersionModel : fileVersioningEvent.getOlderVersions()) {
|
||||
olderVsIds.add(fileVersionModel.getIdentifier());
|
||||
}
|
||||
|
||||
|
@ -2162,33 +2161,15 @@ public class AppController implements SubscriberInterface {
|
|||
});
|
||||
break;
|
||||
}
|
||||
// case RESTORE:{
|
||||
//
|
||||
// fileVersioningEvent.getWinVersioning().mask("performing operation...");
|
||||
// List<String> olderVsIds = new ArrayList<String>(olderVersions.size());
|
||||
// for (FileVersionModel fileVersionModel : olderVersions) {
|
||||
// olderVsIds.add(fileVersionModel.getIdentifier());
|
||||
// }
|
||||
//
|
||||
// AppControllerExplorer.rpcWorkspaceService.performOperationOnVersionedFile(currentVersion.getIdentifier(), olderVsIds, WorkspaceVersioningOperation.RESTORE, new AsyncCallback<List<FileVersionModel>>() {
|
||||
//
|
||||
// @Override
|
||||
// public void onFailure(Throwable caught) {
|
||||
// fileVersioningEvent.getWinVersioning().unmask();
|
||||
// new MessageBoxAlert("Error", caught.getMessage(), null);
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onSuccess(List<FileVersionModel> result) {
|
||||
// fileVersioningEvent.getWinVersioning().unmask();
|
||||
// fileVersioningEvent.getWinVersioning().updateVersioningContainer(result);
|
||||
// fileVersioningEvent.getWinVersioning().updateItemsNumber(result.size());
|
||||
//
|
||||
// }
|
||||
// });
|
||||
// break;
|
||||
// }
|
||||
|
||||
case PUBLIC_LINK:{
|
||||
|
||||
fileVersioningEvent.getWinVersioning().mask("performing operation...");
|
||||
FileVersionModel version = fileVersioningEvent.getSelectedVersions().get(0);
|
||||
AppControllerExplorer.getEventBus().fireEvent(new GetPublicLinkEvent(currentVersion, version.getName()));
|
||||
fileVersioningEvent.getWinVersioning().unmask();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -2376,7 +2357,7 @@ public class AppController implements SubscriberInterface {
|
|||
@Override
|
||||
public void versioningHistory(FileModel file) {
|
||||
|
||||
AppController.getEventBus().fireEvent(new FileVersioningEvent(WorkspaceVersioningOperation.SHOW, file, null, null));
|
||||
AppController.getEventBus().fireEvent(new FileVersioningEvent(WorkspaceVersioningOperation.SHOW, file, null, null, null));
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,21 +26,25 @@ public class FileVersioningEvent extends GwtEvent<FileVersioningEventHandler> im
|
|||
public static Type<FileVersioningEventHandler> TYPE = new Type<FileVersioningEventHandler>();
|
||||
private WorkspaceVersioningOperation workspaceVersioningOperation;
|
||||
private FileModel currentVersion;
|
||||
private List<FileVersionModel> olderVersion;
|
||||
private List<FileVersionModel> olderVersions;
|
||||
private WindowVersioning winVersioning;
|
||||
private List<FileVersionModel> selectedVersions;
|
||||
|
||||
|
||||
/**
|
||||
* Instantiates a new file versioning event.
|
||||
*
|
||||
* @param workspaceVersioningOperation the workspace versioning operation
|
||||
* @param currentVersion the current version
|
||||
* @param olderVersion the older version
|
||||
* @param selectedVersions the selected versions
|
||||
* @param olderVersions the older versions
|
||||
* @param winVersioning the win versioning
|
||||
*/
|
||||
public FileVersioningEvent(WorkspaceVersioningOperation workspaceVersioningOperation, FileModel currentVersion, List<FileVersionModel> olderVersion, WindowVersioning winVersioning) {
|
||||
public FileVersioningEvent(WorkspaceVersioningOperation workspaceVersioningOperation, FileModel currentVersion, List<FileVersionModel> selectedVersions, List<FileVersionModel> olderVersions, WindowVersioning winVersioning) {
|
||||
this.workspaceVersioningOperation = workspaceVersioningOperation;
|
||||
this.currentVersion = currentVersion;
|
||||
this.olderVersion = olderVersion;
|
||||
this.selectedVersions = selectedVersions;
|
||||
this.olderVersions = olderVersions;
|
||||
this.winVersioning = winVersioning;
|
||||
|
||||
}
|
||||
|
@ -79,17 +83,16 @@ public class FileVersioningEvent extends GwtEvent<FileVersioningEventHandler> im
|
|||
|
||||
|
||||
/**
|
||||
* Gets the older version.
|
||||
* Gets the older versions.
|
||||
*
|
||||
* @return the olderVersion
|
||||
* @return the older versions
|
||||
*/
|
||||
public List<FileVersionModel> getOlderVersion() {
|
||||
public List<FileVersionModel> getOlderVersions() {
|
||||
|
||||
return olderVersion;
|
||||
return olderVersions;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sets the workspace versioning operation.
|
||||
*
|
||||
|
@ -102,13 +105,13 @@ public class FileVersioningEvent extends GwtEvent<FileVersioningEventHandler> im
|
|||
|
||||
|
||||
/**
|
||||
* Sets the older version.
|
||||
* Sets the older versions.
|
||||
*
|
||||
* @param olderVersion the olderVersion to set
|
||||
* @param olderVersions the new older versions
|
||||
*/
|
||||
public void setOlderVersion(List<FileVersionModel> olderVersion) {
|
||||
public void setOlderVersions(List<FileVersionModel> olderVersions) {
|
||||
|
||||
this.olderVersion = olderVersion;
|
||||
this.olderVersions = olderVersions;
|
||||
}
|
||||
|
||||
|
||||
|
@ -138,6 +141,27 @@ public class FileVersioningEvent extends GwtEvent<FileVersioningEventHandler> im
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the selected versions.
|
||||
*
|
||||
* @return the selectedVersions
|
||||
*/
|
||||
public List<FileVersionModel> getSelectedVersions() {
|
||||
|
||||
return selectedVersions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the selected versions.
|
||||
*
|
||||
* @param selectedVersions the selectedVersions to set
|
||||
*/
|
||||
public void setSelectedVersions(List<FileVersionModel> selectedVersions) {
|
||||
|
||||
this.selectedVersions = selectedVersions;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the versioning operation.
|
||||
*
|
||||
|
@ -169,13 +193,16 @@ public class FileVersioningEvent extends GwtEvent<FileVersioningEventHandler> im
|
|||
builder.append(workspaceVersioningOperation);
|
||||
builder.append(", currentVersion=");
|
||||
builder.append(currentVersion);
|
||||
builder.append(", olderVersion=");
|
||||
builder.append(olderVersion);
|
||||
builder.append(", olderVersions=");
|
||||
builder.append(olderVersions);
|
||||
builder.append(", winVersioning=");
|
||||
builder.append(winVersioning);
|
||||
builder.append(", selectedVersions=");
|
||||
builder.append(selectedVersions);
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -151,7 +151,7 @@ public class GxtBottomToolBarItem extends ToolBar{
|
|||
|
||||
@Override
|
||||
public void componentSelected(ButtonEvent ce) {
|
||||
AppController.getEventBus().fireEvent(new FileVersioningEvent(WorkspaceVersioningOperation.SHOW, null, null, null));
|
||||
AppController.getEventBus().fireEvent(new FileVersioningEvent(WorkspaceVersioningOperation.SHOW, null, null, null, null));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -365,7 +365,7 @@ public class GxtToolBarItemFunctionality {
|
|||
|
||||
final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem();
|
||||
|
||||
AppController.getEventBus().fireEvent(new GetPublicLinkEvent(fileGridModel));
|
||||
AppController.getEventBus().fireEvent(new GetPublicLinkEvent(fileGridModel, null));
|
||||
|
||||
}
|
||||
});
|
||||
|
|
|
@ -60,6 +60,7 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|||
private Button buttonDelete;
|
||||
//private Button buttonRestore;
|
||||
private Button buttonDownload;
|
||||
private Button buttonPublicLink;
|
||||
private Button buttonEmptyVersions;
|
||||
private FileModel currentVersion;
|
||||
private WindowVersioning windowVersioning;
|
||||
|
@ -119,45 +120,6 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|||
|
||||
ToolBar bar = new ToolBar();
|
||||
|
||||
// buttonRestore = new Button(WorkspaceVersioningOperation.RESTORE.getLabel(),Resources.getIconUndo());
|
||||
// buttonRestore.setToolTip(WorkspaceVersioningOperation.RESTORE.getOperationDescription());
|
||||
// buttonRestore.setScale(ButtonScale.SMALL);
|
||||
// buttonRestore.setIconAlign(IconAlign.TOP);
|
||||
//
|
||||
// buttonRestore.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
||||
//
|
||||
// @Override
|
||||
// public void componentSelected(ButtonEvent ce) {
|
||||
//
|
||||
// if(checkSelection()){
|
||||
// //ONLY THE FIRST ITEM SELECTED CAN BE RESTORED
|
||||
// final List<FileVersionModel> firstFileToRestore = new ArrayList<FileVersionModel>(1);
|
||||
// firstFileToRestore.add(grid.getSelectionModel().getSelectedItems().get(0));
|
||||
// String msg = "Restoring the previous version: " +
|
||||
// "<br/>"+firstFileToRestore.get(0).getName();
|
||||
// msg+="<br/>Confirm?";
|
||||
//
|
||||
// String title = "Restore version ";
|
||||
// title+=" of: "+currentVersion.getName();
|
||||
// final DialogConfirm box = new DialogConfirm(null, title, msg);
|
||||
// box.getYesButton().addClickHandler(new ClickHandler() {
|
||||
//
|
||||
// @Override
|
||||
// public void onClick(ClickEvent event) {
|
||||
// AppController.getEventBus().fireEvent(new FileVersioningEvent(WorkspaceVersioningOperation.RESTORE, currentVersion, firstFileToRestore, windowVersioning));
|
||||
// box.hide();
|
||||
// }
|
||||
// });
|
||||
// box.setModal(true);
|
||||
// box.center();
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// bar.add(buttonRestore);
|
||||
|
||||
|
||||
buttonDelete = new Button(WorkspaceVersioningOperation.DELETE_PERMANENTLY.getLabel(),Resources.getIconDeleteItem());
|
||||
buttonDelete.setToolTip(WorkspaceVersioningOperation.DELETE_PERMANENTLY.getOperationDescription());
|
||||
buttonDelete.setScale(ButtonScale.SMALL);
|
||||
|
@ -183,8 +145,11 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|||
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
AppController.getEventBus().fireEvent(new FileVersioningEvent(WorkspaceVersioningOperation.DELETE_PERMANENTLY, currentVersion, selectedItems, windowVersioning));
|
||||
box.hide();
|
||||
AppController.getEventBus().fireEvent(new FileVersioningEvent(WorkspaceVersioningOperation.DELETE_PERMANENTLY,
|
||||
currentVersion,
|
||||
grid.getSelectionModel().getSelectedItems(),
|
||||
grid.getStore().getModels(),
|
||||
windowVersioning));
|
||||
}
|
||||
});
|
||||
box.setModal(true);
|
||||
|
@ -205,7 +170,30 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|||
public void componentSelected(ButtonEvent ce) {
|
||||
|
||||
if(checkSelection())
|
||||
AppController.getEventBus().fireEvent(new FileVersioningEvent(WorkspaceVersioningOperation.DOWNLOAD, currentVersion, grid.getSelectionModel().getSelectedItems(), windowVersioning));
|
||||
AppController.getEventBus().fireEvent(new FileVersioningEvent(WorkspaceVersioningOperation.DOWNLOAD,
|
||||
currentVersion,
|
||||
grid.getSelectionModel().getSelectedItems(),
|
||||
grid.getStore().getModels(),
|
||||
windowVersioning));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
buttonPublicLink = new Button(WorkspaceVersioningOperation.PUBLIC_LINK.getLabel(),Resources.getIconPublicLink());
|
||||
buttonPublicLink.setToolTip(WorkspaceVersioningOperation.PUBLIC_LINK.getOperationDescription());
|
||||
buttonPublicLink.setScale(ButtonScale.SMALL);
|
||||
buttonPublicLink.setIconAlign(IconAlign.TOP);
|
||||
buttonPublicLink.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
||||
|
||||
@Override
|
||||
public void componentSelected(ButtonEvent ce) {
|
||||
|
||||
if(checkSelection())
|
||||
AppController.getEventBus().fireEvent(new FileVersioningEvent(WorkspaceVersioningOperation.PUBLIC_LINK,
|
||||
currentVersion,
|
||||
grid.getSelectionModel().getSelectedItems(),
|
||||
grid.getStore().getModels(),
|
||||
windowVersioning));
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -230,7 +218,11 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
box.hide();
|
||||
AppController.getEventBus().fireEvent(new FileVersioningEvent(WorkspaceVersioningOperation.DELETE_ALL_OLDER_VERSIONS, currentVersion, store.getModels(), windowVersioning));
|
||||
AppController.getEventBus().fireEvent(new FileVersioningEvent(WorkspaceVersioningOperation.DELETE_ALL_OLDER_VERSIONS,
|
||||
currentVersion,
|
||||
grid.getSelectionModel().getSelectedItems(),
|
||||
grid.getStore().getModels(),
|
||||
windowVersioning));
|
||||
}
|
||||
});
|
||||
box.setModal(true);
|
||||
|
@ -242,9 +234,6 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|||
|
||||
//bar.add(buttonEmptyVersions);
|
||||
|
||||
|
||||
|
||||
|
||||
Button buttonRefresh = new Button(WorkspaceTrashOperation.REFRESH.getLabel(),Resources.getIconRefresh());
|
||||
buttonRefresh.setToolTip(WorkspaceTrashOperation.REFRESH.getOperationDescription());
|
||||
buttonRefresh.setScale(ButtonScale.SMALL);
|
||||
|
@ -254,12 +243,20 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|||
@Override
|
||||
public void componentSelected(ButtonEvent ce) {
|
||||
|
||||
AppController.getEventBus().fireEvent(new FileVersioningEvent(WorkspaceVersioningOperation.REFRESH, currentVersion, null, windowVersioning));
|
||||
if(grid.getSelectionModel().getSelectedItems()==null || grid.getSelectionModel().getSelectedItems().size()==0)
|
||||
return;
|
||||
|
||||
AppController.getEventBus().fireEvent(new FileVersioningEvent(WorkspaceVersioningOperation.REFRESH,
|
||||
currentVersion,
|
||||
grid.getSelectionModel().getSelectedItems(),
|
||||
grid.getStore().getModels(),
|
||||
windowVersioning));
|
||||
}
|
||||
});
|
||||
|
||||
bar.add(buttonRefresh);
|
||||
bar.add(buttonDownload);
|
||||
bar.add(buttonPublicLink);
|
||||
cp.setTopComponent(bar);
|
||||
|
||||
}
|
||||
|
@ -353,8 +350,10 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|||
activeCurrentVersionOperation(!fileVersionModel.isCurrentVersion());
|
||||
}
|
||||
|
||||
if(selected.size()>1)
|
||||
if(selected.size()>1){
|
||||
activeDownloadOperation(false);
|
||||
activePublicLinkperation(false);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -383,6 +382,16 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|||
buttonDownload.setEnabled(b);
|
||||
}
|
||||
|
||||
/**
|
||||
* Active download operation.
|
||||
*
|
||||
* @param b the b
|
||||
*/
|
||||
private void activePublicLinkperation(boolean b) {
|
||||
buttonPublicLink.setEnabled(b);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Active current version operation.
|
||||
|
@ -439,6 +448,7 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|||
buttonDelete.setEnabled(bool);
|
||||
//buttonRestore.setEnabled(bool);
|
||||
buttonDownload.setEnabled(bool);
|
||||
buttonPublicLink.setEnabled(bool);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue