scrollbar and scroll to bottom on logs page

v1.18.x
barisusakli 9 years ago
parent c148b1c956
commit 1cda4e8d9b

@ -18,6 +18,7 @@
@import "./extend/plugins"; @import "./extend/plugins";
@import "./extend/rewards"; @import "./extend/rewards";
@import "./advanced/database"; @import "./advanced/database";
@import "./advanced/logs";
@import "./settings"; @import "./settings";
@import "./modules/alerts"; @import "./modules/alerts";

@ -0,0 +1,8 @@
.logs {
.panel-body {
pre {
height: 600px;
}
}
}

@ -6,7 +6,7 @@ define('admin/advanced/logs', function() {
Logs.init = function() { Logs.init = function() {
var logsEl = $('.logs pre'); var logsEl = $('.logs pre');
logsEl.scrollTop(logsEl.prop('scrollHeight'));
// Affix menu // Affix menu
$('.affix').affix(); $('.affix').affix();
@ -19,6 +19,7 @@ define('admin/advanced/logs', function() {
socket.emit('admin.logs.get', function(err, logs) { socket.emit('admin.logs.get', function(err, logs) {
if (!err) { if (!err) {
logsEl.text(logs); logsEl.text(logs);
logsEl.scrollTop(logsEl.prop('scrollHeight'));
} else { } else {
app.alertError(err.message); app.alertError(err.message);
} }

Loading…
Cancel
Save