enhancements on trash

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@95662 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2014-05-14 10:19:56 +00:00
parent edeb0d00e2
commit fbc5357a79
2 changed files with 6 additions and 12 deletions

View File

@ -45,6 +45,7 @@ import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.extjs.gxt.ui.client.widget.menu.SeparatorMenuItem;
import com.extjs.gxt.ui.client.widget.toolbar.FillToolItem;
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
import com.google.gwt.i18n.client.DateTimeFormat;
public class TrashInfoContainer extends LayoutContainer {
@ -270,7 +271,8 @@ public class TrashInfoContainer extends LayoutContainer {
ColumnConfig name = createSortableColumnConfig(ConstantsExplorer.NAME, ConstantsExplorer.NAME, 200);
ColumnConfig type = createSortableColumnConfig(ConstantsExplorer.TYPE, ConstantsExplorer.TYPE, 80);
ColumnConfig originalPath = createSortableColumnConfig(FileTrashedModel.STOREINFO.ORIGINALPATH.toString(), "Original Path", 200);
ColumnConfig deleteDate = createSortableColumnConfig(FileTrashedModel.STOREINFO.DELETEDATE.toString(), "Deleted Date", 80);
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);
ColumnModel cm = new ColumnModel(Arrays.asList(icon, name, type, originalPath, deleteDate, deleteUser));
@ -283,17 +285,9 @@ public class TrashInfoContainer extends LayoutContainer {
view.setShowGroupedColumn(false);
this.grid.setView(view);
this.grid.setContextMenu(null);
// view.setGroupRenderer(new GridGroupRenderer() {
// public String render(GroupColumnData data) {
// String f = columnModel.getColumnById(data.field).getHeader();
// String l = data.models.size() == 1 ? "Item" : "Items";
// return f + ": " + data.group + " (" + data.models.size() + " "
// + l + ")";
// }
// });
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) {

View File

@ -49,7 +49,7 @@ public class WindowTrash extends Window {
private void initAccounting() {
setLayout(new FitLayout());
setSize(760, 400);
setSize(770, 400);
setResizable(true);
setMaximizable(true);
this.trashContainers = new TrashInfoContainer();