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];
|
||||||
|
|||||||
@@ -186,6 +186,8 @@ function getNews()
|
|||||||
(
|
(
|
||||||
'news',
|
'news',
|
||||||
function(asNews)
|
function(asNews)
|
||||||
|
{
|
||||||
|
if(Object.keys(asNews.news).length>0)
|
||||||
{
|
{
|
||||||
$.each(asNews.news, function(ikey, asNew)
|
$.each(asNews.news, function(ikey, asNew)
|
||||||
{
|
{
|
||||||
@@ -199,6 +201,8 @@ function getNews()
|
|||||||
.append($('<span>', {'class':'news_time'}).text(asNew.time_desc)))
|
.append($('<span>', {'class':'news_time'}).text(asNew.time_desc)))
|
||||||
.appendTo($NewsBox);
|
.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