Welcome to the LimeSurvey Community Forum

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

Dual Scale Array Removing Scale Headers

  • cheeseburger
  • cheeseburger's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 year 6 months ago #243336 by cheeseburger
Dual Scale Array Removing Scale Headers was created by cheeseburger
Please help us help you and fill where relevant:
Your LimeSurvey version: Version 6.0.6+230508
Own server or LimeSurvey hosting: Own server
Survey theme/template: Extending Vanilla
==================
Hi everyone, We are currently using a question of type "ARRAY DUAL SCALE (TYPE:1)". In the sidebar DISPLAY panel we include the headers for our two columns. On the desktop view these headers display correctly. In the mobile view they disappear. In earlier versions of LS they did not disappear and just are reflowed in the layout but in a logical manner. In the current version (see above) the reflow of content happens correctly but these two headers are no longer displaying. See below for reference (I also am attaching the LSS file with just this test question). Thanks for any help. If you happen to find it to be a bug, please post on our behalf since we still can't login to the bug tracker due to an outstanding issue that is being worked on with the bug tracker. Thank you!  





File Attachment:

File Name: dualSurveyHeader.lss
File Size:22 KB

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 6 months ago #243339 by tpartner
Replied by tpartner on topic Dual Scale Array Removing Scale Headers

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, cheeseburger

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 6 months ago #243340 by tpartner
Replied by tpartner on topic Dual Scale Array Removing Scale Headers
In the meantime, adding this script to the question source will fix the problem.

Code:
<script type="text/javascript" data-author="Tony Partner">
 
  $(document).on('ready pjax:scriptcomplete',function(){
 
        // Identify this question
        var thisQuestion = $('#question{QID}');
 
        // Insert scale header cells
    $('tbody th.answertext', thisQuestion).after('<td class="visible-xs leftheader information-item">'+$('.dsheader:eq(0)', thisQuestion).html()+'</td>');
    $('tbody td.dual_scale_separator', thisQuestion).after('<td class="visible-xs leftheader information-item">'+$('.dsheader:eq(1)', thisQuestion).html()+'</td>');
    });
</script>

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, cheeseburger

Please Log in to join the conversation.

More
5 months 5 days ago #265593 by zahlenzauber
Replied by zahlenzauber on topic Dual Scale Array Removing Scale Headers
Thanks to tpartner. Unfortunately, the script did not work as expected for us. We use LimeSurvey Version 6.5.14 with Fruity TwentyThree.

For us the following code added to custom.css did the trick (thanks to my colleague who doesn't want to read his name):


@media only screen and (max-width: 1024px) {
table.ls-answers, table.ls-answers thead, table.ls-answers tbody, table.ls-answers th, table.ls-answers td, table.ls-answers tr {
display: block;
}
table.ls-answers, table.ls-answers thead, table.ls-answers tbody, table.ls-answers th, table.ls-answers td, table.ls-answers tr {
text-align: left;
}
table.ls-answers thead {
display: none;
}
/* We don't need it for accessibility : we already have the label */
table.ls-answers tbody td {
text-align: left;
}
table.ls-answers .information-item:empty {
display: none;
}
.ls-answers td.checkbox-item {
padding: 4px;
}
.ls-answers td.checkbox-item {
padding-left: 24px;
padding-right: 4px;
}
table.ls-answers tbody .control-label {
text-align: left;
}
table.ls-answers .answertextright {
text-align: right;
}
/* Show the label */
table.ls-answers .ls-label-xs-visibility {
display: block;
position: relative;
width: auto;
height: auto;
overflow: initial;
white-space: normal;
}
table.ls-answers .ls-label-xs-visibility {
left: auto;
}
table.ls-answers .checkbox-item .ls-label-xs-visibility {
line-height: initial;
text-indent: initial;
}
table.ls-answers .checkbox-item .ls-label-xs-visibility {
margin-left: 0;
}
table.ls-answers .ls-label-xs-visibility > * {
position: relative;
top: auto;
width: auto;
height: auto;
overflow: auto;
}
table.ls-answers .ls-label-xs-visibility > * {
left: auto;
}
table.ls-answers .checkbox-item label.ls-label-xs-visibility::before {
margin-left: -20px;
}
table.ls-answers .checkbox-item label.ls-label-xs-visibility::after {
margin-left: -20px;
}
table.ls-answers > tbody > tr:hover {
background-color: transparent;
}
/* bs fix */
table.ls-answers td.visible-xs, table.ls-answers th.visible-xs {
display: block !important;
}
/* Don't display repeating header on mobile devices'*/
table.ls-answers tr.ls-heading-repeat {
display: none;
}
.d-md-none {
display: block !important;
}
}
@media only screen and (max-width: 760px), (min-device-width: 768px) and (max-device-width: 1024px) {

.d-md-none {
display: block !important;
}
}

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose