|
|
|
@ -349,9 +349,20 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|
|
|
|
@Override
|
|
|
|
|
public void selectionChanged(SelectionChangedEvent<FileVersionModel> se) {
|
|
|
|
|
|
|
|
|
|
boolean selection = grid.getSelectionModel().getSelectedItems().size()>0;
|
|
|
|
|
List<FileVersionModel> selected = grid.getSelectionModel().getSelectedItems();
|
|
|
|
|
boolean selection = selected.size()>0;
|
|
|
|
|
activeButtonOnSelection(selection);
|
|
|
|
|
|
|
|
|
|
for (FileVersionModel fileVersionModel : selected) {
|
|
|
|
|
activeCurrentVersionOperation(!fileVersionModel.isCurrentVersion());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(selected.size()>1)
|
|
|
|
|
activeDownloadOperation(false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
grid.getView().setAutoFill(true);
|
|
|
|
@ -363,7 +374,28 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|
|
|
|
grid.setStyleAttribute("borderTop", "none");
|
|
|
|
|
cp.add(grid);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Active download operation.
|
|
|
|
|
*
|
|
|
|
|
* @param b the b
|
|
|
|
|
*/
|
|
|
|
|
private void activeDownloadOperation(boolean b) {
|
|
|
|
|
buttonDownload.setEnabled(b);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Active current version operation.
|
|
|
|
|
*
|
|
|
|
|
* @param bool the bool
|
|
|
|
|
*/
|
|
|
|
|
private void activeCurrentVersionOperation(boolean bool){
|
|
|
|
|
buttonDelete.setEnabled(bool);
|
|
|
|
|
buttonRestore.setEnabled(bool);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|