[pve-devel] [PATCH manager 1/2] ui: pveWindowEdit: allow sane onlineHelp specification for edit windows

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Oct 17 14:29:20 CEST 2017


instead of heuristically choosing the onlineHelp entry from our first
item prefer the one we have in our config, if noone the fallback to
the old heuristic.

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 www/manager6/window/Edit.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/www/manager6/window/Edit.js b/www/manager6/window/Edit.js
index 9a026683..356946ed 100644
--- a/www/manager6/window/Edit.js
+++ b/www/manager6/window/Edit.js
@@ -272,10 +272,11 @@ Ext.define('PVE.window.Edit', {
 		me.buttons = [ submitBtn, resetBtn ];
 	}
 
-	if (items[0].onlineHelp) {
+	var onlineHelp = me.onlineHelp || items[0].onlineHelp;
+	if (onlineHelp) {
 	    var helpButton = Ext.create('PVE.button.Help');
 	    me.buttons.unshift(helpButton, '->');
-	    Ext.GlobalEvents.fireEvent('pveShowHelp', items[0].onlineHelp);
+	    Ext.GlobalEvents.fireEvent('pveShowHelp', onlineHelp);
 	}
 
 	Ext.applyIf(me, {
-- 
2.11.0





More information about the pve-devel mailing list