Skip to content

Commit

Permalink
Fixed issue #6030 : answeroption not left-aligned with multiple-opt-c…
Browse files Browse the repository at this point in the history
…omments

Dev : move input outside label
  • Loading branch information
Shnoulle committed May 4, 2012
1 parent ce88cf5 commit 10593e6
Show file tree
Hide file tree
Showing 15 changed files with 78 additions and 66 deletions.
6 changes: 3 additions & 3 deletions qanda.php
Expand Up @@ -2805,7 +2805,6 @@ function do_multiplechoice_withcomments($ia)
$answer_main .= $startitem;
$answer_main .= "\t$hiddenfield\n";
$answer_main .= "<span class=\"option\">\n"
. "\t<label for=\"answer$myfname\" class=\"answertext\">\n"
. "\t<input class=\"checkbox\" type=\"checkbox\" name=\"$myfname\" id=\"answer$myfname\" value=\"Y\"";

/* If the question has already been ticked, check the checkbox */
Expand All @@ -2818,6 +2817,7 @@ function do_multiplechoice_withcomments($ia)
}
$answer_main .=" onclick='cancelBubbleThis(event);$checkconditionFunction(this.value, this.name, this.type);' "
. " onchange='document.getElementById(\"answer$myfname2\").value=\"\";' />\n"
. "\t<label for=\"answer$myfname\" class=\"answertext\">\n"
. $ansrow['question']."</label>\n";

// if ($maxansw > 0) {$maxanswscript .= "\tif (document.getElementById('answer".$myfname."').checked) { count += 1; }\n";}
Expand All @@ -2830,12 +2830,12 @@ function do_multiplechoice_withcomments($ia)
}
$answer_main .= "' />\n";
$fn++;
$answer_main .= "</span>\n<span class=\"comment\">\n\t<label for='answer$myfname2' class=\"answer-comment\">\n"
$answer_main .= "</span>\n<span class=\"comment\">\n\t<label for='answer$myfname2' class=\"answer-comment hide\">".$clang->gT("Make a comment on your choice here:")."</label>\n"
."<input class='text ".$kpclass."' type='text' size='40' id='answer$myfname2' name='$myfname2' title='".$clang->gT("Make a comment on your choice here:")."' value='";
if (isset($_SESSION[$myfname2])) {$answer_main .= htmlspecialchars($_SESSION[$myfname2],ENT_QUOTES);}
// --> START NEW FEATURE - SAVE
// $answer_main .= "' onclick='cancelBubbleThis(event);' onchange='if (jQuery.trim($(\"#answer{$myfname2}\").val())!=\"\") { document.getElementById(\"answer{$myfname}\").checked=true;$checkconditionFunction(document.getElementById(\"answer{$myfname}\").value,\"$myfname\",\"checkbox\");}' onkeyup='".$callmaxanswscriptcheckbox2."(document.getElementById(\"answer{$myfname}\"))' />\n\t</label>\n</span>\n"
$answer_main .= "' onclick='cancelBubbleThis(event);' onchange='if (jQuery.trim($(\"#answer{$myfname2}\").val())!=\"\") { document.getElementById(\"answer{$myfname}\").checked=true;$checkconditionFunction(document.getElementById(\"answer{$myfname}\").value,\"$myfname\",\"checkbox\");}' />\n\t</label>\n</span>\n"
$answer_main .= "' onclick='cancelBubbleThis(event);' onchange='if (jQuery.trim($(\"#answer{$myfname2}\").val())!=\"\") { document.getElementById(\"answer{$myfname}\").checked=true;$checkconditionFunction(document.getElementById(\"answer{$myfname}\").value,\"$myfname\",\"checkbox\");}' />\n</span>\n"

. "\t</li>\n";
// --> END NEW FEATURE - SAVE
Expand Down
6 changes: 3 additions & 3 deletions templates/basic/ie_fix_6.css
Expand Up @@ -25,9 +25,9 @@
text-align: right;
}

.multiple-opt-comments ul li label {
.multiple-opt-comments ul li span.option {
float: left;
width: 35%;
width: 40%;
display: block;
margin: 0;
padding: 0;
Expand Down Expand Up @@ -134,4 +134,4 @@ input.submit {
position: absolute;
top: 17px;
left: 150px;
}
}
6 changes: 3 additions & 3 deletions templates/basic/ie_fix_7.css
Expand Up @@ -21,9 +21,9 @@
text-align: right;
}

.multiple-opt-comments ul li label {
.multiple-opt-comments ul li span.option {
float: left;
width: 35%;
width: 40%;
display: block;
margin: 0;
padding: 0;
Expand Down Expand Up @@ -108,4 +108,4 @@ input.submit {
.slider_righttext {
float: left;
padding-top: 1.4em;
}
}
17 changes: 10 additions & 7 deletions templates/basic/template.css
Expand Up @@ -571,25 +571,29 @@ ul.cols-8 li,ul.cols-8-ul,table.cols-8 td {
}

.list-with-comment p.comment {
margin: 0%;
margin: 0;
padding: 0.5em;
text-align: left;
float: left;
width: 47%;
display:block;
}
.list-with-comment p.comment label{
display:block;
}

/* DEFINED ABOVE UNDER "General list styles" - - - - -
.multiple-opt
*/
.multiple-opt .answer li input {
.multiple-opt .answer li input, .multiple-opt-comments .answer li .option input {
vertical-align: top !important;
margin-top: 2px;
margin-top: -2px\9; /* IE9 and below */
}

.multiple-opt .answer li label {
.multiple-opt .answer li label, .multiple-opt-comments .answer li .option label {
display: inline-block;
width: 90%;
width: 85%;
}

/* The following styles only apply to modern (relatively) complete CSS2 compliant browsers. (Not less than IE 8) */
Expand Down Expand Up @@ -623,8 +627,7 @@ ul.cols-8 li,ul.cols-8-ul,table.cols-8 td {
}

.multiple-opt-comments ul li span.option {
padding: 0.3em 1em 0% 1.8em;
text-indent: -1.7em;
padding: 0 0 0.5em 0.5em;
display: table-cell;
vertical-align: baseline;
}
Expand All @@ -648,7 +651,7 @@ ul.cols-8 li,ul.cols-8-ul,table.cols-8 td {

.multiple-opt-comments ul li span.comment,.multiple-short-txt ul li span,.numeric-multi ul li span
{
padding: 0.3em 0% 0% 1em;
padding: 0.3em 0 0 1em;
display: table-cell;
vertical-align: baseline;
white-space: nowrap;
Expand Down
14 changes: 6 additions & 8 deletions templates/bluengrey/template.css
Expand Up @@ -734,26 +734,26 @@ ul.cols-2-ul label,ul.cols-3-ul label,ul.cols-4-ul label,ul.cols-5-ul label,ul.c
/* DEFINED ABOVE UNDER "General list styles" - - - - -
.multiple-opt
*/
.multiple-opt .answers li input {
.multiple-opt .answers li input, .multiple-opt-comments .answers li .option input {
vertical-align: top !important;
margin-top: 2px;
}

.multiple-opt .answers li label {
.multiple-opt .answers li label, .multiple-opt-comments .answers li .option label {
display: inline-block;
width: 90%;
width: 85%;
}

/* The following styles only apply to modern (relatively) complete CSS2 compliant browsers. (Not less than IE 8) */
.multiple-opt-comments td.answer,.multiple-short-txt td.answer,.numeric-multi td.answer
.multiple-opt-comments td.answers,.multiple-short-txt td.answers,.numeric-multi td.answers
{

}

.multiple-opt-comments ul,.multiple-short-txt ul,.numeric-multi ul,.numeric-multi.slider ul
{
display: table;
padding: 0%;
padding: 0;
margin: 1em;
}

Expand Down Expand Up @@ -785,9 +785,7 @@ ul.cols-2-ul label,ul.cols-3-ul label,ul.cols-4-ul label,ul.cols-5-ul label,ul.c
}

.multiple-opt-comments ul li span.option {
padding: 0.3em 1em 0 1em;
padding-left:1.5em;padding-right:1em;
text-indent: -1.5em;
padding: 0 0 0.3em 0.5em;
display: table-cell;
vertical-align: baseline;
}
Expand Down
22 changes: 11 additions & 11 deletions templates/citronade/template.css
Expand Up @@ -661,13 +661,7 @@ table.question tbody td.ddarrayseparator{border-top-width: 0px;}
padding: 0 1em 0 0;
text-align:left;
}
.choice-5-pt-radio .answers-wrapper li
,.list-radio-flexible .answers-wrapper li
,.list-radio .answers-wrapper li
,.list-with-comment .answers-wrapper li
{
margin-right:0;margin-left: 3em;
}

@media screen and (max-width: 640px) {
.choice-5-pt-radio .answers-wrapper li
,.list-radio-flexible .answers-wrapper li
Expand Down Expand Up @@ -873,26 +867,32 @@ table.rank input{border:1px solid #999}
padding-right:0;padding-left:35%;
}
.multiple-opt .answers-wrapper ul li label
, .multiple-opt-comments .answers-wrapper ul li label
, .list-radio .answers-wrapper ul li label
, .list-radio-flexible .answers-wrapper ul li label
, .list-with-comment .answers-wrapper ul li label
{
display:inline-block;vertical-align: middle;
}

.multiple-opt-comments .answers-wrapper ul li .option
, .list-with-comment .answers-wrapper ul li
{
padding-left:30px;
}

.multiple-opt .answers-wrapper ul li input.checkbox
, .multiple-opt-comments .answers-wrapper ul li input.checkbox
, .list-radio .answers-wrapper ul li input.radio
, .list-radio-flexible .answers-wrapper ul li input.radio
, .list-with-comment .answers-wrapper ul li input.radio
{
margin-left:-30px;vertical-align: middle;
}
.multiple-opt-comments .answers-wrapper ul li input.checkbox
{
/*margin-left:-30px;vertical-align: middle;*//* DON'T WORK */
}

@media screen and (max-width: 640px) {
.multiple-opt .answers-wrapper ul li
.multiple-opt-comments .answers-wrapper ul li
, .list-radio .answers-wrapper ul li
, .list-with-comment .answers-wrapper ul li
, .list-radio-flexible .answers-wrapper ul li
Expand Down
4 changes: 2 additions & 2 deletions templates/clear_logo/template.css
Expand Up @@ -600,13 +600,13 @@ ul.cols-8 li,ul.cols-8-ul,table.cols-8 td {
/* DEFINED ABOVE UNDER "General list styles" - - - - -
.multiple-opt
*/
.multiple-opt .answer li input {
.multiple-opt .answer li input, .multiple-opt-comments .answer li .option input {
vertical-align: top !important;
margin-top: 2px;
margin-top: -2px\9; /* IE9 and below */
}

.multiple-opt .answer li label {
.multiple-opt .answer li label, .multiple-opt-comments .answer li .option label {
display: inline-block;
width: 90%;
}
Expand Down
6 changes: 3 additions & 3 deletions templates/default/ie_fix_6.css
Expand Up @@ -25,9 +25,9 @@
text-align: right;
}

.multiple-opt-comments ul li label {
.multiple-opt-comments ul li span.option {
float: left;
width: 35%;
width: 40%;
display: block;
margin: 0;
padding: 0;
Expand Down Expand Up @@ -136,4 +136,4 @@ input.submit {
position: absolute;
top: 15px;
left: 150px;
}
}
6 changes: 3 additions & 3 deletions templates/default/ie_fix_7.css
Expand Up @@ -25,9 +25,9 @@
text-align: right;
}

.multiple-opt-comments ul li label {
.multiple-opt-comments ul li span.option {
float: left;
width: 35%;
width: 40%;
display: block;
margin: 0;
padding: 0;
Expand Down Expand Up @@ -116,4 +116,4 @@ input.submit {
.slider_righttext {
float: left;
padding-top: 1.4em;
}
}
6 changes: 3 additions & 3 deletions templates/default/template.css
Expand Up @@ -811,15 +811,15 @@ ul.cols-8 li,ul.cols-8-ul,table.cols-8 td {
/* DEFINED ABOVE UNDER "General list styles" - - - - -
.multiple-opt
*/
.multiple-opt .answer li input {
.multiple-opt .answer li input, .multiple-opt-comments .answer li .option input {
vertical-align: top !important;
margin-top: 2px;
*margin-top: -2px; /* IE7 and below */
}

.multiple-opt .answer li label {
.multiple-opt .answer li label, .multiple-opt-comments .answer li .option label {
display: inline-block;
width: 90%;
width: 85%;
}

/* The following styles only apply to modern (relatively) complete CSS2 compliant browsers. (Not less than IE 8) */
Expand Down
7 changes: 3 additions & 4 deletions templates/eirenicon/template.css
Expand Up @@ -704,13 +704,13 @@ table.rank td.helptext {
/* DEFINED ABOVE UNDER "General list styles" - - - - -
.multiple-opt
*/
.multiple-opt .question-answer li input {
.multiple-opt .question-answer li input, .multiple-opt-comments .question-answer li .option input {
vertical-align: top !important;
margin-top: 1px;
margin-top: -3px\9; /* IE9 and below */
}

.multiple-opt .question-answer li label {
.multiple-opt .question-answer li label, .multiple-opt-comments .question-answer li .option label {
display: inline-block;
width: 90%;
}
Expand Down Expand Up @@ -746,8 +746,7 @@ table.rank td.helptext {
}

.multiple-opt-comments ul li span.option {
padding: 0.3em 1em 0 2.3em;
text-indent: -2.3em;
padding: 0 0 0.5em 0.5em;
display: table-cell;
vertical-align: baseline;
}
Expand Down
7 changes: 3 additions & 4 deletions templates/limespired/template.css
Expand Up @@ -782,13 +782,13 @@ ul.cols-8 li,ul.cols-8-ul,table.cols-8 td {
/* DEFINED ABOVE UNDER "General list styles" - - - - -
.multiple-opt
*/
.multiple-opt .survey-question-answer li input {
.multiple-opt .survey-question-answer li input, .multiple-opt-comments .survey-question-answer li .option input {
vertical-align: top !important;
margin-top: 2px;
margin-top: -1px\9; /* IE9 and below */
}

.multiple-opt .survey-question-answer li label {
.multiple-opt .survey-question-answer li label, .multiple-opt-comments .survey-question-answer li .option label {
display: inline-block;
width: 90%;
}
Expand Down Expand Up @@ -824,8 +824,7 @@ ul.cols-8 li,ul.cols-8-ul,table.cols-8 td {
}

.multiple-opt-comments ul li span.option {
padding: 0.3em 1em 0 2em;
text-indent: -1.5em;
padding: 0 0 0.5em 0.5em;
display: table-cell;
vertical-align: baseline;
}
Expand Down
15 changes: 11 additions & 4 deletions templates/mint_idea/template.css
Expand Up @@ -843,16 +843,19 @@ table.rank td.helptext {
/* DEFINED ABOVE UNDER "General list styles" - - - - -
.multiple-opt
*/
.multiple-opt .survey-question-answer li input {
.multiple-opt .survey-question-answer li input, .multiple-opt-comments .survey-question-answer li .option input {
vertical-align: top !important;
margin-top: 5px;
*margin-top: 2px; /* IE7and below */
}

.multiple-opt .survey-question-answer li label {
.multiple-opt .survey-question-answer li label, .multiple-opt-comments .survey-question-answer li .option label {
display: inline-block;
width: 90%;
}
.multiple-opt-comments .survey-question-answer li .option label {
width: 85%;
}

/* The following styles only apply to modern (relatively) complete CSS2 compliant browsers. (Not less than IE 8) */
.multiple-opt-comments td.answer,.multiple-short-txt td.answer,.numeric-multi td.answer
Expand Down Expand Up @@ -885,8 +888,7 @@ table.rank td.helptext {
}

.multiple-opt-comments ul li span.option {
padding: 0.3em 1em 0 1.8em;
text-indent: -1.8em;
padding: 0 0 0.5em 0.5em;
display: table-cell;
vertical-align: baseline;
}
Expand Down Expand Up @@ -916,6 +918,11 @@ table.rank td.helptext {
white-space: nowrap;
}

.multiple-opt-comments ul li span.comment,.multiple-short-txt ul li span,.numeric-multi ul li span
{
vertical-align: top;
}

.multiple-opt-comments ul li span {
padding: 0.3em 1em 0 0;
}
Expand Down

0 comments on commit 10593e6

Please sign in to comment.