Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Static footer on welcome page hides the next button

  • HeikoTietze
  • HeikoTietze's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 10 months ago #155417 by HeikoTietze
I prepared a template based on "default" with a footer that contains legal stuff and the org logo.
Code:
<nav class="navbar navbar-default navbar-fixed-bottom" id="bottomsurveymenubar">
    <div id="footer" style="color:white; font-size: 75%; padding: 1em;">
        <img src="{TEMPLATEURL}/files/libreoffice.png" height="50" style="float: left; margin: 0 20px 20px 0;"> Text...
    </div>
</nav>

Looks nice on my screen but on mobiles the next button isn't available anymore as it is hidden behind this navbar. An example with a planned survey is here: survey.documentfoundation.org/492228?newtest=Y&lang=en

What can I do?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 10 months ago #155419 by tpartner
Where did you insert that? It seems to me that it should be in endpage.pstpl, right before the Bootstrap alert element.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • HeikoTietze
  • HeikoTietze's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 10 months ago #155421 by HeikoTietze
Replied by HeikoTietze on topic Static footer on welcome page hides the next button
It was at the end of welcome.pstpl but when I move it to endpage.pstpl just before <div id="bootstrap-alert-box-modal" class="modal fade"> nothing changes for the Next button, except that the footer is now on all pages (the referenced survey is updated to this now).
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 10 months ago #155423 by tpartner
Okay, I didn't realize you only want it on the welcome screen.

It needs to be after the survey outer-frame so I would leave it in endpage.pstpl and use JavaScript and CSS to only show it in the welcome screen.

Add this script into the source of the welcome message - it will add a class to the <body> element in that screen that we can target with CSS:
Code:
<script type="text/javascript" charset="utf-8">
  $(document).ready(function() {
    $('body').addClass('welcome'); 
  });
</script>

Add this to the end of template.css - it will remove the fixed positioning of the footer so stuff doesn't flow behind it and hide it on all screens except the welcome:
Code:
#bottomsurveymenubar{
  display:none;
  position: relative;
}
 
body.welcome #bottomsurveymenubar {
  display:block;
}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 10 months ago #155424 by DenisChenu
Hi,

Great documentfondation use limesurvey :).

Here, i think best is to deactivate fixed position of the footer for phone.

Simplest way seems to be
Code:
.outerframeContainer{padding-bottom: 150px}
@media (min-width: 768px) {
  .navbar-fixed-bottom {position: relative;  }
  .outerframeContainer{padding-bottom: 14px}
}

It's what i do in a lot of system absolute position for desktop (with a padding) and relative for

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 10 months ago #155427 by tpartner
My styles do disable the fixed positioning.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • HeikoTietze
  • HeikoTietze's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 10 months ago #155428 by HeikoTietze
Replied by HeikoTietze on topic Static footer on welcome page hides the next button
>Add this script into the source of the welcome message...

I guess you talk about the variable field, which implies I'd have to add the code with every survey. And have to place some pieces of code around the quite complex templates where I never find them again. Would try a simpler solution first, either DenisChenu's idea (when I understand where to place this snippet) or maybe also to have this panel at the top on the first page.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 10 months ago #155430 by tpartner

I guess you talk about the variable field, which implies I'd have to add the code with every survey.

To apply it to all surveys, you can place this in template.js.

Code:
$(document).ready(function() {
  if($('#welcome-container').length > 0) {
    $('body').addClass('welcome'); 
  }
});

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: HeikoTietze
The topic has been locked.
  • HeikoTietze
  • HeikoTietze's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 10 months ago #155432 by HeikoTietze
Replied by HeikoTietze on topic Static footer on welcome page hides the next button
Works like a charm :-)
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 10 months ago #155435 by tpartner
Happy to help, and I agree with Denis - it's great to see LibreOffice using LimeSurvey.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 10 months ago - 6 years 10 months ago #155517 by holch
In my opinion Open Source projects should try to use as much as open source software as possible. But unfortunately I see so many projects that rather go for the Monkeys...

So it is great to see LibreOffice using LS!

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Last edit: 6 years 10 months ago by holch.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose