mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-18 00:09:06 +01:00
- LSinfosBox : fix bug in addInfo() and add displayInUl() and displayOrAdd() functions
This commit is contained in:
parent
bbd47dfdc3
commit
ade5a8e596
1 changed files with 21 additions and 1 deletions
|
@ -102,8 +102,9 @@ var LSinfosBox = new Class({
|
|||
|
||||
addInfo: function(html) {
|
||||
var ul = this.content.getLast("ul");
|
||||
var add = 0;
|
||||
var add = 1;
|
||||
if (!$type(ul)) {
|
||||
add=0;
|
||||
ul = new Element('ul');
|
||||
if (this.content.innerHTML!="") {
|
||||
var c_li = new Element('li');
|
||||
|
@ -131,5 +132,24 @@ var LSinfosBox = new Class({
|
|||
this.content.set('html',html);
|
||||
}
|
||||
this.open();
|
||||
},
|
||||
|
||||
displayInUl: function(html) {
|
||||
if ($type(html)) {
|
||||
ul = new Element('ul');
|
||||
this.content.empty();
|
||||
ul.set('html',html);
|
||||
ul.inject(this.content);
|
||||
}
|
||||
this.open();
|
||||
},
|
||||
|
||||
displayOrAdd: function(html) {
|
||||
if (this.isOpened()) {
|
||||
this.addInfo(html);
|
||||
}
|
||||
else {
|
||||
this.displayInUl(html);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue