Skip to content

Commit

Permalink
Fixed issue #10618: Unable to see whole content if survey title is big
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Mar 8, 2016
1 parent ea879fe commit 64d333c
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 21 deletions.
11 changes: 8 additions & 3 deletions templates/default/css/template.css
@@ -1,5 +1,6 @@
body {
padding-top: 50px;
body
{
/*padding-top: 50px; now define in JS to fit any title length */
padding-bottom: 10px;
}

Expand All @@ -20,7 +21,7 @@ div[id^="group-"]>div {

#topContainer {
position: absolute;
top: 55px;
/*top: 55px; now define in JS to fit any title length */
width: 100%;
padding: 1em;
border-bottom: none;
Expand Down Expand Up @@ -843,3 +844,7 @@ html body .navbar.navbar-default.navbar-fixed-top {
.gender-button .gender-icon {
font-size: 2em;
}

.navbar-brand {
height: auto;
}
9 changes: 8 additions & 1 deletion templates/default/scripts/template.js
Expand Up @@ -96,14 +96,21 @@ $(document).ready(function(){
}
}

var outerframeDistanceFromTop = 50;
//var outerframeDistanceFromTop = 50;
//topsurveymenubar
var topsurveymenubarHeight = $('#topsurveymenubar').innerHeight();
var outerframeDistanceFromTop = topsurveymenubarHeight;
// Manage top container
if(!$.trim($('#topContainer .container').html()))
{
$('#topContainer').hide();
}
else
{
$('#topContainer').css({
top: topsurveymenubarHeight+'px',
});

$topContainerHeight = $('#topContainer').height();
outerframeDistanceFromTop += $topContainerHeight;
}
Expand Down
4 changes: 2 additions & 2 deletions templates/default/views/startpage.pstpl
Expand Up @@ -14,7 +14,7 @@
</head>
<body class="default lang-{SURVEYLANGUAGE} {SURVEYFORMAT}">

<nav class="navbar navbar-default navbar-fixed-top">
<nav class="navbar navbar-default navbar-fixed-top" id="topsurveymenubar">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
Expand All @@ -23,7 +23,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">{SURVEYNAME}</a>
<a class="navbar-brand col-xs-8" href="#">{SURVEYNAME}</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
Expand Down
11 changes: 8 additions & 3 deletions templates/news_paper/css/template.css
@@ -1,5 +1,6 @@
body {
padding-top: 50px;
body
{
/*padding-top: 50px; now define in JS to fit any title length */
padding-bottom: 10px;
}

Expand All @@ -20,7 +21,7 @@ div[id^="group-"]>div {

#topContainer {
position: absolute;
top: 55px;
/*top: 55px; now define in JS to fit any title length */
width: 100%;
padding: 1em;
border-bottom: none;
Expand Down Expand Up @@ -843,3 +844,7 @@ html body .navbar.navbar-default.navbar-fixed-top {
.gender-button .gender-icon {
font-size: 2em;
}

.navbar-brand {
height: auto;
}
9 changes: 8 additions & 1 deletion templates/news_paper/scripts/template.js
Expand Up @@ -96,14 +96,21 @@ $(document).ready(function(){
}
}

var outerframeDistanceFromTop = 50;
//var outerframeDistanceFromTop = 50;
//topsurveymenubar
var topsurveymenubarHeight = $('#topsurveymenubar').innerHeight();
var outerframeDistanceFromTop = topsurveymenubarHeight;
// Manage top container
if(!$.trim($('#topContainer .container').html()))
{
$('#topContainer').hide();
}
else
{
$('#topContainer').css({
top: topsurveymenubarHeight+'px',
});

$topContainerHeight = $('#topContainer').height();
outerframeDistanceFromTop += $topContainerHeight;
}
Expand Down
4 changes: 2 additions & 2 deletions templates/news_paper/views/startpage.pstpl
Expand Up @@ -14,7 +14,7 @@
</head>
<body class="default lang-{SURVEYLANGUAGE} {SURVEYFORMAT}">

<nav class="navbar navbar-default navbar-fixed-top">
<nav class="navbar navbar-default navbar-fixed-top" id="topsurveymenubar">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
Expand All @@ -23,7 +23,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">{SURVEYNAME}</a>
<a class="navbar-brand col-xs-8" href="#">{SURVEYNAME}</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
Expand Down
11 changes: 8 additions & 3 deletions templates/ubuntu_orange/css/template.css
@@ -1,5 +1,6 @@
body {
padding-top: 50px;
body
{
/*padding-top: 50px; now define in JS to fit any title length */
padding-bottom: 10px;
}

Expand All @@ -20,7 +21,7 @@ div[id^="group-"]>div {

#topContainer {
position: absolute;
top: 55px;
/*top: 55px; now define in JS to fit any title length */
width: 100%;
padding: 1em;
border-bottom: none;
Expand Down Expand Up @@ -843,3 +844,7 @@ html body .navbar.navbar-default.navbar-fixed-top {
.gender-button .gender-icon {
font-size: 2em;
}

.navbar-brand {
height: auto;
}
4 changes: 1 addition & 3 deletions templates/ubuntu_orange/css/ubuntu_orange.css

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion templates/ubuntu_orange/scripts/template.js
Expand Up @@ -96,14 +96,21 @@ $(document).ready(function(){
}
}

var outerframeDistanceFromTop = 50;
//var outerframeDistanceFromTop = 50;
//topsurveymenubar
var topsurveymenubarHeight = $('#topsurveymenubar').innerHeight();
var outerframeDistanceFromTop = topsurveymenubarHeight;
// Manage top container
if(!$.trim($('#topContainer .container').html()))
{
$('#topContainer').hide();
}
else
{
$('#topContainer').css({
top: topsurveymenubarHeight+'px',
});

$topContainerHeight = $('#topContainer').height();
outerframeDistanceFromTop += $topContainerHeight;
}
Expand Down
4 changes: 2 additions & 2 deletions templates/ubuntu_orange/views/startpage.pstpl
Expand Up @@ -14,7 +14,7 @@
</head>
<body class="default lang-{SURVEYLANGUAGE} {SURVEYFORMAT}">

<nav class="navbar navbar-default navbar-fixed-top">
<nav class="navbar navbar-default navbar-fixed-top" id="topsurveymenubar">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
Expand All @@ -23,7 +23,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">{SURVEYNAME}</a>
<a class="navbar-brand col-xs-8" href="#">{SURVEYNAME}</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
Expand Down

1 comment on commit 64d333c

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternate system set fixed/absolute in js too :). (or use js/no-js)

Please sign in to comment.