[pve-devel] [PATCH manager 1/8] ext6migrate: prevent collapsing of snapshottree

Dominik Csapak d.csapak at proxmox.com
Fri Mar 18 14:36:04 CET 2016


instead of returning false in the 'beforeitemcollaps'
event (which is not fired in extjs6 anymore)

we set every element as not 'expendable'

this has thei nice side effect that there are no
'-' symbols anymore

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
i know this config naming is not really intuitive,
but there are little other options

 www/manager6/lxc/SnapshotTree.js  | 3 +--
 www/manager6/qemu/SnapshotTree.js | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/www/manager6/lxc/SnapshotTree.js b/www/manager6/lxc/SnapshotTree.js
index 76e816c..c0db6b7 100644
--- a/www/manager6/lxc/SnapshotTree.js
+++ b/www/manager6/lxc/SnapshotTree.js
@@ -60,6 +60,7 @@ Ext.define('PVE.lxc.SnapshotTree', {
 			    parent_item.children.push(item);
 			    parent_item.leaf = false;
 			    parent_item.expanded = true;
+			    parent_item.expandable = false;
 			} else {
 			    root.children.push(item);
 			}
@@ -292,8 +293,6 @@ Ext.define('PVE.lxc.SnapshotTree', {
 		activate: me.reload,
 		hide: me.load_task.cancel,
 		destroy: me.load_task.cancel,
-		// disable collapse
-		beforeitemcollapse: function() { return false; },
 		itemdblclick: run_editor
 	    }
 	});
diff --git a/www/manager6/qemu/SnapshotTree.js b/www/manager6/qemu/SnapshotTree.js
index 6efa944..4e0899e 100644
--- a/www/manager6/qemu/SnapshotTree.js
+++ b/www/manager6/qemu/SnapshotTree.js
@@ -60,6 +60,7 @@ Ext.define('PVE.qemu.SnapshotTree', {
 			    parent_item.children.push(item);
 			    parent_item.leaf = false;
 			    parent_item.expanded = true;
+			    parent_item.expandable = false;
 			} else {
 			    root.children.push(item);
 			}
@@ -289,8 +290,6 @@ Ext.define('PVE.qemu.SnapshotTree', {
 		show: me.reload,
 		hide: me.load_task.cancel,
 		destroy: me.load_task.cancel,
-		// disable collapse
-		beforeitemcollapse: function() { return false; },
 		itemdblclick: run_editor
 	    }
 	});
-- 
2.1.4





More information about the pve-devel mailing list