Skip to content

Commit

Permalink
Merge branch 'toolsforresearch-iss025' into answers_html
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnoulle committed Sep 10, 2016
2 parents c463555 + 004fc3a commit 54ae538
Show file tree
Hide file tree
Showing 10 changed files with 108 additions and 158 deletions.
Expand Up @@ -22,7 +22,7 @@
<!-- answer_row -->
<tr id="javatbd<?php echo $myfname;?>" class="row-inc-same-dec well answers-list radio-list array<?php echo $zebra; ?><?php if($error){ echo " bg-warning";} ?>" <?php echo $sDisplayStyle; ?> role="radiogroup" aria-labelledby="answertext<?php echo $myfname;?>">
<!-- Answer text / Errors -->
<th class="answertext text-center<?php if($error):?> text-danger<?php endif;?>">
<th class="answertext<?php if($error):?> text-danger<?php endif;?>">
<div id="answertext<?php echo $myfname;?>"><?php echo $answertext;?></div>
<input type="hidden" name="java<?php echo $myfname;?>" id="java<?php echo $myfname;?>" value="<?php echo $value;?>" />
</th>
Expand Down
2 changes: 1 addition & 1 deletion application/views/survey/questions/yesno/buttons/item.php
Expand Up @@ -12,7 +12,7 @@
*/
?>

<div class="list-unstyled answers-list radio-list">
<div class="list-unstyled answers-list radio-list row">

<div class='col-xs-12 col-sm-6'> <!-- Full width on Phone; otherwise half width -->
<div class="btn-group btn-group-justified" data-toggle="buttons" id="<?php echo $name;?>-container">
Expand Down
8 changes: 4 additions & 4 deletions templates/default/css/flat_and_modern.css
Expand Up @@ -7073,22 +7073,22 @@ a.list-group-item-danger.active:focus {


/** Header **/
.question-title-container, .questionvalidcontainer {
.question-title-container, .question-valid-container {
background-color: #233140;
}



.questionvalidcontainer .text-danger{
.question-valid-container .text-danger{
color: #E75041;
}

.questionvalidcontainer .text-info{
.question-valid-container .text-info{
color: #B9CC14;
}

/* Arrow */
.questionvalidcontainer:after {
.question-valid-container:after {
border-top-color: #233140;
}

Expand Down
99 changes: 41 additions & 58 deletions templates/default/css/template.css
Expand Up @@ -11,13 +11,18 @@
padding: 0;
}
div[id^="group-"]>div {
background-color: #fff;
margin-bottom: 1em;
//background-color: #fff;
//margin-bottom: 1em;
}

div[id^="group-"]>div.group-container {
background-color: transparent;
}

.group-title-container {
padding: 1em;
background:transparent;
}

.language-changer {
background-color: #fff;
Expand All @@ -30,11 +35,14 @@ div[id^="group-"]>div {
width: 100%;
padding: 1em;
border-bottom: none;
background-color: #ecf0f1;
color: inherit;
margin-bottom: 30px;
}

.progress {
height: 21px;
margin-bottom: 0px;
margin-bottom: 1em;
}

#surveynametitle {
Expand All @@ -46,10 +54,6 @@ div[id^="group-"]>div {
text-align: center;
}

.group-name {

}

#surveydescription, .group-name {
color: #2c3e50;
}
Expand All @@ -74,9 +78,6 @@ div[id^="group-"]>div {
margin-top: 1em;
}

.row {
}

.col-centered{
float: none;
margin: 0 auto;
Expand Down Expand Up @@ -216,12 +217,9 @@ li.responsive-content
margin-bottom: 30px;
}






#indexcontainer {display : none;}
#indexcontainer {
display : none;
}

.radio-list li
{
Expand Down Expand Up @@ -345,10 +343,7 @@ table {
width: 100%;
}

/* Give help text some space */
.question-help {
margin-top: 1em;
}


/* Wrap text in e.g. gender button "No answer */
.wrap-normal {
Expand Down Expand Up @@ -534,12 +529,6 @@ table.array-no-dropdown td.answer-item.text-center
display: inline-block !important;
}

/* Remove margin */
.row {
margin: 0;
padding: 0;
}

/* Add some margin for multiple short text */
.form-group.row {
margin-bottom: 15px;
Expand Down Expand Up @@ -871,54 +860,48 @@ table.numbers-only th, table.numbers-only input {
}




/** Question Design **/

body div.row .question-container {
margin-bottom: 2em;
.question-wrapper {
margin-bottom: 2em;
background:white;
}

.answer-container, .question-help-container
{
border-style: solid;
.question-title-container {
color: white;
padding-top:2em;
padding-bottom:1em;
}

.answer-container
{
border-width: 0px 1px 0px 1px;
padding-top: 3em;
background-color: white;
.question-valid-container {
position: relative;
text-align: center;
padding-bottom: 1em;
}

.question-help-container
{
border-width: 0px 1px 1px 1px;
padding-bottom: 5px;
.question-valid-container .text-danger{
font-weight: bold;
}


/** Header **/

.question-title-container {
color: white;
padding: 2em 1em 1em 1em;

.question-valid-container .text-info{
font-weight: bold;
}

.questionvalidcontainer {
position: relative;
text-align: center;
padding-bottom: 1em;
.answer-container {
border-width: 0px 1px 0px 1px;
border-style: solid;
padding-top: 3em;
padding-bottom:1.5em;
}

.questionvalidcontainer .text-danger{
font-weight: bold;
.question-help-container {
border-width: 0px 1px 1px 1px;
border-style: solid;
}

.questionvalidcontainer .text-info{
color: #B9CC14;
font-weight: bold;
/* Give help text some space */
.questionhelp {
padding-bottom:0.5em;
}

/* Arrow */
Expand Down
39 changes: 17 additions & 22 deletions templates/default/scripts/template.js
Expand Up @@ -84,9 +84,6 @@ function replaceColumnWithDiv(that) {
$(that).replaceWith(newHtml);
}




$(document).ready(function()
{

Expand All @@ -102,21 +99,20 @@ $(document).ready(function()
});
}


// Make the label clickable
$('.label-clickable').each(function(){
var $that = $(this);
var attrId = $that.attr('id');
if(attrId!=undefined){
attrId = attrId.replace("label-", "");
} else {
attrId = "";
}
var $inputEl = $("#"+attrId);
$that.on('click', function(){
console.log($inputEl.attr('id'));
$inputEl.trigger( "click" );
});
var $that = $(this);
var attrId = $that.attr('id');
if(attrId!=undefined){
attrId = attrId.replace("label-", "");
} else {
attrId = "";
}
var $inputEl = $("#"+attrId);
$that.on('click', function(){
console.log($inputEl.attr('id'));
$inputEl.trigger( "click" );
});
});

$('.if-no-js').hide();
Expand All @@ -125,12 +121,11 @@ $(document).ready(function()
// It's OK to keep tables on pads.
if($(window).width() < 768 && 1===2)
{
// Brutally remake the array-by-columns question type to divs,
// because you can't wrap table columns
$('.array-by-columns-table').each(function() {
replaceColumnWithDiv(this);
});

// Brutally remake the array-by-columns question type to divs,
// because you can't wrap table columns
$('.array-by-columns-table').each(function() {
replaceColumnWithDiv(this);
});
}

//var outerframeDistanceFromTop = 50;
Expand Down
6 changes: 1 addition & 5 deletions templates/default/views/groupdescription.pstpl
@@ -1,8 +1,4 @@
<!-- Group description -->
<div class="group-description-container">
<div class='col-xs-12'>
<div class="group-description jumbotron">
{GROUPDESCRIPTION}
</div>
</div>
<span class="group-description">{GROUPDESCRIPTION}</span>
</div>
55 changes: 24 additions & 31 deletions templates/default/views/question.pstpl
@@ -1,37 +1,30 @@
<!-- Question -->
<div {QUESTION_ESSENTIALS} class="{QUESTION_CLASS}{QUESTION_MAN_CLASS}{QUESTION_INPUT_ERROR_CLASS} col-xs-12 question-container">
<div {QUESTION_ESSENTIALS} class="{QUESTION_CLASS}{QUESTION_MAN_CLASS}{QUESTION_INPUT_ERROR_CLASS} question-wrapper clearfix">

<!-- Question title -->
<div class="row question-title-container">
<div class="col-sm-12 questiontext">
<div class="qnumcode question-text">
{QUESTION_MANDATORY}{QUESTION_NUMBER} {QUESTION_CODE}{QUESTION_TEXT}
</div>

</div>
</div>

<!-- Question valid message -->
<div class="row">
<div class="col-sm-12 questionvalidcontainer">
{QUESTION_VALID_MESSAGE}
{QUESTION_MAN_MESSAGE}
{QUESTION_FILE_VALID_MESSAGE}
</div>
</div>
<!-- Question text -->
<div class="question-title-container col-sm-12">
<span class="question-mandatory">{QUESTION_MANDATORY}</span>
<span class="question-number">{QUESTION_NUMBER}</span>
<span class="question-code">{QUESTION_CODE}</span>
<span class="question-text">{QUESTION_TEXT}</span>
</div>

<!-- LimeSurvey valid message and help -->
<div class="question-valid-container col-sm-12">
<span class="question-valid-message">{QUESTION_VALID_MESSAGE}</span>
<span class="question-man-message">{QUESTION_MAN_MESSAGE}</span>
<span class="question-file-valid-message">{QUESTION_FILE_VALID_MESSAGE}</span>
</div>

<!-- Answer -->
<div class="row answer-container">
<div class="col-sm-12 answer">
{ANSWER}
</div>
</div>
<!-- Answer -->
<div class="answer-container col-sm-12">
<div class="answer">
{ANSWER}
</div>
</div>

<!-- Question help -->
<div class="row question-help-container">
<div class="col-sm-12 question-help">
{QUESTIONHELP}
</div>
</div>
<!-- Survey question help -->
<div class="question-help-container col-sm-12">
{QUESTIONHELP}
</div>
</div>
4 changes: 2 additions & 2 deletions templates/default/views/startgroup.pstpl
@@ -1,4 +1,4 @@
<!-- Start group -->
<div class="col-xs-12 group-container">
<h3 class="group-name">{GROUPNAME}</h3>
<div class="group-title-container">
<h3 class="group-title">{GROUPNAME}</h3>
</div>
23 changes: 10 additions & 13 deletions templates/default/views/startpage.pstpl
Expand Up @@ -38,22 +38,19 @@
</div>
</nav>


<!-- Top container -->
<div id="topContainer" class="jumbotron">
<div class="container">
{PERCENTCOMPLETE}
{LANGUAGECHANGER}
</div>
<div id="topContainer">
<div class="container">
{PERCENTCOMPLETE}
{LANGUAGECHANGER}
</div>
</div>

<div class="outerframe container" id="outerframeContainer">
<div class="row" id="main-row">
<div class='col-xs-12' id="yii-flash-message">
{FLASHMESSAGE}
</div>

<div class="row" id="main-row">

<div class='col-xs-12' id="yii-flash-message">
{FLASHMESSAGE}
</div>

<div class="col-sm-12 col-centered" id="main-col">
<div class="col-sm-12 col-centered" id="main-col">
<!-- end of startpage.pstl -->

0 comments on commit 54ae538

Please sign in to comment.