fixing chat news layout if no news
This commit is contained in:
@@ -1834,6 +1834,7 @@ class Databap extends PhpObject
|
|||||||
$asInfo['limit'] = 3;
|
$asInfo['limit'] = 3;
|
||||||
$asNews = $this->oMySql->selectRows($asInfo);
|
$asNews = $this->oMySql->selectRows($asInfo);
|
||||||
|
|
||||||
|
$asFormatNews = array();
|
||||||
foreach($asNews as $asNew)
|
foreach($asNews as $asNew)
|
||||||
{
|
{
|
||||||
$iMsgId = '-'.$asNew[$sMsgIdCol];
|
$iMsgId = '-'.$asNew[$sMsgIdCol];
|
||||||
|
|||||||
@@ -187,18 +187,22 @@ function getNews()
|
|||||||
'news',
|
'news',
|
||||||
function(asNews)
|
function(asNews)
|
||||||
{
|
{
|
||||||
$.each(asNews.news, function(ikey, asNew)
|
if(Object.keys(asNews.news).length>0)
|
||||||
{
|
{
|
||||||
$('<div>', {'class':'new'}).hide()
|
$.each(asNews.news, function(ikey, asNew)
|
||||||
.append($('<p>')
|
{
|
||||||
.append($('<i>', {'class':'fa fa-inline fa-30 fa-c-news'}))
|
$('<div>', {'class':'new'}).hide()
|
||||||
.append($('<span>').text(asNew.message)))
|
.append($('<p>')
|
||||||
.append($('<p>', {'class':'signature'})
|
.append($('<i>', {'class':'fa fa-inline fa-30 fa-c-news'}))
|
||||||
.text('—'+asNew.nickname)
|
.append($('<span>').text(asNew.message)))
|
||||||
.append('<br />')
|
.append($('<p>', {'class':'signature'})
|
||||||
.append($('<span>', {'class':'news_time'}).text(asNew.time_desc)))
|
.text('—'+asNew.nickname)
|
||||||
.appendTo($NewsBox);
|
.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('.loading').hide();
|
||||||
$NewsBox.find('.new').toggle();
|
$NewsBox.find('.new').toggle();
|
||||||
|
|||||||
@@ -2436,9 +2436,6 @@ vertical-align 0% -5% -10% -15% -20% -25% -30%
|
|||||||
color:#04357B;
|
color:#04357B;
|
||||||
margin-top:25px;
|
margin-top:25px;
|
||||||
}
|
}
|
||||||
#logout p .fa {
|
|
||||||
margin-right:5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Debug*/
|
/* Debug*/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user