256: Workspace explorer
Task-Url: https://support.d4science.org/issues/256 Added adjust size git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-explorer@117605 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
cbe0734a79
commit
276b3827dc
|
@ -7,7 +7,10 @@ import org.gcube.portlets.widgets.wsexplorer.client.resources.old.WorkspaceLight
|
|||
import org.gcube.portlets.widgets.wsexplorer.shared.Item;
|
||||
import org.gcube.portlets.widgets.wsexplorer.shared.ItemType;
|
||||
|
||||
import com.google.gwt.core.shared.GWT;
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.resources.client.ImageResource;
|
||||
import com.google.gwt.user.client.ui.SimplePanel;
|
||||
|
||||
/**
|
||||
* The Class Util.
|
||||
|
@ -112,4 +115,17 @@ public class Util {
|
|||
return "";
|
||||
}
|
||||
|
||||
public static void adjustSize(Element el, SimplePanel panel){
|
||||
if(el!=null){
|
||||
int heigth = el.getClientHeight();
|
||||
GWT.log("getClientHeight adjustSize el: "+heigth);
|
||||
int offset = 85;
|
||||
heigth = (heigth-offset>100)?heigth-offset:0;
|
||||
if(heigth>0){
|
||||
GWT.log("set new Explorer size: "+heigth);
|
||||
panel.setHeight(heigth+"px");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ package org.gcube.portlets.widgets.wsexplorer.client.save;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.Util;
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.WorkspaceExplorerConstants;
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.WorkspaceExplorerController;
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.event.ClickItemEvent;
|
||||
|
@ -129,14 +130,8 @@ public class WorkspaceExplorerSavePanel extends ScrollPanel implements HasWorskp
|
|||
}
|
||||
|
||||
private void adjustSize(){
|
||||
int heigth = this.getParent().getElement().getClientHeight();
|
||||
GWT.log("getClientHeight Resize Panel: "+heigth);
|
||||
int offset = 80;
|
||||
heigth = (heigth-offset>100)?heigth-offset:0;
|
||||
if(heigth>0){
|
||||
GWT.log("set new Explorer size: "+heigth);
|
||||
controller.getWsExplorer().getPanel().setHeight(heigth+"px");
|
||||
}
|
||||
if(this.getParent()!=null && this.getParent().getElement()!=null)
|
||||
Util.adjustSize(this.getParent().getElement(), controller.getWsExplorer().getPanel());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,6 +6,7 @@ package org.gcube.portlets.widgets.wsexplorer.client.select;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.Util;
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.WorkspaceExplorerConstants;
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.WorkspaceExplorerController;
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.event.ClickItemEvent;
|
||||
|
@ -81,9 +82,6 @@ public class WorkspaceExplorerSelectPanel extends ScrollPanel implements HasWors
|
|||
});
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.google.gwt.user.client.ui.ScrollPanel#onResize()
|
||||
*/
|
||||
@Override
|
||||
public void onResize() {
|
||||
super.onResize();
|
||||
|
@ -103,14 +101,8 @@ public class WorkspaceExplorerSelectPanel extends ScrollPanel implements HasWors
|
|||
}
|
||||
|
||||
private void adjustSize(){
|
||||
int heigth = this.getParent().getElement().getClientHeight();
|
||||
GWT.log("getClientHeight Resize Panel: "+heigth);
|
||||
int offset = 80;
|
||||
heigth = (heigth-offset>100)?heigth-offset:0;
|
||||
if(heigth>0){
|
||||
GWT.log("set new Explorer size: "+heigth);
|
||||
controller.getWsExplorer().getPanel().setHeight(heigth+"px");
|
||||
}
|
||||
if(this.getParent()!=null && this.getParent().getElement()!=null)
|
||||
Util.adjustSize(this.getParent().getElement(), controller.getWsExplorer().getPanel());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1239,9 +1239,9 @@ a:hover, a:focus {
|
|||
}
|
||||
|
||||
.alert-custom {
|
||||
margin-top: 10px;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 0 !important;
|
||||
padding: 4px !important;
|
||||
padding: 3px !important;
|
||||
}
|
||||
|
||||
.fileNameTextBox{
|
||||
|
|
Loading…
Reference in New Issue