Skip to content

Commit

Permalink
Fixed issue #4693: Ranking text box size is reduced when re-entered v…
Browse files Browse the repository at this point in the history
…ia the Previous/Next button and all items were ranked

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@9328 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Oct 24, 2010
1 parent be103fe commit 7d547b4
Showing 1 changed file with 5 additions and 19 deletions.
24 changes: 5 additions & 19 deletions qanda.php
Expand Up @@ -2607,28 +2607,14 @@ function do_ranking($ia)
$choicelist = "<select size=\"$anscount\" name=\"CHOICES_{$ia[0]}\" ";
if (isset($choicewidth)) {$choicelist.=$choicewidth;}
$choicelist .= " id=\"CHOICES_{$ia[0]}\" onclick=\"if (this.options.length>0 && this.selectedIndex<0) {this.options[this.options.length-1].selected=true;}; rankthis_{$ia[0]}(this.options[this.selectedIndex].value, this.options[this.selectedIndex].text)\" class=\"select\">\n";
if (_PHPVERSION <= "4.2.0")
{
foreach ($chosen as $chs) {$choose[]=$chs[0];}
foreach ($answers as $ans)
{
if (!in_array($ans[0], $choose))
{
$choicelist .= "\t\t\t\t\t\t\t<option value='{$ans[0]}'>{$ans[1]}</option>\n";
if (strlen($ans[1]) > $maxselectlength) {$maxselectlength = strlen($ans[1]);}
}
}
}
else

foreach ($answers as $ans)
{
foreach ($answers as $ans)
if (!in_array($ans, $chosen))
{
if (!in_array($ans, $chosen))
{
$choicelist .= "\t\t\t\t\t\t\t<option value='{$ans[0]}'>{$ans[1]}</option>\n";
if (isset($maxselectlength) && strlen($ans[1]) > $maxselectlength) {$maxselectlength = strlen($ans[1]);}
}
$choicelist .= "\t\t\t\t\t\t\t<option value='{$ans[0]}'>{$ans[1]}</option>\n";
}
if (strlen($ans[1]) > $maxselectlength) {$maxselectlength = strlen($ans[1]);}
}
$choicelist .= "</select>\n";

Expand Down

0 comments on commit 7d547b4

Please sign in to comment.