After rethinking this I'd rather put 2/8 and 3/8 on hold. It could possibly annoy some users if now there's now a button which has dynamic size and while the text we'd show was got by a reasonable way it does not guarantees that there's always a Help Chapter with the exact cards category topic, even if onlineHelp is set, so not really sure if this really would reduce the confusion, we always have the tooltips which should help already.
On 10/17/2017 11:48 AM, Thomas Lamprecht wrote: > If there is a onlöineHelp set for the current active card then use > the card title, which is already translated and limited in length. > Else fall back to our parents onlineHelpTitle as we do that with the > help topic itself to, if not set just 'Help' gets displayed. > > Signed-off-by: Thomas Lamprecht <t.lampre...@proxmox.com> > Acked-by: Dominik Csapak <d.csa...@proxmox.com> > --- > www/manager6/button/HelpButton.js | 12 +++++++++--- > www/manager6/panel/ConfigPanel.js | 6 +++++- > 2 files changed, 14 insertions(+), 4 deletions(-) > > diff --git a/www/manager6/button/HelpButton.js > b/www/manager6/button/HelpButton.js > index 048a7d39..4fd3d163 100644 > --- a/www/manager6/button/HelpButton.js > +++ b/www/manager6/button/HelpButton.js > @@ -36,9 +36,8 @@ Ext.define('PVE.button.Help', { > } > }, > > - // this sets the link and > - // sets the tooltip text > - setOnlineHelp:function(blockid) { > + // this sets the link and the tooltip text > + setOnlineHelp:function(blockid, category) { > var me = this; > > var info = pveOnlineHelpInfo[blockid]; > @@ -49,6 +48,13 @@ Ext.define('PVE.button.Help', { > title += ' - ' + info.subtitle; > } > me.setTooltip(title); > + > + var text = gettext('Help'); > + if (category) { > + // category should be already localised > + text += ' (' + category + ')'; > + } > + me.setText(text); > } > }, > > diff --git a/www/manager6/panel/ConfigPanel.js > b/www/manager6/panel/ConfigPanel.js > index c659af21..14478daa 100644 > --- a/www/manager6/panel/ConfigPanel.js > +++ b/www/manager6/panel/ConfigPanel.js > @@ -128,7 +128,11 @@ Ext.define('PVE.panel.Config', { > if (me.savedItems[cardid]) { > var curcard = me.getLayout().getActiveItem(); > var newcard = me.add(me.savedItems[cardid]); > - me.helpButton.setOnlineHelp(newcard.onlineHelp || me.onlineHelp); > + if (newcard.onlineHelp) { > + me.helpButton.setOnlineHelp(newcard.onlineHelp, newcard.title); > + } else { > + me.helpButton.setOnlineHelp(me.onlineHelp); > + } > if (curcard) { > me.setActiveItem(cardid); > me.remove(curcard, true); > _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel