Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed issue #13712: Exclusive option does not exclude others
- Loading branch information
Showing
1 changed file
with
16 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74eaf56
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we attach the event to the line (
$("[id^='question']").on('relevance:off',"[id^='javatbd']"
) why need an each ?And in 2.73 and before, if user click on exclusive option : it doens't uncheck other checkbox : because when uncheck exclusive option : have their checkbox checked like before. I'm sure we have a bug about this asking to "don't uncheck other checkbox with exclusive option".
Em find value of a checkbox with relevanceStatus + current state, if relevanceStatus is 0 : return false.
74eaf56
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need an each, because there is as well the comment input as also the checkbox input inside of the question container.
I wasn't aware, that the exclusive option shouldn't uncheck the other options. I will fix that.
74eaf56
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can just send the
trigger('change');
event, this launch EM. But : with 50 sub question : we launch EM 50 times in one click :/74eaf56
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you trigger change on the element you have an infinite trigger loop. I tested that.
74eaf56
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes,
I know :
trigger only on the input, not on the line of the subquestion :), no ? (didn't test)
About checkbox : array have exclusive-option too