Always recreate the listener for the question and answer buttons, since their arguments change. Fixes bug #10985.

This commit is contained in:
Colin Kuskie 2009-11-04 15:13:26 -08:00
parent fc6acc7be3
commit f9d97f2ce7
2 changed files with 5 additions and 1 deletions

View file

@ -2,6 +2,7 @@
- Fixed a compatibility problem between WRE and new Spectre code.
- fixed #11198: Typo in i18n
- fixed #11202: USPS driver does not log authentication errors
- fixed #10985: Survey: can't add multiple choice answer
7.8.3
- Rewrote Spectre's workflow queues to prevent it from "forgetting" about some workflows.

View file

@ -161,6 +161,8 @@ Survey.Data = (function(){
});
qButton.on("click", this.addQuestion, d.buttons.question);
}
qButton.removeListener("click", this.addQuestion);
qButton.on("click", this.addQuestion, d.buttons.question);
if (d.buttons.answer) {
YAHOO.util.Dom.setStyle('addAnswer', 'display', 'inline');
@ -170,8 +172,9 @@ Survey.Data = (function(){
id: "addAnswer",
container: "addAnswer"
});
aButton.on("click", this.addAnswer, d.buttons.answer);
}
aButton.removeListener("click", this.addAnswer);
aButton.on("click", this.addAnswer, d.buttons.answer);
}else{
YAHOO.util.Dom.setStyle('addAnswer', 'display', 'none');
}