Skip to content

Commit

Permalink
MID-4725 Active subscriber sees double sidebars on short pages
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Jun 12, 2018
1 parent 2f14924 commit 9e2d60e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
Expand Up @@ -129,7 +129,7 @@
<div wicket:id="debugPanel" style="z-index: 10000;"/>
</section>
</div>
<footer wicket:id="footerContainer" class="main-footer">
<footer wicket:id="footerContainer">
<div class="pull-right hidden-xs" wicket:id="version">
<b><wicket:message key="PageTemplate.version"/></b> <wicket:message key="pageBase.midPointVersion"/>
</div>
Expand Down
Expand Up @@ -891,7 +891,7 @@ public boolean isVisible() {

WebMarkupContainer footerContainer = new WebMarkupContainer(ID_FOOTER_CONTAINER);
footerContainer.setOutputMarkupId(true);
footerContainer.add(getFooterVisibleBehaviour());
footerContainer.add(AttributeAppender.append("class", isFooterVisible() ? "main-footer" : "main-footer-invisible"));
add(footerContainer);

WebMarkupContainer version = new WebMarkupContainer(ID_VERSION) {
Expand Down Expand Up @@ -2107,17 +2107,21 @@ private VisibleEnableBehaviour getFooterVisibleBehaviour() {

@Override
public boolean isVisible() {
String subscriptionId = getSubscriptionId();
if (StringUtils.isEmpty(subscriptionId)) {
return true;
}
return !WebComponentUtil.isSubscriptionIdCorrect(subscriptionId) ||
(SubscriptionType.DEMO_SUBSRIPTION.getSubscriptionType().equals(subscriptionId.substring(0, 2))
&& WebComponentUtil.isSubscriptionIdCorrect(subscriptionId));
return isFooterVisible();
}
};
}

private boolean isFooterVisible(){
String subscriptionId = getSubscriptionId();
if (StringUtils.isEmpty(subscriptionId)) {
return true;
}
return !WebComponentUtil.isSubscriptionIdCorrect(subscriptionId) ||
(SubscriptionType.DEMO_SUBSRIPTION.getSubscriptionType().equals(subscriptionId.substring(0, 2))
&& WebComponentUtil.isSubscriptionIdCorrect(subscriptionId));
}

protected String determineDataLanguage() {
AdminGuiConfigurationType config = loadAdminGuiConfiguration();
if (config.getPreferredDataLanguage() != null) {
Expand Down
Expand Up @@ -85,6 +85,10 @@ body {
border-top: 1px solid @gray-lte;
}

.main-footer-invisible {
padding: 15px 15px 0px 15px;
}

/* Fixed layout */
.fixed {
.main-header,
Expand Down

0 comments on commit 9e2d60e

Please sign in to comment.