mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-28 11:23:49 +01:00
ab7120b589
-> Redimentionnement des dt pour laisser plus de place aux labels - LSformElement_boolean, LSformElement_select : Ajout d'un bouton clear - L'ajout des boutons javascript a été déporté dans le code javascript : -> LSformElement_url -> LSformElement_mail -> LSformElement_rss -> LSformElement_xmp - LSformElement_select_object -> Activation du champ de formulaire directement dans le javascript
30 lines
912 B
JavaScript
30 lines
912 B
JavaScript
var LSformElement_boolean = new Class({
|
|
initialize: function(){
|
|
this.initialiseLSformElement_boolean();
|
|
},
|
|
|
|
initialiseLSformElement_boolean: function() {
|
|
$$('li.LSformElement_boolean').each(function(el) {
|
|
var btn = new Element('img');
|
|
btn.setProperties({
|
|
src: 'templates/images/clear.png',
|
|
alt: 'Reset',
|
|
title: 'Reset'
|
|
});
|
|
btn.addClass('btn');
|
|
btn.setStyle('vertical-align','top');
|
|
btn.addEvent('click',this.onClearBtnClick.bind(this,btn));
|
|
btn.injectInside(el);
|
|
}, this);
|
|
},
|
|
|
|
onClearBtnClick: function(btn) {
|
|
var li = btn.getParent();
|
|
li.getElements('input').each(function(input) {
|
|
input.checked=false;
|
|
},this);
|
|
}
|
|
});
|
|
window.addEvent(window.ie ? 'load' : 'domready', function() {
|
|
varLSformElement_boolean = new LSformElement_boolean();
|
|
});
|