[pve-devel] [PATCH manager 1/7] ext6migrate: fix Console butten text (again)

Dominik Csapak d.csapak at proxmox.com
Wed Mar 16 15:58:09 CET 2016


since sometimes, we set the text of the console button
('shell' or 'upgrade')
we do not want to override this everytime, but only
when me.text === null

we cannot use applyIf either, because this overwrites only
if the field is undefined, not null

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/button/ConsoleButton.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/www/manager6/button/ConsoleButton.js b/www/manager6/button/ConsoleButton.js
index f2513a1..c4ce345 100644
--- a/www/manager6/button/ConsoleButton.js
+++ b/www/manager6/button/ConsoleButton.js
@@ -42,7 +42,9 @@ Ext.define('PVE.button.ConsoleButton', {
 	    }
 	});
 
-	Ext.apply(me, { text: gettext('Console') });
+	if (me.text === null) {
+	    me.text = gettext('Console');
+	}
 
 	Ext.apply(me, {
 	    handler: function() {
-- 
2.1.4





More information about the pve-devel mailing list