[pve-devel] applied: [PATCH manager] disable rules copy button if not 'in' or 'out' rule

Fabian Grünbichler f.gruenbichler at proxmox.com
Thu Nov 10 10:06:30 CET 2016


rebased and applied

On Thu, Oct 06, 2016 at 02:55:57PM +0200, Dominik Csapak wrote:
> else you could always click the button, but
> nothing would happen
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  www/manager6/grid/FirewallRules.js | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/www/manager6/grid/FirewallRules.js b/www/manager6/grid/FirewallRules.js
> index 4d151e7..aa536e2 100644
> --- a/www/manager6/grid/FirewallRules.js
> +++ b/www/manager6/grid/FirewallRules.js
> @@ -578,6 +578,9 @@ Ext.define('PVE.FirewallRules', {
>  	me.copyBtn = Ext.create('PVE.button.Button',{
>  	    text: gettext('Copy'),
>  	    selModel: sm,
> +	    enableFn: function(rec) {
> +		return (rec.data.type === 'in' || rec.data.type === 'out');
> +	    },
>  	    disabled: true,
>  	    handler: run_copy_editor,
>  	});
> -- 
> 2.1.4
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel




More information about the pve-devel mailing list