mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-18 22:43:47 +01:00
- LSinfosBox :
- Added function isOpened() - Improvement of the function addInfo()
This commit is contained in:
parent
9fe268346a
commit
bbd47dfdc3
1 changed files with 20 additions and 12 deletions
|
@ -60,6 +60,10 @@ var LSinfosBox = new Class({
|
||||||
this.core.inject(document.body,'top');
|
this.core.inject(document.body,'top');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
isOpened: function() {
|
||||||
|
return this.opened;
|
||||||
|
},
|
||||||
|
|
||||||
open: function() {
|
open: function() {
|
||||||
this.core.setStyle('top',getScrollTop()+10);
|
this.core.setStyle('top',getScrollTop()+10);
|
||||||
|
|
||||||
|
@ -97,23 +101,27 @@ var LSinfosBox = new Class({
|
||||||
},
|
},
|
||||||
|
|
||||||
addInfo: function(html) {
|
addInfo: function(html) {
|
||||||
if (this.content.innerHTML=='') {
|
var ul = this.content.getLast("ul");
|
||||||
this.content.set('html',html);
|
var add = 0;
|
||||||
}
|
if (!$type(ul)) {
|
||||||
else {
|
ul = new Element('ul');
|
||||||
var ul = this.content.getLast("ul");
|
if (this.content.innerHTML!="") {
|
||||||
if (!$type(ul)) {
|
|
||||||
ul = new Element('ul');
|
|
||||||
var c_li = new Element('li');
|
var c_li = new Element('li');
|
||||||
c_li.set('html',this.content.innerHTML);
|
c_li.set('html',this.content.innerHTML);
|
||||||
c_li.injectInside(ul);
|
c_li.injectInside(ul);
|
||||||
this.content.empty();
|
add=1;
|
||||||
ul.injectInside(this.content);
|
|
||||||
}
|
}
|
||||||
var li = new Element('li');
|
this.content.empty();
|
||||||
li.set('html',html);
|
ul.injectInside(this.content);
|
||||||
li.injectInside(ul);
|
|
||||||
}
|
}
|
||||||
|
if (add) {
|
||||||
|
var b_li = new Element('li');
|
||||||
|
b_li.set('html','<hr/>');
|
||||||
|
b_li.injectInside(ul);
|
||||||
|
}
|
||||||
|
var li = new Element('li');
|
||||||
|
li.set('html',html);
|
||||||
|
li.injectInside(ul);
|
||||||
this.open();
|
this.open();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue