2008-10-15 19:40:04 +02:00
|
|
|
var LSformElement_textarea = new Class({
|
|
|
|
initialize: function(){
|
|
|
|
this.initialiseLSformElement_textarea();
|
|
|
|
if ($type(varLSform)) {
|
|
|
|
varLSform.addModule("LSformElement_textarea",this);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
initialiseLSformElement_textarea: function(el) {
|
|
|
|
if (!$type(el)) {
|
|
|
|
el = document;
|
|
|
|
}
|
|
|
|
el.getElements('textarea.LSform').each(function(textarea) {
|
|
|
|
var btn = new Element('img');
|
|
|
|
btn.addClass('btn');
|
2013-06-19 02:17:39 +02:00
|
|
|
btn.src = varLSdefault.imagePath('clear');
|
2008-10-15 19:40:04 +02:00
|
|
|
btn.addEvent('click',this.onClearBtnClick.bind(this,btn));
|
|
|
|
btn.injectAfter(textarea);
|
2008-11-10 04:34:28 +01:00
|
|
|
varLSdefault.addHelpInfo(btn,'LSformElement_textarea','clear');
|
2008-10-15 19:40:04 +02:00
|
|
|
}, this);
|
|
|
|
},
|
|
|
|
|
|
|
|
onClearBtnClick: function(btn) {
|
|
|
|
btn.getPrevious().value='';
|
|
|
|
},
|
|
|
|
|
|
|
|
reinitialize: function(el) {
|
|
|
|
this.initialiseLSformElement_textarea(el);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
window.addEvent(window.ie ? 'load' : 'domready', function() {
|
|
|
|
varLSformElement_textarea = new LSformElement_textarea();
|
|
|
|
});
|