2008-02-05 17:11:21 +01:00
|
|
|
var LSdefault = new Class({
|
|
|
|
initialize: function(){
|
2008-02-08 18:39:24 +01:00
|
|
|
LSdebug('toto');
|
|
|
|
this.LSdebug = $('LSdebug');
|
|
|
|
this.LSdebugInfos = $('LSdebug_infos');
|
|
|
|
this.LSdebug.setOpacity(0);
|
|
|
|
if (this.LSdebugInfos.innerHTML != '') {
|
|
|
|
this.displayDebugBox();
|
|
|
|
}
|
|
|
|
|
|
|
|
this.LSdebugHidden = $('LSdebug_hidden');
|
|
|
|
this.LSdebugHidden.addEvent('click',this.onLSdebugHiddenClick.bindWithEvent(this));
|
|
|
|
this.LSerror = $('LSerror');
|
|
|
|
this.LSerror.setOpacity(0);
|
|
|
|
if (this.LSerror.innerHTML != '') {
|
|
|
|
this.displayLSerror();
|
|
|
|
}
|
2008-02-05 17:11:21 +01:00
|
|
|
},
|
|
|
|
|
2008-02-08 18:39:24 +01:00
|
|
|
onLSdebugHiddenClick: function(event){
|
|
|
|
new Event(event).stop();
|
|
|
|
new Fx.Style(this.LSdebug,'opacity',{duration:500}).start(1,0);
|
|
|
|
},
|
2008-02-05 17:11:21 +01:00
|
|
|
|
2008-02-08 18:39:24 +01:00
|
|
|
displayDebugBox: function() {
|
|
|
|
new Fx.Style(this.LSdebug,'opacity',{duration:500}).start(0,0.8);
|
|
|
|
},
|
2008-02-05 17:11:21 +01:00
|
|
|
|
2008-02-08 18:39:24 +01:00
|
|
|
displayError: function(html) {
|
|
|
|
this.LSerror.empty();
|
|
|
|
this.LSerror.setHTML(html);
|
|
|
|
this.displayLSerror();
|
|
|
|
},
|
2008-02-05 17:11:21 +01:00
|
|
|
|
2008-02-08 18:39:24 +01:00
|
|
|
displayLSerror: function() {
|
|
|
|
new Fx.Style(this.LSerror,'opacity',{duration:500}).start(0,0.8);
|
|
|
|
(function(){new Fx.Style(this.LSerror,'opacity',{duration:500}).start(0.8,0);}).delay(5000, this);
|
|
|
|
},
|
2008-02-05 17:11:21 +01:00
|
|
|
|
2008-02-08 18:39:24 +01:00
|
|
|
loadingImgDisplay: function(el) {
|
|
|
|
this.loading_img = new Element('img');
|
|
|
|
this.loading_img.src='templates/images/ajax-loader.gif';
|
|
|
|
this.loading_img.injectAfter(el);
|
|
|
|
},
|
2008-02-05 17:11:21 +01:00
|
|
|
|
2008-02-08 18:39:24 +01:00
|
|
|
loadingImgHide: function() {
|
|
|
|
this.loading_img.remove();
|
|
|
|
}
|
2008-02-05 17:11:21 +01:00
|
|
|
|
|
|
|
});
|
|
|
|
window.addEvent(window.ie ? 'load' : 'domready', function() {
|
2008-02-08 18:39:24 +01:00
|
|
|
varLSdefault = new LSdefault();
|
2008-02-05 17:11:21 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
LSdebug_active = 1;
|
|
|
|
|
|
|
|
function LSdebug() {
|
|
|
|
if (LSdebug_active != 1) return;
|
|
|
|
if (typeof console == 'undefined') return;
|
|
|
|
console.log.apply(this, arguments);
|
|
|
|
}
|