- LSdefault : Correction d'une erreur d'affichage des messages d'erreurs
authorBenjamin Renard <brenard@easter-eggs.com>
Tue, 31 Mar 2009 15:29:56 +0000 (15:29 +0000)
committerBenjamin Renard <brenard@easter-eggs.com>
Tue, 31 Mar 2009 15:29:56 +0000 (15:29 +0000)
trunk/includes/js/LSdefault.js

index 8c206dd..cd86da8 100644 (file)
@@ -14,7 +14,7 @@ var LSdefault = new Class({
       this.LSerror = $('LSerror');
       this.LSerror.setOpacity(0);
       this.LSerror_open = 0;
-      this.LSerror.addEvent('dblclick',this.hideLSerror.bind(this));
+      this.LSerror.addEvent('dblclick',this.hideLSerror.bind(this,0));
       
       // LSinfos
       this.LSinfos = $('LSinfos');
@@ -143,7 +143,7 @@ var LSdefault = new Class({
     },
 
     checkAjaxReturn: function(data) {
-      this.hideLSerror();
+      this.hideLSerror(0);
       if ($type(data) == 'object') {
         if (($type(data.LSredirect)) && (!$type(data.LSdebug)) ) {
           document.location = data.LSredirect;
@@ -228,10 +228,15 @@ var LSdefault = new Class({
       }
     },
     
-    hideLSerror: function(){
+    hideLSerror: function(withoutEffect){
       if (this.LSerror_open) {
-        this.fx.LSerror.start(0.9,0);
         this.LSerror_open = 0;
+        if (withoutEffect==0) {
+          this.fx.LSerror.start(0.9,0);
+        }
+        else {
+          this.fx.LSerror.set(0);
+        }
       }
     },