Skip to content

Commit

Permalink
Fixed issue #08576: Question-Type Ranking hangs up
Browse files Browse the repository at this point in the history
Dev: Limit firing of checkconditions() function
  • Loading branch information
tpartner committed Jan 23, 2014
1 parent 8b53115 commit f4d5b50
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scripts/ranking.js
Expand Up @@ -119,10 +119,12 @@ function updateDragDropRank(qID){
});
// Update #relevance and lauch checkconditions function
$("[id^=" + relevancename + "]").val('0');
$('#question'+qID+' .select-item select').each(function(index){
number=index+1;
if($(this).val()!=""){$("#"+relevancename+number).val("1");}
checkconditions($(this).val(),$(this).attr("name"),'select-one','onchange');
$('#question'+qID+' .select-item select:lt('+maxanswers+')').each(function(index){
number=index+1;
if($(this).val()!=""){
$("#"+relevancename+number).val("1");
}
checkconditions($(this).val(),$(this).attr("name"),'select-one','onchange');
});
$('#sortable-rank-'+qID+' li').removeClass("error");
$('#sortable-choice-'+qID+' li').removeClass("error");
Expand Down

1 comment on commit f4d5b50

@c-schmitz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one :-)

Please sign in to comment.