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