2008-09-27 02:55:58 +02:00
|
|
|
var LSformElement_boolean = new Class({
|
|
|
|
initialize: function(){
|
|
|
|
this.initialiseLSformElement_boolean();
|
|
|
|
},
|
2020-04-29 15:54:21 +02:00
|
|
|
|
2008-09-27 02:55:58 +02:00
|
|
|
initialiseLSformElement_boolean: function() {
|
|
|
|
$$('li.LSformElement_boolean').each(function(el) {
|
|
|
|
var btn = new Element('img');
|
|
|
|
btn.setProperties({
|
2013-06-19 02:17:39 +02:00
|
|
|
src: varLSdefault.imagePath('clear'),
|
2008-11-10 03:27:38 +01:00
|
|
|
alt: 'Clear'
|
2008-09-27 02:55:58 +02:00
|
|
|
});
|
|
|
|
btn.addClass('btn');
|
|
|
|
btn.setStyle('vertical-align','top');
|
|
|
|
btn.addEvent('click',this.onClearBtnClick.bind(this,btn));
|
|
|
|
btn.injectInside(el);
|
2008-11-10 03:27:38 +01:00
|
|
|
varLSdefault.addHelpInfo(btn,'LSformElement_boolean','clear');
|
2008-09-27 02:55:58 +02:00
|
|
|
}, this);
|
|
|
|
},
|
2020-04-29 15:54:21 +02:00
|
|
|
|
2008-09-27 02:55:58 +02:00
|
|
|
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();
|
|
|
|
});
|