moved the cookie setter before iframe's url is set
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/gcube-ckan-datacatalog@142216 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
5947db3dd8
commit
a775694e67
|
@ -95,27 +95,26 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
|||
@Override
|
||||
public void onSuccess(CkanConnectorAccessPoint ckan) {
|
||||
|
||||
ckanAccessPoint = ckan;
|
||||
instanceCkanFrame(ckan.buildURI());
|
||||
GCubeCkanDataCatalogPanel.this.rootPanel.remove(loading);
|
||||
if(ckan.isOutsideFromPortal()){
|
||||
|
||||
// now perform the other requests
|
||||
GCubeCkanDataCatalog.service.outsidePortal(new AsyncCallback<Boolean>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(Boolean result) {
|
||||
|
||||
if (result) {
|
||||
// the portlet is outside the portal and no user is logged
|
||||
// in show only home and statistics
|
||||
managementPanel.doNotShowUserRelatedInfo();
|
||||
|
||||
// set the cookie to hide the banner
|
||||
// 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);
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
// set the iframe url
|
||||
ckanAccessPoint = ckan;
|
||||
instanceCkanFrame(ckan.buildURI());
|
||||
GCubeCkanDataCatalogPanel.this.rootPanel.remove(loading);
|
||||
|
||||
if(!ckan.isOutsideFromPortal()){
|
||||
|
||||
|
||||
// MANAGE CKAN MANAGEMENT PANEL ACCORDING TO MY ROLE
|
||||
GCubeCkanDataCatalog.service.getMyRole(new AsyncCallback<RolesCkanGroupOrOrg>() {
|
||||
|
@ -194,13 +193,7 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
|||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
managementPanel.doNotShowUserRelatedInfo();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue