ldapsaisie/src/includes/js/LSformElement_boolean.js
Benjamin Renard 7098b3ee79 Massive change of files organisation to move all files outside web-root
The web-root directory now contains URL rewrite stuff. All PHP & static files are
in root src directory and are served via LSurl routes.
2020-05-06 12:17:35 +02:00

30 lines
951 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: varLSdefault.imagePath('clear'),
alt: 'Clear'
});
btn.addClass('btn');
btn.setStyle('vertical-align','top');
btn.addEvent('click',this.onClearBtnClick.bind(this,btn));
btn.injectInside(el);
varLSdefault.addHelpInfo(btn,'LSformElement_boolean','clear');
}, 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();
});