2008-07-15 18:24:35 +02:00
|
|
|
var LSformElement_rss = new Class({
|
|
|
|
initialize: function(){
|
|
|
|
this.initialiseLSformElement_rss();
|
|
|
|
if (typeof(varLSform) != "undefined") {
|
|
|
|
varLSform.addModule("LSformElement_rss",this);
|
|
|
|
}
|
|
|
|
},
|
2020-04-29 15:54:21 +02:00
|
|
|
|
2008-07-15 18:24:35 +02:00
|
|
|
initialiseLSformElement_rss: function(el) {
|
|
|
|
if (typeof(el) == 'undefined') {
|
|
|
|
el = document;
|
|
|
|
}
|
2008-09-27 02:55:58 +02:00
|
|
|
el.getElements('input.LSformElement_rss').each(function(input) {
|
|
|
|
this.addBtnAfter.bind(this)(input);
|
2008-07-15 18:24:35 +02:00
|
|
|
}, this);
|
2008-09-27 02:55:58 +02:00
|
|
|
el.getElements('a.LSformElement_rss').each(function(a) {
|
|
|
|
this.addBtnAfter.bind(this)(a);
|
|
|
|
}, this);
|
|
|
|
},
|
2020-04-29 15:54:21 +02:00
|
|
|
|
2008-09-27 02:55:58 +02:00
|
|
|
addBtnAfter: function(el) {
|
|
|
|
var btn = new Element('img');
|
|
|
|
btn.setProperties({
|
2013-06-19 02:17:39 +02:00
|
|
|
src: varLSdefault.imagePath('rss'),
|
2008-11-10 04:11:37 +01:00
|
|
|
alt: 'File RSS'
|
2008-09-27 02:55:58 +02:00
|
|
|
});
|
|
|
|
btn.addClass('btn');
|
|
|
|
btn.injectAfter(el);
|
|
|
|
btn.addEvent('click',this.onBtnClick.bind(this,btn));
|
2008-11-10 04:11:37 +01:00
|
|
|
varLSdefault.addHelpInfo(btn,'LSformElement_rss','display');
|
2008-07-15 18:24:35 +02:00
|
|
|
},
|
2020-04-29 15:54:21 +02:00
|
|
|
|
2008-07-15 18:24:35 +02:00
|
|
|
reinitialize: function(el) {
|
2008-10-15 20:29:14 +02:00
|
|
|
varLSform.initializeModule('LSformElement_text',el);
|
2008-07-15 18:24:35 +02:00
|
|
|
this.initialiseLSformElement_rss(el);
|
|
|
|
},
|
2020-04-29 15:54:21 +02:00
|
|
|
|
2008-07-15 18:24:35 +02:00
|
|
|
onBtnClick: function(btn) {
|
|
|
|
var href = btn.getParent().getFirst().href;
|
|
|
|
if (typeof(href)=="undefined") {
|
|
|
|
href = btn.getParent().getFirst().value;
|
|
|
|
}
|
|
|
|
if (href!="") {
|
|
|
|
window.open(href,'_blank');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
window.addEvent(window.ie ? 'load' : 'domready', function() {
|
|
|
|
varLSformElement_rss = new LSformElement_rss();
|
|
|
|
});
|