Enhancement on file versioning #7006
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@142811 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
33c3c4fa22
commit
ced48b264d
|
@ -99,6 +99,7 @@ import org.gcube.portlets.user.workspace.client.interfaces.GXTFolderItemTypeEnum
|
|||
import org.gcube.portlets.user.workspace.client.interfaces.SubscriberInterface;
|
||||
import org.gcube.portlets.user.workspace.client.model.FileGridModel;
|
||||
import org.gcube.portlets.user.workspace.client.model.FileModel;
|
||||
import org.gcube.portlets.user.workspace.client.model.FileVersionModel;
|
||||
import org.gcube.portlets.user.workspace.client.model.FolderModel;
|
||||
import org.gcube.portlets.user.workspace.client.model.ScopeModel;
|
||||
import org.gcube.portlets.user.workspace.client.view.WorkspaceFeaturesView;
|
||||
|
@ -487,11 +488,8 @@ public class AppController implements SubscriberInterface {
|
|||
}else{ //IS MULTISELECTION
|
||||
|
||||
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemFunctionalities().activeButtonForMultiSelection(true);
|
||||
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemDetails().enableInfoHistoryButtons(false);
|
||||
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemDetails().enableInfoHistoryButtons(event.getSourceFile(), false);
|
||||
}
|
||||
|
||||
//setFileDetailsInView(event.getSourceFile().getIdentifier());
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -1032,7 +1030,7 @@ public class AppController implements SubscriberInterface {
|
|||
private void doElementGridSelected(boolean isSelected, FileModel target) {
|
||||
|
||||
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemFunctionalities().activeButtonsOnSelectForOperation(target, isSelected);
|
||||
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemDetails().enableInfoHistoryButtons(isSelected);
|
||||
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemDetails().enableInfoHistoryButtons(target, isSelected);
|
||||
disableButtonsOnBreadcrumbSpecialFolder();
|
||||
|
||||
if(isSelected){
|
||||
|
@ -2043,21 +2041,26 @@ public class AppController implements SubscriberInterface {
|
|||
*/
|
||||
private void performVersioningOperation(FileVersioningEvent fileVersioningEvent){
|
||||
|
||||
final FileModel currentVersion = fileVersioningEvent.getCurrentVersion();
|
||||
final FileModel olderVersion = fileVersioningEvent.getOlderVersion();
|
||||
FileModel currentVersion = fileVersioningEvent.getCurrentVersion();
|
||||
FileModel olderVersion = fileVersioningEvent.getOlderVersion();
|
||||
|
||||
//INVOKING FROM TOOLBAR??
|
||||
if(currentVersion==null) {
|
||||
currentVersion = getGridSelectedItem();
|
||||
}
|
||||
|
||||
switch (fileVersioningEvent.getVersioningOperation()) {
|
||||
case SHOW:{
|
||||
|
||||
final WindowVersioning wv = new WindowVersioning(currentVersion);
|
||||
appContrExplorer.getRpcWorkspaceService().getVersionHistory(currentVersion.getIdentifier(), new AsyncCallback<List<FileModel>>() {
|
||||
appContrExplorer.getRpcWorkspaceService().getVersionHistory(currentVersion.getIdentifier(), new AsyncCallback<List<FileVersionModel>>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(List<FileModel> result) {
|
||||
public void onSuccess(List<FileVersionModel> result) {
|
||||
wv.updateVersioningContainer(result);
|
||||
wv.updateItemsNumber(result.size());
|
||||
}
|
||||
|
@ -2074,7 +2077,7 @@ public class AppController implements SubscriberInterface {
|
|||
case DELETE_PERMANENTLY: {
|
||||
|
||||
final WindowVersioning wv = new WindowVersioning(currentVersion);
|
||||
appContrExplorer.getRpcWorkspaceService().performOperationOnVersionedFile(currentVersion, olderVersion, WorkspaceVersioningOperation.DELETE_PERMANENTLY, new AsyncCallback<List<FileModel>>() {
|
||||
appContrExplorer.getRpcWorkspaceService().performOperationOnVersionedFile(currentVersion, olderVersion, WorkspaceVersioningOperation.DELETE_PERMANENTLY, new AsyncCallback<List<FileVersionModel>>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
|
@ -2082,7 +2085,7 @@ public class AppController implements SubscriberInterface {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(List<FileModel> result) {
|
||||
public void onSuccess(List<FileVersionModel> result) {
|
||||
wv.updateVersioningContainer(result);
|
||||
wv.updateItemsNumber(result.size());
|
||||
|
||||
|
@ -2094,14 +2097,14 @@ public class AppController implements SubscriberInterface {
|
|||
|
||||
case REFRESH: {
|
||||
final WindowVersioning wv = fileVersioningEvent.getWinVersioning();
|
||||
appContrExplorer.getRpcWorkspaceService().getVersionHistory(currentVersion.getIdentifier(), new AsyncCallback<List<FileModel>>() {
|
||||
appContrExplorer.getRpcWorkspaceService().getVersionHistory(currentVersion.getIdentifier(), new AsyncCallback<List<FileVersionModel>>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(List<FileModel> result) {
|
||||
public void onSuccess(List<FileVersionModel> result) {
|
||||
wv.updateVersioningContainer(result);
|
||||
wv.updateItemsNumber(result.size());
|
||||
}
|
||||
|
|
|
@ -310,7 +310,7 @@ public class GxtGridFilterGroupPanel extends LayoutContainer {
|
|||
case URL_DOCUMENT:
|
||||
case EXTERNAL_RESOURCE_LINK:
|
||||
|
||||
AppController.getEventBus().fireEvent(new FileDownloadEvent(target.getIdentifier(), target.getName(), DownloadType.SHOW, target.isDirectory() || target.isVreFolder()));
|
||||
AppController.getEventBus().fireEvent(new FileDownloadEvent(target.getIdentifier(), target.getName(), DownloadType.SHOW, target.isDirectory() || target.isVreFolder(), null));
|
||||
break;
|
||||
case EXTERNAL_URL:
|
||||
AppController.getEventBus().fireEvent(new ShowUrlEvent(target));
|
||||
|
|
|
@ -8,6 +8,8 @@ import org.gcube.portlets.user.workspace.client.event.AddAdministratorEvent;
|
|||
import org.gcube.portlets.user.workspace.client.event.FileVersioningEvent;
|
||||
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.interfaces.GXTFolderItemTypeEnum;
|
||||
import org.gcube.portlets.user.workspace.client.model.FileModel;
|
||||
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.ExtendedWorkspaceACL;
|
||||
|
@ -149,13 +151,10 @@ public class GxtBottomToolBarItem extends ToolBar{
|
|||
|
||||
@Override
|
||||
public void componentSelected(ButtonEvent ce) {
|
||||
|
||||
AppController.getEventBus().fireEvent(new FileVersioningEvent(WorkspaceVersioningOperation.SHOW, null, null, null));
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
btnAddAdmin = new Button(EDIT_ADMINISTRATOR);
|
||||
//TODO CHANGE ICON
|
||||
btnAddAdmin.setIcon(Resources.getIconManageAdministrator());
|
||||
|
@ -190,7 +189,7 @@ public class GxtBottomToolBarItem extends ToolBar{
|
|||
add(filler);
|
||||
add(btnAddAdmin);
|
||||
add(aclDivInfo);
|
||||
enableInfoHistoryButtons(false);
|
||||
enableInfoHistoryButtons(null, false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -215,17 +214,23 @@ public class GxtBottomToolBarItem extends ToolBar{
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Enable info history buttons.
|
||||
*
|
||||
* @param selectedFile the selected file
|
||||
* @param enable the enable
|
||||
*/
|
||||
public void enableInfoHistoryButtons(boolean enable){
|
||||
public void enableInfoHistoryButtons(FileModel target, boolean enable){
|
||||
bHistory.setEnabled(enable);
|
||||
bRead.setEnabled(enable);
|
||||
btnGetInfo.setEnabled(enable);
|
||||
btnVersioning.setEnabled(enable);
|
||||
|
||||
btnVersioning.setEnabled(false);
|
||||
if(target!=null){
|
||||
GXTFolderItemTypeEnum category = target.getGXTFolderItemType();
|
||||
if(category!=null && (category.equals(GXTFolderItemTypeEnum.EXTERNAL_FILE) || category.equals(GXTFolderItemTypeEnum.EXTERNAL_IMAGE) || category.equals(GXTFolderItemTypeEnum.EXTERNAL_IMAGE)))
|
||||
btnVersioning.setEnabled(enable);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,9 +17,9 @@ import org.gcube.portlets.user.workspace.client.event.GetPublicLinkEvent;
|
|||
import org.gcube.portlets.user.workspace.client.event.GetShareLinkEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.GridRefreshEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.ImagePreviewEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.ShowUrlEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.PasteItemEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.RenameItemEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.ShowUrlEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.VREChangePermissionsEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.WebDavUrlEvent;
|
||||
import org.gcube.portlets.user.workspace.client.event.WsGetFolderLinkEvent;
|
||||
|
@ -524,7 +524,7 @@ public class GxtToolBarItemFunctionality {
|
|||
public void componentSelected(ButtonEvent ce) {
|
||||
|
||||
final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem();
|
||||
AppController.getEventBus().fireEvent(new FileDownloadEvent(fileGridModel.getIdentifier(), fileGridModel.getName(), DownloadType.DOWNLOAD, fileGridModel.isDirectory() || fileGridModel.isVreFolder()));
|
||||
AppController.getEventBus().fireEvent(new FileDownloadEvent(fileGridModel.getIdentifier(), fileGridModel.getName(), DownloadType.DOWNLOAD, fileGridModel.isDirectory() || fileGridModel.isVreFolder(), null));
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -556,7 +556,7 @@ public class GxtToolBarItemFunctionality {
|
|||
AppController.getEventBus().fireEvent(new ShowUrlEvent(fileGridModel));
|
||||
|
||||
}else
|
||||
AppController.getEventBus().fireEvent(new FileDownloadEvent(fileGridModel.getIdentifier(), fileGridModel.getName(), DownloadType.SHOW,fileGridModel.isDirectory() || fileGridModel.isVreFolder()));
|
||||
AppController.getEventBus().fireEvent(new FileDownloadEvent(fileGridModel.getIdentifier(), fileGridModel.getName(), DownloadType.SHOW,fileGridModel.isDirectory() || fileGridModel.isVreFolder(), null));
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,8 +5,8 @@ import java.util.List;
|
|||
|
||||
import org.gcube.portlets.user.workspace.client.AppController;
|
||||
import org.gcube.portlets.user.workspace.client.event.FileVersioningEvent;
|
||||
import org.gcube.portlets.user.workspace.client.interfaces.GXTFolderItemTypeEnum;
|
||||
import org.gcube.portlets.user.workspace.client.model.FileModel;
|
||||
import org.gcube.portlets.user.workspace.client.model.FileVersionModel;
|
||||
import org.gcube.portlets.user.workspace.client.resources.Resources;
|
||||
import org.gcube.portlets.user.workspace.client.view.windows.DialogConfirm;
|
||||
import org.gcube.portlets.user.workspace.shared.WorkspaceTrashOperation;
|
||||
|
@ -28,10 +28,8 @@ import com.extjs.gxt.ui.client.widget.LayoutContainer;
|
|||
import com.extjs.gxt.ui.client.widget.MessageBox;
|
||||
import com.extjs.gxt.ui.client.widget.button.Button;
|
||||
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
|
||||
import com.extjs.gxt.ui.client.widget.grid.ColumnData;
|
||||
import com.extjs.gxt.ui.client.widget.grid.ColumnModel;
|
||||
import com.extjs.gxt.ui.client.widget.grid.Grid;
|
||||
import com.extjs.gxt.ui.client.widget.grid.GridCellRenderer;
|
||||
import com.extjs.gxt.ui.client.widget.grid.GroupingView;
|
||||
import com.extjs.gxt.ui.client.widget.grid.filters.GridFilters;
|
||||
import com.extjs.gxt.ui.client.widget.grid.filters.StringFilter;
|
||||
|
@ -57,8 +55,8 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|||
//private GridDropTarget gridDropTarget;
|
||||
private Button buttonDelete;
|
||||
private Button buttonRestore;
|
||||
private Button buttonRestoreAll;
|
||||
private Button buttonEmptyTrash;
|
||||
private Button buttonDownload;
|
||||
private Button buttonEmptyVersions;
|
||||
private FileModel currentVersion;
|
||||
private WindowVersioning windowVersioning;
|
||||
|
||||
|
@ -154,11 +152,11 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|||
|
||||
bar.add(new SeparatorMenuItem());
|
||||
|
||||
buttonRestoreAll = new Button(WorkspaceVersioningOperation.DOWNLOAD.getLabel(),Resources.getIconRecycle());
|
||||
buttonRestoreAll.setToolTip(WorkspaceVersioningOperation.DOWNLOAD.getOperationDescription());
|
||||
buttonRestoreAll.setScale(ButtonScale.SMALL);
|
||||
buttonRestoreAll.setIconAlign(IconAlign.TOP);
|
||||
buttonRestoreAll.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
||||
buttonDownload = new Button(WorkspaceVersioningOperation.DOWNLOAD.getLabel(),Resources.getIconRecycle());
|
||||
buttonDownload.setToolTip(WorkspaceVersioningOperation.DOWNLOAD.getOperationDescription());
|
||||
buttonDownload.setScale(ButtonScale.SMALL);
|
||||
buttonDownload.setIconAlign(IconAlign.TOP);
|
||||
buttonDownload.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
||||
|
||||
@Override
|
||||
public void componentSelected(ButtonEvent ce) {
|
||||
|
@ -168,14 +166,14 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|||
}
|
||||
});
|
||||
|
||||
bar.add(buttonRestoreAll);
|
||||
bar.add(buttonDownload);
|
||||
|
||||
|
||||
buttonEmptyTrash = new Button(WorkspaceVersioningOperation.EMPTY_OLDER_VERSIONS.getLabel(),Resources.getTrashEmpty());
|
||||
buttonEmptyTrash.setToolTip(WorkspaceVersioningOperation.EMPTY_OLDER_VERSIONS.getOperationDescription());
|
||||
buttonEmptyTrash.setScale(ButtonScale.SMALL);
|
||||
buttonEmptyTrash.setIconAlign(IconAlign.TOP);
|
||||
buttonEmptyTrash.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
||||
buttonEmptyVersions = new Button(WorkspaceVersioningOperation.EMPTY_OLDER_VERSIONS.getLabel(),Resources.getTrashEmpty());
|
||||
buttonEmptyVersions.setToolTip(WorkspaceVersioningOperation.EMPTY_OLDER_VERSIONS.getOperationDescription());
|
||||
buttonEmptyVersions.setScale(ButtonScale.SMALL);
|
||||
buttonEmptyVersions.setIconAlign(IconAlign.TOP);
|
||||
buttonEmptyVersions.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
||||
|
||||
@Override
|
||||
public void componentSelected(ButtonEvent ce) {
|
||||
|
@ -183,7 +181,7 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|||
// if(checkSelection())
|
||||
// AppController.getEventBus().fireEvent(new FileVersioningEvent(WorkspaceVersioningOperation.EMPTY_OLDER_VERSIONS, null));
|
||||
|
||||
DialogConfirm box = new DialogConfirm(null, "Confirm Delete?", "Are you sure you want delete older versions of: "+ currentVersion.getName());
|
||||
DialogConfirm box = new DialogConfirm(null, "Confirm Delete?", "Are you sure you want delete the older versions of: "+ currentVersion.getName());
|
||||
box.setModal(true);
|
||||
box.center();
|
||||
box.getYesButton().addClickHandler(new ClickHandler() {
|
||||
|
@ -197,7 +195,7 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|||
}
|
||||
});
|
||||
|
||||
bar.add(buttonEmptyTrash);
|
||||
bar.add(buttonEmptyVersions);
|
||||
|
||||
|
||||
bar.add(new FillToolItem());
|
||||
|
@ -229,17 +227,15 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|||
|
||||
//ColumnConfig icon = new ColumnConfig(FileGridModel.ICON, "", 25);
|
||||
ColumnConfig name = createSortableColumnConfig(FileModel.NAME, FileModel.NAME, 200);
|
||||
ColumnConfig type = createSortableColumnConfig(FileModel.TYPE, FileModel.TYPE, 80);
|
||||
//ColumnConfig originalPath = createSortableColumnConfig(FileTrashedModel.STOREINFO.ORIGINALPATH.toString(), "Original Path", 200);
|
||||
//ColumnConfig type = createSortableColumnConfig(FileModel.TYPE, FileModel.TYPE, 80);
|
||||
ColumnConfig originalPath = createSortableColumnConfig(FileVersionModel.PATH, "Original Path", 200);
|
||||
//ColumnConfig deleteDate = createSortableColumnConfig(FileTrashedModel.STOREINFO.DELETEDATE.toString(), "Deleted Date", 90);
|
||||
//deleteDate.setDateTimeFormat(DateTimeFormat.getFormat("dd MMM hh:mm aaa yyyy"));
|
||||
//ColumnConfig deleteUser = createSortableColumnConfig(FileTrashedModel.STOREINFO.DELETEUSER.toString(), "Deleted By", 150);
|
||||
ColumnConfig user = createSortableColumnConfig(FileVersionModel.USER_VERSIONING, "User", 150);
|
||||
|
||||
//ColumnModel cm = new ColumnModel(Arrays.asList(icon, name, type, originalPath, deleteDate, deleteUser));
|
||||
|
||||
ColumnModel cm = new ColumnModel(Arrays.asList(name));
|
||||
|
||||
final ColumnModel columnModel = cm;
|
||||
ColumnModel cm = new ColumnModel(Arrays.asList(name, originalPath, user));
|
||||
|
||||
grid = new Grid<FileModel>(this.store, cm);
|
||||
|
||||
|
@ -249,38 +245,16 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|||
this.grid.setView(view);
|
||||
this.grid.setContextMenu(null);
|
||||
|
||||
|
||||
GridCellRenderer<FileModel> folderRender = new GridCellRenderer<FileModel>() {
|
||||
@Override
|
||||
public String render(FileModel model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<FileModel> store, Grid<FileModel> grid) {
|
||||
String val = model.get(property);
|
||||
String color = "black";
|
||||
|
||||
if(val != null && val.equals(GXTFolderItemTypeEnum.FOLDER.toString())){
|
||||
// color = "#EEC900";
|
||||
return "<span qtitle='" + columnModel.getColumnById(property).getHeader() + "' qtip='" + val + "' style='font-weight: bold;color:" + color + "'>" + val + "</span>";
|
||||
}else{
|
||||
if(val==null)
|
||||
val = "";
|
||||
return "<span qtitle='" + columnModel.getColumnById(property).getHeader() + "' qtip='" + val + "' style='color:" + color + "'>" + val + "</span>";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
type.setRenderer(folderRender);
|
||||
|
||||
GridFilters filters = new GridFilters();
|
||||
filters.setLocal(true);
|
||||
|
||||
|
||||
StringFilter nameFilter = new StringFilter(FileModel.NAME);
|
||||
StringFilter typeFilter = new StringFilter(FileModel.TYPE);
|
||||
|
||||
//DateFilter dateFilter = new DateFilter(FileModel.STOREINFO.DELETEDATE.toString());
|
||||
StringFilter pathFilter = new StringFilter("Original Path");
|
||||
StringFilter userFilter = new StringFilter("User");
|
||||
|
||||
filters.addFilter(nameFilter);
|
||||
filters.addFilter(typeFilter);
|
||||
//filters.addFilter(dateFilter);
|
||||
filters.addFilter(pathFilter);
|
||||
filters.addFilter(userFilter);
|
||||
|
||||
grid.addPlugin(filters);
|
||||
|
||||
|
@ -307,7 +281,6 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sets the panel size.
|
||||
*
|
||||
|
@ -318,28 +291,18 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|||
|
||||
if (width > 0 && height > 0 && grid != null) {
|
||||
cp.setSize(width, height);
|
||||
// grid.setSize(width, height);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Update versions.
|
||||
*
|
||||
* @param versioningFiles the versioning files
|
||||
*/
|
||||
public void updateVersions(List<FileModel> versioningFiles) {
|
||||
public void updateVersions(List<FileVersionModel> versioningFiles) {
|
||||
|
||||
store.removeAll();
|
||||
typeStoreOperation.removeAll();
|
||||
|
||||
// for (FileModel fileTrashedModel : trashFiles) {
|
||||
// fileTrashedModel.setIcon();
|
||||
// }
|
||||
|
||||
store.add(versioningFiles);
|
||||
activeButtonsOnNotEmtpy(store.getModels().size()>0);
|
||||
}
|
||||
|
@ -350,8 +313,7 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|||
* @param isNotEmpty the is not empty
|
||||
*/
|
||||
private void activeButtonsOnNotEmtpy(boolean isNotEmpty) {
|
||||
buttonRestoreAll.setEnabled(isNotEmpty);
|
||||
buttonEmptyTrash.setEnabled(isNotEmpty);
|
||||
buttonEmptyVersions.setEnabled(isNotEmpty);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -362,6 +324,7 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|||
protected void activeButtonOnSelection(boolean bool) {
|
||||
buttonDelete.setEnabled(bool);
|
||||
buttonRestore.setEnabled(bool);
|
||||
buttonDownload.setEnabled(bool);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -7,6 +7,7 @@ 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.FileModel;
|
||||
import org.gcube.portlets.user.workspace.client.model.FileVersionModel;
|
||||
import org.gcube.portlets.user.workspace.client.resources.Resources;
|
||||
import org.gcube.portlets.user.workspace.shared.WorkspaceVersioningOperation;
|
||||
|
||||
|
@ -34,7 +35,7 @@ import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
|
|||
*/
|
||||
public class WindowVersioning extends Window {
|
||||
|
||||
private List<FileModel> versionedFile;
|
||||
private List<FileVersionModel> versionedFiles;
|
||||
private VersioningInfoContainer versioningContainer;
|
||||
private HorizontalPanel hpItemsNumber;
|
||||
private Label labelItemsNumber = new Label();
|
||||
|
@ -170,10 +171,10 @@ public class WindowVersioning extends Window {
|
|||
*
|
||||
* @param versioningFiles the versioning files
|
||||
*/
|
||||
public void updateVersioningContainer(List<FileModel> versioningFiles) {
|
||||
public void updateVersioningContainer(List<FileVersionModel> versioningFiles) {
|
||||
|
||||
this.versioningContainer.resetStore();
|
||||
this.versionedFile = versioningFiles;
|
||||
this.versionedFiles = versioningFiles;
|
||||
this.versioningContainer.updateVersions(versioningFiles);
|
||||
}
|
||||
|
||||
|
@ -197,13 +198,14 @@ public class WindowVersioning extends Window {
|
|||
this.unmask();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the versions of file.
|
||||
* Gets the versions.
|
||||
*
|
||||
* @return the versions of file
|
||||
* @return the versions
|
||||
*/
|
||||
public List<FileModel> getVersionsOfFile() {
|
||||
return versionedFile;
|
||||
public List<FileVersionModel> getVersions() {
|
||||
return versionedFiles;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue