Compare commits

...

5 Commits

8 changed files with 70 additions and 41 deletions

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/workspace-6.24.0/WEB-INF/classes" path="src/main/java">
<classpathentry kind="src" output="target/workspace-6.25.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.24.0/WEB-INF/classes" path="src/main/resources">
<classpathentry excluding="**" kind="src" output="target/workspace-6.25.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
@ -35,5 +35,5 @@
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/workspace-6.24.0/WEB-INF/classes"/>
<classpathentry kind="output" path="target/workspace-6.25.0-SNAPSHOT/WEB-INF/classes"/>
</classpath>

View File

@ -1,4 +1,4 @@
eclipse.preferences.version=1
lastWarOutDir=/home/francesco/git/workspace/target/workspace-6.24.0
lastWarOutDir=/home/francesco/git/workspace/target/workspace-6.25.0-SNAPSHOT
warSrcDir=src/main/webapp
warSrcDirIsOutput=false

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="workspace-6.24.0">
<wb-module deploy-name="workspace-6.25.0-SNAPSHOT">
<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"/>

View File

@ -4,6 +4,13 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v6.25.0] [r4.25.0] - 2020-07-13
#### Enhancements
[#19600] revisit the "Get Info" Dialog in a modern view
## [v6.24.1] [r4.24.0] - 2020-06-22
[#19493] Just to include the ckan-util-library patched

View File

@ -13,7 +13,7 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>workspace</artifactId>
<packaging>war</packaging>
<version>6.24.1</version>
<version>6.25.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.

View File

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
@ -102,6 +103,7 @@ import org.gcube.portlets.user.workspace.client.view.trash.WindowTrash;
import org.gcube.portlets.user.workspace.client.view.versioning.WindowVersioning;
import org.gcube.portlets.user.workspace.client.view.windows.DialogConfirm;
import org.gcube.portlets.user.workspace.client.view.windows.DialogGetInfo;
import org.gcube.portlets.user.workspace.client.view.windows.DialogGetInfoBootstrap;
import org.gcube.portlets.user.workspace.client.view.windows.InfoDisplay;
import org.gcube.portlets.user.workspace.client.view.windows.MessageBoxAlert;
import org.gcube.portlets.user.workspace.shared.GarbageItem;
@ -123,6 +125,7 @@ import org.gcube.portlets.widgets.wsexplorer.client.view.grid.ItemsTable.DISPLAY
import org.gcube.portlets.widgets.wsexplorer.shared.Item;
import com.extjs.gxt.ui.client.core.XDOM;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.MessageBox;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
@ -132,12 +135,15 @@ import com.google.gwt.core.client.Scheduler.ScheduledCommand;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.shared.HandlerManager;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.CommandCanceledException;
import com.google.gwt.user.client.Cookies;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HasWidgets;
import com.google.gwt.user.client.ui.ScrollPanel;
@ -193,6 +199,7 @@ public class AppController implements SubscriberInterface {
EventsTypeEnum.TRASH_EVENT,
EventsTypeEnum.UPDATE_WORKSPACE_SIZE,
EventsTypeEnum.UPDATED_VRE_PERMISSION,
EventsTypeEnum.GET_DETAILS_FOR_ITEM,
EventsTypeEnum.FILE_VERSIONING_HISTORY_EVENT
});
bind();
@ -315,17 +322,6 @@ public class AppController implements SubscriberInterface {
});
// eventBus.addHandler(GetPublicLinkEvent.TYPE, new GetPublicLinkEventHandler() {
//
// @Override
// public void onGetPublicLink(GetPublicLinkEvent getPublicLinkEvent) {
// // TODO Auto-generated method stub
// if(getPublicLinkEvent.getSourceFile()!=null){
// AppControllerExplorer.getEventBus().fireEvent(new GetPublicLinkEvent(getPublicLinkEvent.getSourceFile(), getPublicLinkEvent.getVersion()));
// }
// }
// });
eventBus.addHandler(AccountingHistoryEvent.TYPE, new AccountingHistoryEventHandler() {
@Override
@ -362,22 +358,12 @@ public class AppController implements SubscriberInterface {
if(file==null)
file = getGridSelectedItem();
if(file!=null)
new DialogGetInfo(file);
if(file!=null) {
showDetails(file,AppControllerExplorer.mapOfAllowedMimeTypesForPreview);
}
}
});
// eventBus.addHandler(GetShareLinkEvent.TYPE, new GetSharedLinkEventHandler() {
//
// @Override
// public void onGetLink(GetShareLinkEvent getLinkEvent) {
//
// FileModel getLinkFile = getLinkEvent.getSourceFile()!=null?getLinkEvent.getSourceFile():wsPortlet.getToolBarPath().getLastParent();
// GWT.log("Fired from WS GetShareLinkEvent on: "+getLinkFile);
// AppControllerExplorer.getEventBus().fireEvent(new org.gcube.portlets.user.workspace.client.event.GetShareLinkEvent(getLinkFile));
// }
// });
eventBus.addHandler(GridRefreshEvent.TYPE, new GridRefreshEventHandler() {
@Override
@ -458,12 +444,19 @@ public class AppController implements SubscriberInterface {
if(!event.isMultiSelection()){ //IS NOT MULTISELECTION
doElementGridSelected(true, event.getSourceFile());
//showing item details if east panel is visible
if(getMainPanel().getEastPanel().isVisible()) {
showDetails(event.getSourceFile(),AppControllerExplorer.mapOfAllowedMimeTypesForPreview);
}
}else{ //IS MULTISELECTION
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemFunctionalities().activeButtonForMultiSelection(true);
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemDetails().enableInfoHistoryButtons(event.getSourceFile(), false);
}
}
});
@ -2305,4 +2298,27 @@ public class AppController implements SubscriberInterface {
AppController.getEventBus().fireEvent(new FileVersioningEvent(WorkspaceVersioningOperation.SHOW, file, null, null, null));
}
@Override
public void showDetails(FileModel fileModel, Map<String,List<String>> mapAllowedMimeTypesForPreview) {
GWT.log("show details for: "+fileModel.getName());
final ContentPanel eastPanel = this.getMainPanel().getEastPanel();
eastPanel.removeAll();
Command onCloseCommand = new Command() {
@Override
public void execute() {
eastPanel.setVisible(false);
}
};
ScrollPanel panel = new ScrollPanel();
DialogGetInfoBootstrap dlg = new DialogGetInfoBootstrap(fileModel, onCloseCommand, mapAllowedMimeTypesForPreview);
panel.add(dlg);
eastPanel.add(panel);
eastPanel.setVisible(true);
eastPanel.layout();
}
}

View File

@ -81,7 +81,7 @@ public class GxtGridFilterGroupPanel extends LayoutContainer {
public GxtGridFilterGroupPanel(boolean group) {
// setLayout(new FitLayout());
setId("GxtGridFilterGroupPanel "+Random.nextInt());
ColumnConfig icon = new ColumnConfig(FileModel.ICON, "", 40);
ColumnConfig icon = new ColumnConfig(FileModel.ICON, "", 60);
icon.setSortable(false);
ColumnConfig name = new ColumnConfig(FileGridModel.NAME, FileGridModel.NAME, 280);
ColumnConfig type = new ColumnConfig(FileGridModel.TYPE, FileGridModel.TYPE, 60);

View File

@ -18,6 +18,7 @@ import com.extjs.gxt.ui.client.widget.layout.BorderLayout;
import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.google.gwt.dom.client.Style.Overflow;
import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.user.client.Random;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.RootPanel;
@ -90,11 +91,14 @@ public class GxtBorderLayoutPanel extends ContentPanel {
north.setHeaderVisible(false);
west.setHeaderVisible(false);
south.setHeading(ConstantsPortlet.DETAILS);
/* south.setHeading(ConstantsPortlet.DETAILS);
south.setHeaderVisible(false);
south.setLayout(new FitLayout());
south.setLayout(new FitLayout());*/
east.setHeading(ConstantsPortlet.DETAILS);
east.setHeaderVisible(false);
east.setVisible(false);
east.setLayout(new FitLayout());
// south.setVisible(false);
}
@ -128,13 +132,12 @@ public class GxtBorderLayoutPanel extends ContentPanel {
BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);
centerData.setMargins(new Margins(0));
BorderLayoutData eastData = new BorderLayoutData(LayoutRegion.EAST, 150,50,150);
BorderLayoutData eastData = new BorderLayoutData(LayoutRegion.EAST, 430,430,430);
eastData.setSplit(true);
eastData.setCollapsible(true);
eastData.setMargins(new Margins(0,0,0,1));
eastData.setMargins(new Margins(0,0,0,5));
BorderLayoutData southData = new BorderLayoutData(LayoutRegion.SOUTH, 30,30,30);
southData.setSplit(true);
southData.setCollapsible(false);
@ -142,9 +145,9 @@ public class GxtBorderLayoutPanel extends ContentPanel {
north.add(this.searchAndFilterContainer);
north.setScrollMode(Scroll.AUTOY);
west.add(this.expPanel);
west.add(this.expPanel);
north.addListener(Events.Resize, new Listener<BoxComponentEvent>(){
@Override
@ -191,11 +194,10 @@ public class GxtBorderLayoutPanel extends ContentPanel {
public void handleEvent(BoxComponentEvent be) {
expPanel.getAsycTreePanel().setSizeTreePanel(expPanel.getWidth()-13, expPanel.getHeight()-10);
// if(expPanel.getSmartFolderPanel()!=null)
// expPanel.getSmartFolderPanel().setSizeSmartPanel(expPanel.getWidth()-2, expPanel.getHeight()-29);
// expPaneleast.getSmartFolderPanel().setSizeSmartPanel(expPanel.getWidth()-2, expPanel.getHeight()-29);
}
});
add(north, northData);
add(west, westData);
add(center, centerData);
@ -228,4 +230,8 @@ public class GxtBorderLayoutPanel extends ContentPanel {
public void collapseTreePanel() {
west.collapse();
}
public ContentPanel getEastPanel() {
return east;
}
}