From 365401802c637258f83a0cee562cb1a895555d50 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Wed, 23 Nov 2016 16:21:22 +0000 Subject: [PATCH] Updated to support new portal theme git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-widgetx@134604 82a268e6-3cf1-43bd-a215-b396298e98cf --- .classpath | 6 ++--- distro/changelog.xml | 3 +++ pom.xml | 2 +- .../user/tdwx/client/PagingToolBarX.java | 26 +++++++++++++++++++ .../tdwx/client/TabularDataXGridPanel.java | 8 +++--- 5 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 src/main/java/org/gcube/portlets/user/tdwx/client/PagingToolBarX.java diff --git a/.classpath b/.classpath index 29bdfb7..0c14c4a 100644 --- a/.classpath +++ b/.classpath @@ -1,12 +1,12 @@ - + - + @@ -40,5 +40,5 @@ - + diff --git a/distro/changelog.xml b/distro/changelog.xml index 947e361..573247e 100644 --- a/distro/changelog.xml +++ b/distro/changelog.xml @@ -1,4 +1,7 @@ + + Added fix for support new portal theme + Added different colors for columns of different type [issue #251] diff --git a/pom.xml b/pom.xml index a564f96..d0f90dd 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ org.gcube.portlets.user tabular-data-widgetx - 1.8.0-SNAPSHOT + 1.9.0-SNAPSHOT tabular-data-widgetx Widget that allows visualization of tabular data diff --git a/src/main/java/org/gcube/portlets/user/tdwx/client/PagingToolBarX.java b/src/main/java/org/gcube/portlets/user/tdwx/client/PagingToolBarX.java new file mode 100644 index 0000000..09ad1a3 --- /dev/null +++ b/src/main/java/org/gcube/portlets/user/tdwx/client/PagingToolBarX.java @@ -0,0 +1,26 @@ +package org.gcube.portlets.user.tdwx.client; + +import com.sencha.gxt.widget.core.client.toolbar.PagingToolBar; + +/** + * + * @author Giancarlo Panichi email: g.panichi@isti.cnr.it + * + */ +public class PagingToolBarX extends PagingToolBar { + + public PagingToolBarX(int pageSize) { + super(pageSize); + } + + public void fixPageTextWidth() { + pageText.getElement() + .setAttribute( + "style", + "width: 30px !important;" + + "margin: 0px;left: 108px;top: 2px;"); + + } + +} diff --git a/src/main/java/org/gcube/portlets/user/tdwx/client/TabularDataXGridPanel.java b/src/main/java/org/gcube/portlets/user/tdwx/client/TabularDataXGridPanel.java index d14a93c..8dc9158 100644 --- a/src/main/java/org/gcube/portlets/user/tdwx/client/TabularDataXGridPanel.java +++ b/src/main/java/org/gcube/portlets/user/tdwx/client/TabularDataXGridPanel.java @@ -130,7 +130,7 @@ public class TabularDataXGridPanel extends ContentPanel { private GridAndCellSelectionModel sm; - private PagingToolBar pagingToolBar; + private PagingToolBarX pagingToolBar; /** @@ -754,9 +754,11 @@ public class TabularDataXGridPanel extends ContentPanel { loader.addLoadHandler(new LoadResultListStoreBinding>( store)); - pagingToolBar = new PagingToolBar(PAGINGDIMENSION); + pagingToolBar = new PagingToolBarX(PAGINGDIMENSION); pagingToolBar.getElement().getStyle() - .setProperty("borderBottom", "none"); + .setProperty("borderBottom", "none"); + pagingToolBar.fixPageTextWidth(); + pagingToolBar.setItemId("TDMPagingToolBarX"); pagingToolBar.bind(loader);