fixing chat news layout if no news
This commit is contained in:
@@ -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];
|
||||
|
||||
@@ -187,19 +187,23 @@ function getNews()
|
||||
'news',
|
||||
function(asNews)
|
||||
{
|
||||
$.each(asNews.news, function(ikey, asNew)
|
||||
if(Object.keys(asNews.news).length>0)
|
||||
{
|
||||
$('<div>', {'class':'new'}).hide()
|
||||
.append($('<p>')
|
||||
.append($('<i>', {'class':'fa fa-inline fa-30 fa-c-news'}))
|
||||
.append($('<span>').text(asNew.message)))
|
||||
.append($('<p>', {'class':'signature'})
|
||||
.text('—'+asNew.nickname)
|
||||
.append('<br />')
|
||||
.append($('<span>', {'class':'news_time'}).text(asNew.time_desc)))
|
||||
.appendTo($NewsBox);
|
||||
});
|
||||
|
||||
$.each(asNews.news, function(ikey, asNew)
|
||||
{
|
||||
$('<div>', {'class':'new'}).hide()
|
||||
.append($('<p>')
|
||||
.append($('<i>', {'class':'fa fa-inline fa-30 fa-c-news'}))
|
||||
.append($('<span>').text(asNew.message)))
|
||||
.append($('<p>', {'class':'signature'})
|
||||
.text('—'+asNew.nickname)
|
||||
.append('<br />')
|
||||
.append($('<span>', {'class':'news_time'}).text(asNew.time_desc)))
|
||||
.appendTo($NewsBox);
|
||||
});
|
||||
}
|
||||
else $('<div>', {'class':'new'}).hide().text('Aucune news.').appendTo($NewsBox);
|
||||
|
||||
$NewsBox.find('.loading').hide();
|
||||
$NewsBox.find('.new').toggle();
|
||||
$NewsBox.find('.new:hidden').remove();
|
||||
|
||||
@@ -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*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user