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();
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
|
@ -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);
|
||||
|
|
|
@ -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