Added collapsible tree panel when window width is lower than a given value in pixels and shifted download button next to the upload one
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@146828 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
d1c87fcf34
commit
d7419fbf43
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/workspace-6.16.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<classpathentry kind="src" output="target/workspace-6.17.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.16.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<classpathentry excluding="**" kind="src" output="target/workspace-6.17.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
@ -34,5 +34,5 @@
|
|||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
|
||||
<classpathentry kind="output" path="target/workspace-6.16.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
<classpathentry kind="output" path="target/workspace-6.17.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
>>>>>>>=.r93212
|
||||
eclipse.preferences.version=1
|
||||
jarsExcludedFromWebInfLib=
|
||||
lastWarOutDir=/home/francesco-mangiacrapa/wseclipseluna/workspace-TRUNK/target/workspace-6.9.0-SNAPSHOT
|
||||
lastWarOutDir=/Users/massi/Documents/workspace/workspace/target/workspace-6.17.0-SNAPSHOT
|
||||
warSrcDir=src/main/webapp
|
||||
warSrcDirIsOutput=false
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<dependent-module archiveName="workspace-tree-widget-6.16.2-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/WorkspaceTree/WorkspaceTree">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
|
||||
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
||||
<property name="context-root" value="workspace"/>
|
||||
|
|
|
@ -62,4 +62,6 @@ public class ConstantsPortlet {
|
|||
|
||||
public static final int NORTH_HEIGHT = 82;
|
||||
|
||||
//Tree Panel
|
||||
public static final int HIDE_TREE_PANEL_WHEN_WIDTH_LESS_THAN = 650;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package org.gcube.portlets.user.workspace.client;
|
||||
|
||||
import com.google.gwt.core.client.EntryPoint;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.event.logical.shared.ResizeEvent;
|
||||
import com.google.gwt.event.logical.shared.ResizeHandler;
|
||||
import com.google.gwt.user.client.Window;
|
||||
|
@ -27,7 +28,7 @@ public class WorkspacePortlet implements EntryPoint {
|
|||
Window.addResizeHandler(new ResizeHandler() {
|
||||
@Override
|
||||
public void onResize(ResizeEvent event) {
|
||||
System.out.println("onWindowResized width: "+event.getWidth()+" height: "+event.getHeight());
|
||||
GWT.log("onWindowResized width: "+event.getWidth()+" height: "+event.getHeight());
|
||||
updateSize();
|
||||
}
|
||||
});
|
||||
|
@ -51,9 +52,13 @@ public class WorkspacePortlet implements EntryPoint {
|
|||
rootHeight = 550;
|
||||
|
||||
int rootWidth = Window.getClientWidth() - 2* leftBorder; //- rightScrollBar;
|
||||
System.out.println("New workspace dimension Height: "+rootHeight+" Width: "+rootWidth);
|
||||
GWT.log("New workspace dimension Height: "+rootHeight+" Width: "+rootWidth);
|
||||
appController.getMainPanel().setHeight(rootHeight);
|
||||
appController.getMainPanel().setWidth(rootWidth);
|
||||
if (rootWidth < ConstantsPortlet.HIDE_TREE_PANEL_WHEN_WIDTH_LESS_THAN) {
|
||||
appController.getMainPanel().collapseTreePanel();
|
||||
GWT.log("Collapses tree panel");
|
||||
}
|
||||
}
|
||||
|
||||
// private void showGuidedTour() {
|
||||
|
|
|
@ -215,4 +215,8 @@ public class GxtBorderLayoutPanel extends ContentPanel {
|
|||
public void updateDnDParentId(String parentId){
|
||||
dnd.setParameters(parentId, UPLOAD_TYPE.File);
|
||||
}
|
||||
|
||||
public void collapseTreePanel() {
|
||||
west.collapse();
|
||||
}
|
||||
}
|
|
@ -66,7 +66,7 @@ public class GxtToolBarItemFunctionality {
|
|||
private ToolBar toolBar = new ToolBar();
|
||||
private Button btnPreview;
|
||||
private ToggleButton btnGridView;
|
||||
// private Button btnGetInfo;
|
||||
// private Button btnGetInfo;
|
||||
private Button btnGetSharedLink;
|
||||
private Button btnPublicLink;
|
||||
private Button btnFolderLink;
|
||||
|
@ -123,6 +123,14 @@ public class GxtToolBarItemFunctionality {
|
|||
|
||||
toolBar.add(btnUploadFile);
|
||||
|
||||
//DOWNLOAD
|
||||
btnDownloadFile = new Button(ConstantsPortlet.DOWNLOADITEM,Resources.getIconDownload());
|
||||
btnDownloadFile.setScale(ButtonScale.SMALL);
|
||||
btnDownloadFile.setIconAlign(IconAlign.TOP);
|
||||
btnDownloadFile.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
|
||||
toolBar.add(btnDownloadFile);
|
||||
|
||||
btnRefreshFolder = new Button(ConstantsPortlet.REFRESH, Resources.getIconRefresh());
|
||||
btnRefreshFolder.setScale(ButtonScale.SMALL);
|
||||
btnRefreshFolder.setIconAlign(IconAlign.TOP);
|
||||
|
@ -131,13 +139,13 @@ public class GxtToolBarItemFunctionality {
|
|||
toolBar.add(btnRefreshFolder);
|
||||
|
||||
toolBar.add(new SeparatorToolItem());
|
||||
// btnGetInfo = new Button("Info", Resources.getIconInfo());
|
||||
// btnGetInfo.setScale(ButtonScale.SMALL);
|
||||
// btnGetInfo.setIconAlign(IconAlign.TOP);
|
||||
// btnGetInfo.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
//
|
||||
// toolBar.add(btnGetInfo);
|
||||
// toolBar.add(new SeparatorToolItem());
|
||||
// btnGetInfo = new Button("Info", Resources.getIconInfo());
|
||||
// btnGetInfo.setScale(ButtonScale.SMALL);
|
||||
// btnGetInfo.setIconAlign(IconAlign.TOP);
|
||||
// btnGetInfo.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
//
|
||||
// toolBar.add(btnGetInfo);
|
||||
// toolBar.add(new SeparatorToolItem());
|
||||
|
||||
btnRemoveItem = new Button(ConstantsPortlet.DELETEITEM,
|
||||
Resources.getIconDeleteItem());
|
||||
|
@ -146,8 +154,8 @@ public class GxtToolBarItemFunctionality {
|
|||
btnRemoveItem.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
|
||||
toolBar.add(btnRemoveItem);
|
||||
// toolBar.add(new SeparatorToolItem());
|
||||
// toolBar.add(new SeparatorToolItem());
|
||||
// toolBar.add(new SeparatorToolItem());
|
||||
// toolBar.add(new SeparatorToolItem());
|
||||
|
||||
btnRenameItem = new Button(ConstantsPortlet.RENAMEITEM, Resources.getIconRenameItem());
|
||||
btnRenameItem.setScale(ButtonScale.SMALL);
|
||||
|
@ -167,7 +175,7 @@ public class GxtToolBarItemFunctionality {
|
|||
btnCutItem = new Button("Cut", Resources.getIconCut());
|
||||
btnCutItem.setScale(ButtonScale.SMALL);
|
||||
btnCutItem.setIconAlign(IconAlign.TOP);
|
||||
// toolBar.add(btnCutItem);
|
||||
// toolBar.add(btnCutItem);
|
||||
|
||||
//PASTE
|
||||
btnPasteItem = new Button("Paste", Resources.getIconPaste());
|
||||
|
@ -177,14 +185,6 @@ public class GxtToolBarItemFunctionality {
|
|||
|
||||
toolBar.add(btnPasteItem);
|
||||
|
||||
|
||||
btnDownloadFile = new Button(ConstantsPortlet.DOWNLOADITEM,Resources.getIconDownload());
|
||||
btnDownloadFile.setScale(ButtonScale.SMALL);
|
||||
btnDownloadFile.setIconAlign(IconAlign.TOP);
|
||||
btnDownloadFile.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
|
||||
toolBar.add(btnDownloadFile);
|
||||
|
||||
btnPreview = new Button(ConstantsPortlet.PREVIEW ,Resources.getIconPreview());
|
||||
btnPreview.setScale(ButtonScale.SMALL);
|
||||
btnPreview.setIconAlign(IconAlign.TOP);
|
||||
|
@ -198,7 +198,7 @@ public class GxtToolBarItemFunctionality {
|
|||
toolBar.add(btnOpen);
|
||||
|
||||
|
||||
// toolBar.add(new SeparatorToolItem());
|
||||
// toolBar.add(new SeparatorToolItem());
|
||||
toolBar.add(new SeparatorToolItem());
|
||||
|
||||
btnGetSharedLink = new Button("Get Link", Resources.getIconShareLink());
|
||||
|
@ -230,11 +230,11 @@ public class GxtToolBarItemFunctionality {
|
|||
btnAccessFromDesktop.setIconAlign(IconAlign.TOP);
|
||||
btnAccessFromDesktop.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
|
||||
// toolBar.add(btnAccessFromDesktop);
|
||||
// toolBar.add(new SeparatorToolItem());
|
||||
// toolBar.add(btnAccessFromDesktop);
|
||||
// toolBar.add(new SeparatorToolItem());
|
||||
|
||||
// toolBar.add(new SeparatorToolItem());
|
||||
// toolBar.add(new SeparatorToolItem());
|
||||
// toolBar.add(new SeparatorToolItem());
|
||||
// toolBar.add(new SeparatorToolItem());
|
||||
|
||||
btnUploadArchive = new Button(ConstantsPortlet.UPLOADARCHIVE, Resources.getIconArchiveUpload());
|
||||
btnUploadArchive.setScale(ButtonScale.SMALL);
|
||||
|
@ -242,8 +242,8 @@ public class GxtToolBarItemFunctionality {
|
|||
btnUploadArchive.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
|
||||
toolBar.add(btnUploadArchive);
|
||||
// toolBar.add(new SeparatorToolItem());
|
||||
// toolBar.add(new SeparatorToolItem());
|
||||
// toolBar.add(new SeparatorToolItem());
|
||||
// toolBar.add(new SeparatorToolItem());
|
||||
|
||||
btnSetPermission= new Button(ConstantsPortlet.CHANGEPERMISSION,Resources.getIconWriteAll());
|
||||
btnSetPermission.setScale(ButtonScale.SMALL);
|
||||
|
@ -269,7 +269,7 @@ public class GxtToolBarItemFunctionality {
|
|||
|
||||
switchView(ViewSwitchTypeInResult.Group);
|
||||
|
||||
// toolBar.add(new FillToolItem());
|
||||
// toolBar.add(new FillToolItem());
|
||||
|
||||
this.activeButtonsOnSelectForOperation(null, false);
|
||||
}
|
||||
|
@ -354,12 +354,12 @@ public class GxtToolBarItemFunctionality {
|
|||
btnPasteItem.setEnabled(true);
|
||||
}
|
||||
|
||||
// final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem();
|
||||
//
|
||||
// if(fileGridModel.getIdentifier()!=null){
|
||||
// CopyAndPaste.copy(fileGridModel.getIdentifier());
|
||||
// btnPasteItem.setEnabled(true);
|
||||
// }
|
||||
// final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem();
|
||||
//
|
||||
// if(fileGridModel.getIdentifier()!=null){
|
||||
// CopyAndPaste.copy(fileGridModel.getIdentifier());
|
||||
// btnPasteItem.setEnabled(true);
|
||||
// }
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -374,12 +374,12 @@ public class GxtToolBarItemFunctionality {
|
|||
btnPasteItem.setEnabled(true);
|
||||
}
|
||||
|
||||
// final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem();
|
||||
//
|
||||
// if(fileGridModel.getIdentifier()!=null){
|
||||
// CopyAndPaste.copy(fileGridModel.getIdentifier());
|
||||
// btnPasteItem.setEnabled(true);
|
||||
// }
|
||||
// final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem();
|
||||
//
|
||||
// if(fileGridModel.getIdentifier()!=null){
|
||||
// CopyAndPaste.copy(fileGridModel.getIdentifier());
|
||||
// btnPasteItem.setEnabled(true);
|
||||
// }
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -447,17 +447,17 @@ public class GxtToolBarItemFunctionality {
|
|||
|
||||
|
||||
|
||||
// btnGetInfo.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
||||
//
|
||||
// @Override
|
||||
// public void componentSelected(ButtonEvent ce) {
|
||||
//
|
||||
// final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem();
|
||||
//
|
||||
// AppController.getEventBus().fireEvent(new GetInfoEvent(fileGridModel));
|
||||
//
|
||||
// }
|
||||
// });
|
||||
// btnGetInfo.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
||||
//
|
||||
// @Override
|
||||
// public void componentSelected(ButtonEvent ce) {
|
||||
//
|
||||
// final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem();
|
||||
//
|
||||
// AppController.getEventBus().fireEvent(new GetInfoEvent(fileGridModel));
|
||||
//
|
||||
// }
|
||||
// });
|
||||
|
||||
btnRenameItem.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
||||
|
||||
|
@ -510,8 +510,8 @@ public class GxtToolBarItemFunctionality {
|
|||
if(fileGridModel!=null && fileGridModel.isVreFolder()){
|
||||
|
||||
AppController.getEventBus().fireEvent(new VREChangePermissionsEvent(fileGridModel));
|
||||
// DialogPermission dialog = new DialogPermission(fileGridModel);
|
||||
// dialog.show();
|
||||
// DialogPermission dialog = new DialogPermission(fileGridModel);
|
||||
// dialog.show();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -550,8 +550,8 @@ public class GxtToolBarItemFunctionality {
|
|||
if(fileGridModel!=null){
|
||||
if(fileGridModel.isDirectory())
|
||||
AppController.getEventBus().fireEvent(new DoubleClickElementSelectedEvent(fileGridModel));
|
||||
// else if(fileGridModel.getGXTFolderItemType().equals(GXTFolderItemTypeEnum.REPORT) || fileGridModel.getGXTFolderItemType().equals(GXTFolderItemTypeEnum.REPORT_TEMPLATE))
|
||||
// AppController.getEventBus().fireEvent(new OpenReportsEvent(fileGridModel));
|
||||
// else if(fileGridModel.getGXTFolderItemType().equals(GXTFolderItemTypeEnum.REPORT) || fileGridModel.getGXTFolderItemType().equals(GXTFolderItemTypeEnum.REPORT_TEMPLATE))
|
||||
// AppController.getEventBus().fireEvent(new OpenReportsEvent(fileGridModel));
|
||||
else if(fileGridModel.getGXTFolderItemType().equals(GXTFolderItemTypeEnum.EXTERNAL_URL)){
|
||||
AppController.getEventBus().fireEvent(new ShowUrlEvent(fileGridModel));
|
||||
|
||||
|
@ -806,7 +806,7 @@ public class GxtToolBarItemFunctionality {
|
|||
btnRemoveItem.setEnabled(active);
|
||||
btnRenameItem.setEnabled(active);
|
||||
btnGetSharedLink.setEnabled(active);
|
||||
// btnGetInfo.setEnabled(active);
|
||||
// btnGetInfo.setEnabled(active);
|
||||
btnDownloadFile.setEnabled(active);
|
||||
btnPreview.setEnabled(active);
|
||||
btnOpen.setEnabled(active);
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
log4j.rootLogger=DEBUG, A1
|
||||
log4j.appender.A1=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
|
||||
|
||||
# Print the date in ISO 8601 format
|
||||
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
|
||||
|
||||
# Print only messages of level TRACE or above in the package org.gcube
|
||||
log4j.logger.org.gcube=TRACE
|
||||
log4j.logger.org.gcube.application.framework.core.session=INFO
|
||||
log4j.logger.org.gcube.common.scope.impl.DefaultScopeProvider=ERROR
|
||||
log4j.logger.com.netflix.astyanax.connectionpool.impl.CountingConnectionPoolMonitor=ERROR
|
Loading…
Reference in New Issue