- LStips : Déplacement de la gestion des LStips de LSform vers LSdefault

This commit is contained in:
Benjamin Renard 2008-11-14 17:36:49 +00:00
parent 8c10e0cb92
commit f21dfeed08
4 changed files with 32 additions and 31 deletions

View file

@ -52,3 +52,24 @@
top: 10px;
font-weight: bold;
}
/* Tips */
.tip-top {
color: #fff;
width: 139px;
z-index: 13000;
}
.tip-title {
font-weight: bold;
font-size: 11px;
margin: 0;
color: #b5e4f6;
padding: 2px;
background: #333;
opacity: 0.8;
-moz-border-radius: 2px;
max-width: 500px;
text-align: justify;
}

View file

@ -132,23 +132,3 @@ dt.LSform-errors {
img.LSform-add-field-btn, img.LSform-remove-field-btn {
cursor: pointer;
}
/* Tips */
.tip-top {
color: #fff;
width: 139px;
z-index: 13000;
}
.tip-title {
font-weight: bold;
font-size: 11px;
margin: 0;
color: #b5e4f6;
padding: 2px;
background: #333;
opacity: 0.8;
-moz-border-radius: 2px;
max-width: 500px;
text-align: justify;
}

View file

@ -46,6 +46,8 @@ var LSdefault = new Class({
if (this.LSinfos.innerHTML != '') {
this.displayInfosBox();
}
this.LStips = new Tips('.LStips');
},
onLSsession_topDnChange: function() {
@ -185,7 +187,7 @@ var LSdefault = new Class({
if ($type(el)=='element') {
if ($type(this.LSjsConfig['helpInfos'][group])) {
if ($type(this.LSjsConfig['helpInfos'][group][name])) {
varLSform.addTip(el);
this.addTip(el);
el.store('tip:title',this.LSjsConfig['helpInfos'][group][name]);
el.store('tip:text',"");
}
@ -205,6 +207,14 @@ var LSdefault = new Class({
}
}
}
},
addTip: function(el) {
this.LStips.attach(el);
},
removeTip: function(el) {
this.LStips.detach(el);
}
});

View file

@ -14,7 +14,6 @@ var LSform = new Class({
},
initializeLSform: function(el) {
this.LStips = new Tips('.LStips');
if (this.idform) {
if (typeof(el) == 'undefined') {
el = document;
@ -225,16 +224,7 @@ var LSform = new Class({
}
}
}
},
addTip: function(el) {
this.LStips.attach(el);
},
removeTip: function(el) {
this.LStips.detach(el);
}
});
window.addEvent(window.ie ? 'load' : 'domready', function() {
varLSform = new LSform();