[pve-devel] [PATCH manager 2/4] ext6migrate: fix LogView

Dominik Csapak d.csapak at proxmox.com
Thu Feb 25 14:11:21 CET 2016


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 at proxmox.com>
---
 www/manager6/panel/LogView.js | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)

diff --git a/www/manager6/panel/LogView.js b/www/manager6/panel/LogView.js
index 49be118..9ed1213 100644
--- a/www/manager6/panel/LogView.js
+++ b/www/manager6/panel/LogView.js
@@ -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);
 		}
-- 
2.1.4





More information about the pve-devel mailing list