Added Creation Date to Template

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@115337 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2015-06-11 16:48:37 +00:00
parent 014b38ba7f
commit aab54e17e9
12 changed files with 53 additions and 44 deletions

23
pom.xml
View File

@ -144,11 +144,7 @@
</dependency>
<dependency>
<groupId>org.gcube.applicationsupportlayer</groupId>
<artifactId>aslsocial</artifactId>
</dependency>
<!-- PORTAL -->
<dependency>
<groupId>org.gcube.core</groupId>
@ -171,7 +167,22 @@
<groupId>org.gcube.applicationsupportlayer</groupId>
<artifactId>accesslogger</artifactId>
</dependency>
<!-- Social -->
<dependency>
<groupId>org.gcube.portal</groupId>
<artifactId>social-networking-library</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.applicationsupportlayer</groupId>
<artifactId>aslsocial</artifactId>
<scope>provided</scope>
</dependency>
<!-- GCube Widgets -->
<dependency>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>gcube-widgets</artifactId>

View File

@ -1,22 +0,0 @@
/**
*
*/
package org.gcube.portlets.user.td.client;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
* Constants for portlet
*
*/
public class Constants {
public static final String TDX_DATASOURCE_FACTORY_ID = "TDXDataSourceFactory";
public static final String APPLICATION_ID = "org.gcube.portlets.user.td.server.portlet.TabularDataPortlet";
}

View File

@ -69,6 +69,7 @@ import org.gcube.portlets.user.td.widgetcommonevent.client.type.TaskType;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.UIStateType;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.WidgetRequestType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.CellData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.Constants;
import org.gcube.portlets.user.td.widgetcommonevent.shared.GridHeaderOperationId;
import org.gcube.portlets.user.td.widgetcommonevent.shared.GridOperationId;
import org.gcube.portlets.user.td.widgetcommonevent.shared.RequestProperties;
@ -107,7 +108,7 @@ import com.sencha.gxt.widget.core.client.event.DialogHideEvent.DialogHideHandler
*/
public class TabularDataController {
private static final String TD_LANG_COOKIE = "TDLangCookie";
private SimpleEventBus eventBus;
private MainBoxPanel mainBoxPanel;
private UIStateType uiState = UIStateType.START;
@ -360,7 +361,7 @@ public class TabularDataController {
String currentLocaleCookie = Cookies.getCookie(LocaleInfo
.getLocaleCookieName());
Log.debug(TD_LANG_COOKIE + ":" + currentLocaleCookie);
Log.debug(Constants.TD_LANG_COOKIE + ":" + currentLocaleCookie);
LocaleInfo currentLocaleInfo = LocaleInfo.getCurrentLocale();
Log.debug("Current Locale:" + currentLocaleInfo.getLocaleName());
@ -372,11 +373,11 @@ public class TabularDataController {
long nowLong = now.getTime();
nowLong = nowLong + (1000 * 60 * 60 * 24 * 21);
now.setTime(nowLong);
String cookieLang = Cookies.getCookie(TD_LANG_COOKIE);
String cookieLang = Cookies.getCookie(Constants.TD_LANG_COOKIE);
if (cookieLang != null) {
Cookies.removeCookie(TD_LANG_COOKIE);
Cookies.removeCookie(Constants.TD_LANG_COOKIE);
}
Cookies.setCookie(TD_LANG_COOKIE, localeName, now);
Cookies.setCookie(Constants.TD_LANG_COOKIE, localeName, now);
com.google.gwt.user.client.Window.Location.reload();
}
@ -385,7 +386,7 @@ public class TabularDataController {
checkLocale();
String value = com.google.gwt.user.client.Window.Location
.getParameter("TabularResourceId");
.getParameter(Constants.TABULAR_RESOURCE_ID);
TRId startTRId = new TRId(value);
TDGWTServiceAsync.INSTANCE.restoreUISession(startTRId,

View File

@ -32,7 +32,7 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
*/
public class TemplateApplyDialog extends Window implements
MonitorDialogListener {
private static final String WIDTH = "720px";
private static final String WIDTH = "800px";
private static final String HEIGHT = "530px";
private EventBus eventBus;

View File

@ -61,7 +61,7 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
*
*/
public class TemplateApplyPanel extends FramedPanel {
private static final String WIDTH = "630px";
private static final String WIDTH = "790px";
private static final String HEIGHT = "520px";
private EventBus eventBus;
private TemplateApplyDialog parent;
@ -121,13 +121,18 @@ public class TemplateApplyPanel extends FramedPanel {
ColumnConfig<TemplateData, String> descriptionCol = new ColumnConfig<TemplateData, String>(
props.description(), 120, "Description");
ColumnConfig<TemplateData, String> creationDateCol = new ColumnConfig<TemplateData, String>(
props.creationDate(), 56, "Creation Date");
List<ColumnConfig<TemplateData, ?>> l = new ArrayList<ColumnConfig<TemplateData, ?>>();
l.add(nameCol);
l.add(categoryCol);
l.add(ownerCol);
l.add(agencyCol);
l.add(descriptionCol);
l.add(creationDateCol);
ColumnModel<TemplateData> cm = new ColumnModel<TemplateData>(l);

View File

@ -25,6 +25,7 @@ public interface TemplateDataProperties extends PropertyAccess<TemplateData> {
ValueProvider<TemplateData, String> ownerLogin();
ValueProvider<TemplateData, String> agency();
ValueProvider<TemplateData, String> description();
ValueProvider<TemplateData, String> creationDate();

View File

@ -23,7 +23,7 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
*
*/
public class TemplateDeleteDialog extends Window {
private static final String WIDTH = "720px";
private static final String WIDTH = "800px";
private static final String HEIGHT = "530px";
private EventBus eventBus;

View File

@ -54,7 +54,7 @@ import com.sencha.gxt.widget.core.client.toolbar.LabelToolItem;
import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
public class TemplateDeletePanel extends FramedPanel {
private static final String WIDTH = "630px";
private static final String WIDTH = "790px";
private static final String HEIGHT = "520px";
private EventBus eventBus;
private TemplateDeleteDialog parent;
@ -111,14 +111,19 @@ public class TemplateDeletePanel extends FramedPanel {
ColumnConfig<TemplateData, String> descriptionCol = new ColumnConfig<TemplateData, String>(
props.description(), 120, "Description");
ColumnConfig<TemplateData, String> creationDateCol = new ColumnConfig<TemplateData, String>(
props.creationDate(), 56, "Creation Date");
List<ColumnConfig<TemplateData, ?>> l = new ArrayList<ColumnConfig<TemplateData, ?>>();
l.add(nameCol);
l.add(categoryCol);
l.add(ownerCol);
l.add(agencyCol);
l.add(descriptionCol);
l.add(creationDateCol);
ColumnModel<TemplateData> cm = new ColumnModel<TemplateData>(l);
store = new ExtendedListStore<TemplateData>(props.id());

View File

@ -17,7 +17,7 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
*
*/
public class TemplateOpenDialog extends Window {
private static final String WIDTH = "720px";
private static final String WIDTH = "800px";
private static final String HEIGHT = "530px";
private EventBus eventBus;

View File

@ -59,7 +59,7 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
*
*/
public class TemplateOpenPanel extends FramedPanel {
private static final String WIDTH = "630px";
private static final String WIDTH = "790px";
private static final String HEIGHT = "520px";
private EventBus eventBus;
@ -117,13 +117,17 @@ public class TemplateOpenPanel extends FramedPanel {
ColumnConfig<TemplateData, String> descriptionCol = new ColumnConfig<TemplateData, String>(
props.description(), 120, "Description");
ColumnConfig<TemplateData, String> creationDateCol = new ColumnConfig<TemplateData, String>(
props.creationDate(), 56, "Creation Date");
List<ColumnConfig<TemplateData, ?>> l = new ArrayList<ColumnConfig<TemplateData, ?>>();
l.add(nameCol);
l.add(categoryCol);
l.add(ownerCol);
l.add(agencyCol);
l.add(descriptionCol);
l.add(creationDateCol);
ColumnModel<TemplateData> cm = new ColumnModel<TemplateData>(l);

View File

@ -17,7 +17,7 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
*
*/
public class TemplateShareDialog extends Window {
private static final String WIDTH = "720px";
private static final String WIDTH = "800px";
private static final String HEIGHT = "530px";
private EventBus eventBus;

View File

@ -59,7 +59,7 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
*
*/
public class TemplateSharePanel extends FramedPanel {
private static final String WIDTH = "630px";
private static final String WIDTH = "790px";
private static final String HEIGHT = "520px";
private EventBus eventBus;
private TemplateShareDialog parent;
@ -115,6 +115,9 @@ public class TemplateSharePanel extends FramedPanel {
ColumnConfig<TemplateData, String> descriptionCol = new ColumnConfig<TemplateData, String>(
props.description(), 120, "Description");
ColumnConfig<TemplateData, String> creationDateCol = new ColumnConfig<TemplateData, String>(
props.creationDate(), 56, "Creation Date");
List<ColumnConfig<TemplateData, ?>> l = new ArrayList<ColumnConfig<TemplateData, ?>>();
l.add(nameCol);
@ -122,6 +125,7 @@ public class TemplateSharePanel extends FramedPanel {
l.add(ownerCol);
l.add(agencyCol);
l.add(descriptionCol);
l.add(creationDateCol);
ColumnModel<TemplateData> cm = new ColumnModel<TemplateData>(l);