Mise en forme et correction d'un bug (ajout des listener sur les static secAuthor)

This commit is contained in:
Frederic Debuire
2008-02-17 13:38:36 +00:00
parent 0372e58db9
commit b89ba3922e
3 changed files with 37 additions and 9 deletions

View File

@@ -9,6 +9,13 @@ var SecondaryAuthorManager = Class.create({
$(buttonRemove).observe("click",this.RemoveSecondaryAuthor.bind(this));
$(inputField).observe("keypress", this.KeyPressHandler.bindAsEventListener(this));
this.lastRef = $('secondaryAuthorList').select(".dynamicListItem").size();
if (this.lastRef != 0) {
elt = $('secondaryAuthorList').select(".dynamicListItem");
for (var i = 0; i < elt.length; i++) {
elt[i].observe('click', this.SelectSecondaryAuthor.bindAsEventListener());
}
}
},
SelectSecondaryAuthor: function(event){
var item = event.element();