ckan_hide_header cookie set as session-like cookie: now expires when the browser is closed

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/gcube-ckan-datacatalog@142446 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2017-02-10 09:04:03 +00:00
parent 6c83e1953e
commit c307f279a6
1 changed files with 2 additions and 5 deletions

View File

@ -4,7 +4,6 @@
package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.view;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -101,10 +100,8 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
// in show only home and statistics
managementPanel.doNotShowUserRelatedInfo();
// set the cookie to hide the banner (expires 3 hours later)
Date now = new Date();
now.setHours(now.getHours() + 3);
Cookies.setCookie("ckan_hide_header", "true", now, ".d4science.org", "/", false);
// set the cookie as session cookie (removed on browser close)
Cookies.setCookie("ckan_hide_header", "true", null, ".d4science.org", "/", false);
}