diff --git a/pom.xml b/pom.xml
index 2cac9bc..8c38ebb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -93,8 +93,7 @@
org.gcube.core
common-scope-maps
[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)
-
-
+ compile
diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/view/panels/GxtBorderLayoutPanel.java b/src/main/java/org/gcube/portlets/user/workspace/client/view/panels/GxtBorderLayoutPanel.java
index 88ad5dc..b0e69ba 100644
--- a/src/main/java/org/gcube/portlets/user/workspace/client/view/panels/GxtBorderLayoutPanel.java
+++ b/src/main/java/org/gcube/portlets/user/workspace/client/view/panels/GxtBorderLayoutPanel.java
@@ -124,6 +124,16 @@ public class GxtBorderLayoutPanel extends ContentPanel {
}
});
+
+ center.addListener(Events.Resize,new Listener(){
+
+ @Override
+ public void handleEvent(BoxComponentEvent be) {
+
+ toolBarItemDetails.refreshSize();
+ }
+
+ });
// center.add(this.toolbarContainer);
center.add(this.gxtCardLayoutResultPanel);
diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/view/toolbars/ACLDivInfo.java b/src/main/java/org/gcube/portlets/user/workspace/client/view/toolbars/ACLDivInfo.java
index c8ed196..cb45d51 100644
--- a/src/main/java/org/gcube/portlets/user/workspace/client/view/toolbars/ACLDivInfo.java
+++ b/src/main/java/org/gcube/portlets/user/workspace/client/view/toolbars/ACLDivInfo.java
@@ -20,6 +20,7 @@ public class ACLDivInfo extends LayoutContainer {
public ACLDivInfo(String caption, AbstractImagePrototype img) {
super();
super.setWidth(80);
+ setId("ACLDivInfo");
text.setPixelSize(50, 26);
hpPanel.setWidth("100%");
diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/view/toolbars/GxtBottomToolBarItem.java b/src/main/java/org/gcube/portlets/user/workspace/client/view/toolbars/GxtBottomToolBarItem.java
index 5bca83b..31ebcfa 100644
--- a/src/main/java/org/gcube/portlets/user/workspace/client/view/toolbars/GxtBottomToolBarItem.java
+++ b/src/main/java/org/gcube/portlets/user/workspace/client/view/toolbars/GxtBottomToolBarItem.java
@@ -11,7 +11,10 @@ import org.gcube.portlets.user.workspace.shared.WorkspaceACL;
import org.gcube.portlets.user.workspace.shared.WorkspaceTrashOperation;
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
+import com.extjs.gxt.ui.client.event.BaseEvent;
import com.extjs.gxt.ui.client.event.ButtonEvent;
+import com.extjs.gxt.ui.client.event.Events;
+import com.extjs.gxt.ui.client.event.Listener;
import com.extjs.gxt.ui.client.event.SelectionListener;
import com.extjs.gxt.ui.client.widget.HorizontalPanel;
import com.extjs.gxt.ui.client.widget.Label;
@@ -20,6 +23,7 @@ import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.form.TextField;
import com.extjs.gxt.ui.client.widget.toolbar.FillToolItem;
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
+import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.AbstractImagePrototype;
/**
@@ -124,18 +128,32 @@ public class GxtBottomToolBarItem extends ToolBar{
add(bHistory);
hpItemsNumber = new HorizontalPanel();
- hpItemsNumber.setStyleAttribute("margin-left", "10px");
- hpItemsNumber.setHorizontalAlign(HorizontalAlignment.CENTER);
+ hpItemsNumber.setId("HP-ItemsNumber");
+ hpItemsNumber.setStyleAttribute("margin-right", "50px");
+
+ hpItemsNumber.setHorizontalAlign(HorizontalAlignment.RIGHT);
hpItemsNumber.add(labelItemsNumber);
+ hpItemsNumber.addListener(Events.Render, new Listener() {
+
+ @Override
+ public void handleEvent(BaseEvent be) {
+ refreshSize();
+
+ }
+ });
+
// add(new FillToolItem());
add(hpItemsNumber);
- add(new FillToolItem());
+ FillToolItem filler = new FillToolItem();
+ filler.setId("filler-item");
+ add(filler);
add(aclDivInfo);
enableInfoHistoryButtons(false);
}
+
public void resetDetails(){
@@ -207,4 +225,23 @@ public class GxtBottomToolBarItem extends ToolBar{
hpItemsNumber.layout();
}
+
+ public void refreshSize(){
+
+ if(this.isRendered()){
+ String width = this.getElement().getStyle().getWidth();
+ width = width.replace("px", "");
+ try{
+ long intWidth = Long.parseLong(width);
+ intWidth = (intWidth/2)-30; //calculate the center
+ intWidth = intWidth-(60*3); //previous buttons
+ GWT.log("width is "+width);
+// hpItemsNumber.setWidth(intWidth+"px");
+ hpItemsNumber.setStyleAttribute("margin-left", intWidth+"px");
+ hpItemsNumber.layout();
+ }catch (Exception e) {
+ GWT.log("width is not a long "+e);
+ }
+ }
+ }
}
diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/view/toolbars/GxtBreadcrumbPathPanel.java b/src/main/java/org/gcube/portlets/user/workspace/client/view/toolbars/GxtBreadcrumbPathPanel.java
index 3b0e1c2..de7e545 100644
--- a/src/main/java/org/gcube/portlets/user/workspace/client/view/toolbars/GxtBreadcrumbPathPanel.java
+++ b/src/main/java/org/gcube/portlets/user/workspace/client/view/toolbars/GxtBreadcrumbPathPanel.java
@@ -151,8 +151,6 @@ public class GxtBreadcrumbPathPanel {
*
*/
public void refreshSize() {
-
-
GWT.log("Refreshed size");
}