diff --git a/inc/databap.php b/inc/databap.php index 8baebd0..0a05b61 100644 --- a/inc/databap.php +++ b/inc/databap.php @@ -1834,6 +1834,7 @@ class Databap extends PhpObject $asInfo['limit'] = 3; $asNews = $this->oMySql->selectRows($asInfo); + $asFormatNews = array(); foreach($asNews as $asNew) { $iMsgId = '-'.$asNew[$sMsgIdCol]; diff --git a/masks/chat.html b/masks/chat.html index 75e67ec..6b730a3 100755 --- a/masks/chat.html +++ b/masks/chat.html @@ -187,19 +187,23 @@ function getNews() 'news', function(asNews) { - $.each(asNews.news, function(ikey, asNew) + if(Object.keys(asNews.news).length>0) { - $('
', {'class':'new'}).hide() - .append($('

') - .append($('', {'class':'fa fa-inline fa-30 fa-c-news'})) - .append($('').text(asNew.message))) - .append($('

', {'class':'signature'}) - .text('—'+asNew.nickname) - .append('
') - .append($('', {'class':'news_time'}).text(asNew.time_desc))) - .appendTo($NewsBox); - }); - + $.each(asNews.news, function(ikey, asNew) + { + $('

', {'class':'new'}).hide() + .append($('

') + .append($('', {'class':'fa fa-inline fa-30 fa-c-news'})) + .append($('').text(asNew.message))) + .append($('

', {'class':'signature'}) + .text('—'+asNew.nickname) + .append('
') + .append($('', {'class':'news_time'}).text(asNew.time_desc))) + .appendTo($NewsBox); + }); + } + else $('

', {'class':'new'}).hide().text('Aucune news.').appendTo($NewsBox); + $NewsBox.find('.loading').hide(); $NewsBox.find('.new').toggle(); $NewsBox.find('.new:hidden').remove(); diff --git a/style/screen.css b/style/screen.css index 765dbf5..f52582c 100644 --- a/style/screen.css +++ b/style/screen.css @@ -2436,9 +2436,6 @@ vertical-align 0% -5% -10% -15% -20% -25% -30% color:#04357B; margin-top:25px; } -#logout p .fa { - margin-right:5px; -} /* Debug*/