From 72fb5737cdb69e8b0ab21fc323996e0cfdff8004 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Sun, 9 Nov 2008 23:18:35 +0000 Subject: [PATCH] =?UTF-8?q?-=20LSdefault=20::=20checkAjaxReturn()=20:=20Co?= =?UTF-8?q?rrection=20de=20la=20m=C3=A9thode=20et=20ajout=20du=20support?= =?UTF-8?q?=20des=20LSinfos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trunk/includes/js/LSdefault.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/trunk/includes/js/LSdefault.js b/trunk/includes/js/LSdefault.js index 9edbe29b..baba7a08 100644 --- a/trunk/includes/js/LSdefault.js +++ b/trunk/includes/js/LSdefault.js @@ -57,20 +57,24 @@ var LSdefault = new Class({ }, checkAjaxReturn: function(data) { - if (typeof(data) == 'object') { - if (typeof(data.imgload) != "undefined") { + if ($type(data) == 'object') { + if ($type(data.imgload)) { this.loadingImgHide(data.imgload); } else { this.loadingImgHide(); } - if (typeof(data.LSdebug) != "undefined") { + if ($type(data.LSdebug)) { LSdebug(data.LSdebug); this.displayDebug(data.LSdebug); } - if (typeof(data.LSerror) != "undefined") { + if ($type(data.LSinfos)) { + this.displayInfos(data.LSinfos); + } + + if ($type(data.LSerror)) { this.displayError(data.LSerror); return; }