Initial version of newsfeed in admin dashboard

This commit is contained in:
BNoiZe
2013-11-15 22:11:25 +01:00
parent f1cfe41d07
commit c2bae1f25a
4 changed files with 78 additions and 0 deletions

View File

@@ -4,6 +4,9 @@ $header
<img src="templates/{$theme}/assets/img/icons/domains_big.png" alt="" />
{$lng['panel']['dashboard']}
</h2>
<div class="dboarditemfull bradius" id="newsfeed" style="display: none"></div>
<br />
<br />
<div class="canvasitems" id="statsbox">
<div class="canvasbox">
<input type="hidden" id="customers" class="circular" data-used="{$overview['number_customers']}" data-available="{$userinfo['customers']}">

View File

@@ -490,6 +490,7 @@ nav {
float: left;
width:230px;
background-color:#f7f8fa;
min-height: 500px;
}
nav div:first-child {
display: none;
@@ -939,3 +940,21 @@ label.nobr {
.canvasbox canvas {
width: 120px;
}
/* NEWSFEED */
.newsitem {
border-bottom: 1px solid #f1f2f3;
padding: 6px 10px 8px 10px;
height: 16px;
line-height: 20px;
margin: 0 10px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.newsitem a {
color: #333;
}
.newsitem b {
margin-right: 15px;
}

View File

@@ -31,6 +31,14 @@ $(document).ready(function() {
if (snheight > mainheight) {
$('#maincontent').height(snheight - 60);
}
// Load Newsfeed
var ajax_load = "<div id='newsitem'>Loading newsfeed...</div>";
$("#newsfeed").html(ajax_load).load("lib/ajax.php?action=newsfeed", function() {
if ($("#newsfeed").html() != "") {
$("#newsfeed").slideDown();
}
});
// this is necessary for the special setting feature (ref #1010)
$.getQueryVariable = function(key) {