Mistake in Basic Template

More
3 years 3 months ago #116761 by boriginal
boriginal created the topic: Mistake in Basic Template
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.

Please Log in or Create an account to join the conversation.

More
3 years 3 months ago #116765 by holch
holch replied the 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'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

More
3 years 3 months ago #116994 by boriginal
boriginal replied the 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!

Please Log in or Create an account to join the conversation.

More
3 years 3 months ago #116999 by holch
holch replied the 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'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

More
3 years 3 months ago #117014 by DenisChenu
DenisChenu replied the topic: Mistake in Basic Template
It's a really awfull javascript in /scripts/expressions/em_javascript.js
updateColors($('#question460').find('table.question'));
updateHeadings($('#question460').find('table.question'), 25);
// 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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: boriginal

Please Log in or Create an account to join the conversation.

More
3 years 3 weeks ago #119688 by boriginal
boriginal replied the 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?

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!