[pve-devel] [PATCH 02/10] resource tree : display template icon is vm is a template

Alexandre Derumier aderumier at odiso.com
Tue Jan 22 10:14:04 CET 2013


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 www/manager/tree/ResourceTree.js |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/www/manager/tree/ResourceTree.js b/www/manager/tree/ResourceTree.js
index a640124..56ab0a6 100644
--- a/www/manager/tree/ResourceTree.js
+++ b/www/manager/tree/ResourceTree.js
@@ -86,11 +86,9 @@ Ext.define('PVE.tree.ResourceTree', {
 
 	var defaults = PVE.tree.ResourceTree.typeDefaults[info.type];
 	if (defaults && defaults.iconCls) {
-	    if (info.running) {
-		info.iconCls = defaults.iconCls + "-running";
-	    } else {
-		info.iconCls = defaults.iconCls;
-	    }
+	    var running = info.running ? '-running' : '';
+	    var template = info.template ? '-template' : '';
+	    info.iconCls = defaults.iconCls + running + template;
 	}
     },
 
-- 
1.7.10.4




More information about the pve-devel mailing list