]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
override Ext.Components 'validIdRe' to include '@'
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 11 Jul 2019 12:10:30 +0000 (14:10 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 11 Jul 2019 12:37:24 +0000 (14:37 +0200)
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@proxmox.com>
Toolkit.js

index abdeb64c931f1c6171fff268407df41c703bb9fc..6956a8e14f5300b097ece5ff905d89c3568ddec3 100644 (file)
@@ -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