[pve-devel] [PATCH pve-manager 2/5] Add support for onlineHelp in Creation Wizard

Dominik Csapak d.csapak at proxmox.com
Tue May 31 14:13:04 CEST 2016


> Inside a wizard, switching to a new tab will fire
> the 'activate' event to the new tab, causing
> the inputPanel of this tab to display its help in
> the wizard window.
>
> Before switching tab, we hide the current help button.
> ---
>   www/manager6/window/Wizard.js | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/www/manager6/window/Wizard.js b/www/manager6/window/Wizard.js
> index d6e22c1..12eac7d 100644
> --- a/www/manager6/window/Wizard.js
> +++ b/www/manager6/window/Wizard.js
> @@ -65,6 +65,10 @@ Ext.define('PVE.window.Wizard', {
>   	    region: 'south',
>   	    margins: '0 5 5 5',
>   	    items: [
> +		{
> +		    xtype: 'pveHelpButton',
> +		    itemId: 'help'
> +		},
>   		'->',
>   		{
>   		    text: gettext('Back'),
> @@ -80,6 +84,7 @@ Ext.define('PVE.window.Wizard', {
>   			}
>   			var ntab = tp.items.getAt(prev);
>   			if (ntab) {
> +			    me.down('#help').hide();
>   			    tp.setActiveTab(ntab);
>   			}
>   
> @@ -104,6 +109,7 @@ Ext.define('PVE.window.Wizard', {
>   			var next = tp.items.indexOf(atab) + 1;
>   			var ntab = tp.items.getAt(next);
>   			if (ntab) {
> +			    me.down('#help').hide();
>   			    ntab.enable();
>   			    tp.setActiveTab(ntab);
>   			}

this only hides the button on the back/next button,
not when you click directly on the tab (e.g. CD/DVD)




More information about the pve-devel mailing list