Skip to content

Commit

Permalink
Bug #10599: fixing the loading problem of administration homepage whe…
Browse files Browse the repository at this point in the history
…n the current user has access level of domain manager.

Fixing also the header of administration page which was sometimes disappearing.
  • Loading branch information
SilverYoCha committed Apr 5, 2019
1 parent 7efd360 commit 5c7dd10
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
Expand Up @@ -224,6 +224,7 @@
frameContentDocument.body.setAttribute('tabindex', '-1');
frameContentDocument.body.focus();

spAdminLayout.getBody().resize();
this.getContent().dispatchEvent("load");
this.hideProgressMessage();
}.bind(this));
Expand Down Expand Up @@ -425,8 +426,5 @@ function initializeSilverpeasAdminLayout(bodyLoadParameters) {
$topWindow.spAdminWindow = window.spAdminWindow;
spAdminLayout.getHeader().load({'layoutInitialization' : true});
spAdminLayout.getBody().load(bodyLoadParameters);
setTimeout(function() {
spAdminLayout.getBody().resize();
}, 400);
}
}
Expand Up @@ -190,12 +190,21 @@
}, params);
var __load = function() {
var promises = [];
promises.push(spAdminLayout.getBody().getNavigation().load(_params.navigationParams));
var navigationPromise = spAdminLayout.getBody().getNavigation().load(_params.navigationParams);
promises.push(navigationPromise);
var _contentParams = sp.param.singleToObject('url', _params.contentParams);
var _contentUrl = _contentParams.url;
delete _contentParams.url;
_contentUrl = sp.url.format(_contentUrl, _contentParams);
promises.push(spAdminLayout.getBody().getContent().load(_contentUrl));
if (params.navigationThenContent) {
__logDebug("__loadBody by loading first navigation and then the content");
navigationPromise.then(function() {
return spAdminLayout.getBody().getContent().load(_contentUrl);
});
} else {
__logDebug("__loadBody by loading navigation and content simultaneously");
promises.push(spAdminLayout.getBody().getContent().load(_contentUrl));
}
return sp.promise.whenAllResolved(promises)['catch'](__loadErrorListener);
};
if (__spAdminWindowContext.queue.exists()) {
Expand Down Expand Up @@ -289,7 +298,10 @@

this.loadUserAndGroupHomepage = function() {
__logDebug("Loading space & component homepage");
return __loadUserAndGroupBody(sp.promise.resolveDirectlyWith());
return __loadUserAndGroupBody({
jsonPromise : sp.promise.resolveDirectlyWith(),
navigationThenContent : true
});
};

this.loadDomain = function(id) {
Expand Down

0 comments on commit 5c7dd10

Please sign in to comment.