Added new features reported at #19544#note-8

This commit is contained in:
Francesco Mangiacrapa 2020-06-29 12:14:56 +02:00
parent c02abf7d6b
commit 274223ca18
2 changed files with 14 additions and 11 deletions

View File

@ -12,6 +12,7 @@ import org.gcube.portlets.user.workspace.shared.accounting.GxtAccountingField;
import com.extjs.gxt.ui.client.Style.ButtonScale; import com.extjs.gxt.ui.client.Style.ButtonScale;
import com.extjs.gxt.ui.client.Style.HorizontalAlignment; import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
import com.extjs.gxt.ui.client.data.BaseModel;
import com.extjs.gxt.ui.client.data.BaseModelData; import com.extjs.gxt.ui.client.data.BaseModelData;
import com.extjs.gxt.ui.client.data.ModelData; import com.extjs.gxt.ui.client.data.ModelData;
import com.extjs.gxt.ui.client.event.ButtonEvent; import com.extjs.gxt.ui.client.event.ButtonEvent;
@ -128,7 +129,7 @@ public class AccoutingInfoContainer extends LayoutContainer {
List<ColumnConfig> columns = new ArrayList<ColumnConfig>(); List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
ColumnConfig icon = createSortableColumnConfig("Type", "", 20); ColumnConfig icon = createSortableColumnConfig("Type", "", 35);
columns.add(icon); columns.add(icon);
icon.setRenderer(new GridCellRenderer<ModelData>() { icon.setRenderer(new GridCellRenderer<ModelData>() {
@ -183,7 +184,7 @@ public class AccoutingInfoContainer extends LayoutContainer {
}); });
ColumnConfig descr = createSortableColumnConfig(DESCRIPTION, DESCRIPTION, 230); ColumnConfig descr = createSortableColumnConfig(DESCRIPTION, DESCRIPTION, 220);
columns.add(descr); columns.add(descr);
descr.setRenderer(new GridCellRenderer<ModelData>() { descr.setRenderer(new GridCellRenderer<ModelData>() {
@ -191,10 +192,12 @@ public class AccoutingInfoContainer extends LayoutContainer {
public Object render(ModelData model, String property, public Object render(ModelData model, String property,
ColumnData config, int rowIndex, int colIndex, ColumnData config, int rowIndex, int colIndex,
ListStore<ModelData> store, Grid<ModelData> grid) { ListStore<ModelData> store, Grid<ModelData> grid) {
// if(model.get(OPERATION).equals(GxtAccountingEntryType.READ)) String thevalue = model.get(DESCRIPTION);
// return "<b><p style=\"color: red;\">" //I'm adding the tooltip
// + model.get(DESCRIPTION)+ "</p></b>"; if(thevalue==null)
return model.get(DESCRIPTION); return "";
return "<span title='" + thevalue + "' style='white-space:pre-line;'>" + thevalue + "</span>";
} }
}); });

View File

@ -667,9 +667,9 @@ public class StorageHubToWorkpaceConverter implements Serializable{
String msg = ""; String msg = "";
if(acc.getItemName()==null || acc.getItemName().isEmpty()) if(acc.getItemName()==null || acc.getItemName().isEmpty())
msg = user.getName() + " "+GxtAccountingEntryType.SHARE.getName()+ " workspace folder"; msg = "\""+user.getName() + "\" "+GxtAccountingEntryType.SHARE.getName()+ " folder";
else else
msg = user.getName() + " "+GxtAccountingEntryType.SHARE.getName()+ " workspace folder "+acc.getItemName(); msg = user.getName() + " "+GxtAccountingEntryType.SHARE.getName()+ " folder "+acc.getItemName();
if(acc.getMembers()!=null && acc.getMembers().length>0) if(acc.getMembers()!=null && acc.getMembers().length>0)
msg+=" with "+UserUtil.separateFullNameToCommaForPortalLogin(Arrays.asList(acc.getMembers())); msg+=" with "+UserUtil.separateFullNameToCommaForPortalLogin(Arrays.asList(acc.getMembers()));
@ -685,7 +685,7 @@ public class StorageHubToWorkpaceConverter implements Serializable{
af.setOperation(GxtAccountingEntryType.UNSHARE); af.setOperation(GxtAccountingEntryType.UNSHARE);
AccountEntryUnshare uns = (AccountEntryUnshare) shubAccEntry; AccountEntryUnshare uns = (AccountEntryUnshare) shubAccEntry;
String msg = "Folder "; String msg = "Folder ";
msg+= uns.getItemName()==null || uns.getItemName().isEmpty()?"":uns.getItemName()+" "; msg+= uns.getItemName()==null || uns.getItemName().isEmpty()?"":"\""+uns.getItemName()+"\" ";
//see Task #19544 //see Task #19544
if(shubAccEntry.getUser().equalsIgnoreCase("ALL")) { if(shubAccEntry.getUser().equalsIgnoreCase("ALL")) {
//CASE ALL //CASE ALL