[pve-devel] applied: [PATCH widget-toolkit] override Ext.Components 'validIdRe' to include '@'

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Jul 11 14:55:58 CEST 2019


On 7/11/19 2:10 PM, Dominik Csapak wrote:
> we use itemIds with '@' already in the ceph dashboard, and in
> non-debug modeit works (as expected) but throws an error
> while using ext-all-debug.js so override it to include the '@'
> 
> the regex was in place because in html4 the 'id' tag could only consist
> letters ofthe mentioned regex, this was lifted in html5 though[0]
> 
> 0: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  Toolkit.js | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Toolkit.js b/Toolkit.js
> index abdeb64..6956a8e 100644
> --- a/Toolkit.js
> +++ b/Toolkit.js
> @@ -439,6 +439,12 @@ Ext.define(null, {
>  
>  });
>  
> +// add '@' to the valid id
> +Ext.define('Proxmox.validIdReOverride', {
> +    override: 'Ext.Component',
> +    validIdRe: /^[a-z_][a-z0-9\-_\@]*$/i,
> +});
> +
>  // force alert boxes to be rendered with an Error Icon
>  // since Ext.Msg is an object and not a prototype, we need to override it
>  // after the framework has been initiated
> 

applied, thanks!




More information about the pve-devel mailing list