ext6migrate: fix LogView

fixes the LogView (for Tasks and Syslog) including:
 moving static configuration to class definition
 changing deprecated bodyStyle: padding to bodyPadding
 removing chrome scrolltop hack (does work properly now, and hack
  did not work anymore)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2016-02-25 14:11:21 +01:00 committed by Dietmar Maurer
parent e1984cbd58
commit f5783553d0

View File

@ -16,6 +16,12 @@ Ext.define('PVE.panel.LogView', {
scrollToEnd: true,
autoScroll: true,
layout: 'auto',
bodyPadding: 5,
getMaxDown: function(scrollToEnd) {
var me = this;
@ -181,24 +187,8 @@ Ext.define('PVE.panel.LogView', {
});
Ext.apply(me, {
autoScroll: true,
layout: 'auto',
items: me.dataCmp,
bodyStyle: 'padding: 5px;',
listeners: {
show: function() {
var target = me.getTargetEl();
if (target && target.dom) {
target.dom.scrollTop = me.savedScrollTop;
}
},
beforehide: function() {
// Hack: chrome reset scrollTop to 0, so we save/restore
var target = me.getTargetEl();
if (target && target.dom) {
me.savedScrollTop = target.dom.scrollTop;
}
},
destroy: function() {
Ext.TaskManager.stop(me.task);
}