Welcome to the LimeSurvey Community Forum

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

Mistake in Basic Template

  • Ryuniri_44052
  • Ryuniri_44052's Avatar Topic Author
  • Offline
  • Banned
  • Banned
More
9 years 1 month ago #116761 by Ryuniri_44052
Mistake in Basic Template was created by Ryuniri_44052
Hey,

I recogniced a mistake in the basic template, that I can't fix by my one. The problem always araises when I am using matrix filters (as explained here: manual.limesurvey.org/QS:Array_filter/de - the problem also araises in using the downloadable example from that site and the basic template).

Filters are working fine, but the filtered answers seem to jump up one table, or sumething (in the structure). So that they are displeyed in the grey question area. In addition or as a result, the mouse-over-effects on answers are not working properly.

Main question: Do you know what I have to change to fix this? I think the filter is developed in java - but the template is only interpretating the java-variable wrong. Do you know in which file I need to change something? Would be great if you also know the line... (or area). It is in tr-class "array1" or "array2", but of course I can't find that classes in the css-file or template editor.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 1 month ago #116765 by holch
Replied by holch on topic Mistake in Basic Template
Can you activate a survey for us to have a look at? (Ideally with just this specific question)

By the way, did you empty your cache? This is often a solution for problems like this.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • Ryuniri_44052
  • Ryuniri_44052's Avatar Topic Author
  • Offline
  • Banned
  • Banned
More
9 years 1 month ago #116994 by Ryuniri_44052
Replied by Ryuniri_44052 on topic Mistake in Basic Template
Thank you for your promt reply!

I tried it with deleting my cache - without any success.

Here is the link: www.sedlak-partner.com/survey/index.php/12175/lang-en

On first page you can choose products that automatically will be displayed as answering options for a second question (pops up after checking one of the given products). The problem arraises in this second question-area. The answering options seem to be not correctly located. This only happens to those "related" questions. The mouse-over-effekt for example is always for all answering options - but only one answering option should be highlighted, as it is if you have a multiple choice question without related elements.

Thank you for your help!
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 1 month ago #116999 by holch
Replied by holch on topic Mistake in Basic Template
I tried to rebuilt an example like yours and the same behaviour appears. As soon as the array filter is taken out, the background of the answer options is white again.

Strange. Has to do with the array filter. I have no idea what causes this.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 1 month ago #117014 by DenisChenu
Replied by DenisChenu on topic Mistake in Basic Template
It's a really awfull javascript in /scripts/expressions/em_javascript.js
Code:
updateColors($('#question460').find('table.question'));
updateHeadings($('#question460').find('table.question'), 25);
Code:
// updates the colors in a dynamic table
function updateColors(tab)
{
    var trs = tab.find('tr:visible');
    trs.each(function(i, tr)
    {
        // fix line colors
        $(tr).removeClass('array1').removeClass('array2').addClass('array' + (1 + i % 2));
    });
}
:sick:

Here the basic template have question class for "question wrapper" table. Change it to another class and review the css to fix it.
After a pull request on our git are welcome :)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: Ryuniri_44052
The topic has been locked.
  • Ryuniri_44052
  • Ryuniri_44052's Avatar Topic Author
  • Offline
  • Banned
  • Banned
More
8 years 10 months ago #119688 by Ryuniri_44052
Replied by Ryuniri_44052 on topic Mistake in Basic Template
Hey Denis,

I feel a little bit sorry - because you helped me with my other issue today, this topic comes relevant again.

As you may recognize: my english is not the best and my knowledge about javascript is even worther. I don't understand how to understand you latest post on this topic.

Does your script examples show the "mistake" or the sulotion?
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose