mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-10-03 03:29:54 +02:00
2e67cd7361
-> Correction d'erreurs d'affichage - LSformElement_mail.js & LSformElement_xmpp.js : -> Correction d'erreurs de comportement au clique sur les boutons
34 lines
998 B
JavaScript
34 lines
998 B
JavaScript
var LSformElement_mail = new Class({
|
|
initialize: function(){
|
|
this.initialiseLSformElement_mail();
|
|
if (typeof(varLSform) != "undefined") {
|
|
varLSform.addModule("LSformElement_mail",this);
|
|
}
|
|
},
|
|
|
|
initialiseLSformElement_mail: function(el) {
|
|
if (typeof(el) == 'undefined') {
|
|
el = document;
|
|
}
|
|
el.getElements('img.LSformElement_mail_btn').each(function(btn) {
|
|
btn.addEvent('click',this.onBtnClick.bind(this,btn));
|
|
}, this);
|
|
},
|
|
|
|
reinitialize: function(el) {
|
|
this.initialiseLSformElement_mail(el);
|
|
},
|
|
|
|
onBtnClick: function(btn) {
|
|
var href = btn.getParent().getFirst().href;
|
|
if (typeof(href)=="undefined") {
|
|
href = 'mailto:'+btn.getParent().getFirst().value;
|
|
}
|
|
if ((href!="")&&(href!="mailto:")) {
|
|
location.href = href;
|
|
}
|
|
}
|
|
});
|
|
window.addEvent(window.ie ? 'load' : 'domready', function() {
|
|
varLSformElement_mail = new LSformElement_mail();
|
|
});
|