Welcome to the LimeSurvey Community Forum

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

UNBOLD Inserted Header (array)

  • boshra.m
  • boshra.m's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
2 years 9 months ago #227742 by boshra.m
UNBOLD Inserted Header (array) was created by boshra.m
Please help us help you and fill where relevant: 
Your LimeSurvey version: LimeSurvey Cloud Version 5.3.11
Own server or LimeSurvey hosting: LimeSurvey hosting
Survey theme/template: Fruity
==================
Hello,

If I wanted to UNBOLD the inserted header my array question, how would I go about doing this? I have currently attempted using:.fruity .ls-answers .ls-insertedheader th {
    font-weight: 400;
in my custom.css however this did not change anything.

Thank you so much.

 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 9 months ago #227744 by Joffm
Replied by Joffm on topic UNBOLD Inserted Header (array)
As this header is inserted by some javascript you should show it.
We have to know which css class is used.
I am rather sure that the class is not named "insertedheader".

Did you use something like this?
Code:
$(document).on('ready pjax:scriptcomplete',function(){
// Insert the column categories
$('#question{QID} table.subquestion-list thead tr:eq(0) td:eq(0)').remove();
$('#question{QID} table.subquestion-list thead').prepend('<tr class="ls-heading">\
<td rowspan="2" colspan="2"></td>\
<th class="answer-text inserted-header" colspan="3">Category 1</th>\
<th class="answer-text inserted-header" colspan="3">Category 2</th>\
</tr>');
Or something else?

But why do you insert something here? Isn't this sufficient?
To force the number into the next line insert a "<br/>"  (not at all<br/>1)

 
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • boshra.m
  • boshra.m's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
2 years 9 months ago #227747 by boshra.m
Replied by boshra.m on topic UNBOLD Inserted Header (array)
Hi Joffm,

This is what it looks like: 

// Define the new row
        var insertedRow = '<tr>\
            <td></td>\
            <th colspan="1" class="text-center"><span style="font-size:17px;"><strong>Not at all</th>\
             <th colspan="1" class="text-center"><span style="font-size:17px;"><strong></th>\
            <th colspan="1" class="text-center"><span style="font-size:17px;"><strong></th>\
            <th colspan="1" class="text-center"><span style="font-size:17px;"><strong></th>\
            <th colspan="1" class="text-center"><span style="font-size:17px;"><strong>Completely</th>\
        </tr>';
 
        // Insert the new row before all header rows
        $('table.subquestion-list tr.ls-heading', thisQuestion).before(insertedRow);
 
    });
</script>

Does this help?

Also I am going over a coworkers work which is why I haven't elected to use the "<br/>" - but this is a good idea that I will bring up also.

Thank you.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 9 months ago #227748 by Joffm
Replied by Joffm on topic UNBOLD Inserted Header (array)
Hi,
if you use a script similar to this.
Code:
<script type="text/javascript" charset="utf-8">
$(document).on('ready pjax:scriptcomplete',function(){
    // Insert the column categories
    $('#question{QID} table.subquestion-list thead tr:eq(0) td:eq(0)').remove();
    $('#question{QID} table.subquestion-list thead').prepend('<tr class="ls-heading">\
      <td rowspan="2" colspan="1" style="border-top:0 !important;"></td>\
      <th class="answer-text inserted-header" colspan="1">not at all</th>\
      <th class="answer-text inserted-header" colspan="1"></th>\
      <th class="answer-text inserted-header" colspan="1"></th>\
      <th class="answer-text inserted-header" colspan="1"></th>\
      <th class="answer-text inserted-header" colspan="1">completely</th>\
    </tr>');
    });    
</script>

I see no issue with this css
Code:
.fruity .ls-answers .ls-heading th {
    font-weight: 400;
    color:red;  // only to show the effect
}

 

Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: boshra.m

Please Log in to join the conversation.

  • boshra.m
  • boshra.m's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
2 years 9 months ago #227751 by boshra.m
Replied by boshra.m on topic UNBOLD Inserted Header (array)
Awesome, thank you!

Please Log in to join the conversation.

Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose