Skip to content

Commit

Permalink
Fixed issue : endless javascript loop in answer edit or subquestion edit
Browse files Browse the repository at this point in the history
Dev : actually getnextcode return source if source is an only text. Maybe another solution
  • Loading branch information
Shnoulle committed May 15, 2012
1 parent 8179fcd commit 9d6c027
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/admin/answers.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function addinput()
languages=langs.split(';');

sNextCode=getNextCode($(this).parent().parent().find('.code').val());
while ($(this).parent().parent().parent().find('input[value="'+sNextCode+'"]').length>0)
while ($(this).parent().parent().parent().find('input[value="'+sNextCode+'"]').length>0 && sNextCode!=$(this).parent().parent().find('.code').val())
{
sNextCode=getNextCode(sNextCode);
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/admin/subquestions.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function addinput()


sNextCode=getNextCode($(this).parent().parent().find('.code').val());
while ($(this).parent().parent().parent().find('input[value="'+sNextCode+'"]').length>0)
while ($(this).parent().parent().parent().find('input[value="'+sNextCode+'"]').length>0 && nextcode!=$(this).parent().parent().find('.code').val())
{
sNextCode=getNextCode(sNextCode);
}
Expand Down

0 comments on commit 9d6c027

Please sign in to comment.