},
HttpProxyText: gettext('Example') + ": http://username:password@host:port/",
+ CpuSet: function(v) {
+ return Proxmox.Utils.CpuSet_match.test(v);
+ },
+ CpuSetText: gettext('This is not a valid CpuSet'),
+
DnsName: function(v) {
return Proxmox.Utils.DnsName_match.test(v);
},
},
DnsNameOrWildcardText: gettext('This is not a valid DNS name'),
- // workaround for https://www.sencha.com/forum/showthread.php?302150
+ // email regex used by pve-common
proxmoxMail: function(v) {
- return (/^(\w+)([-+.][\w]+)*@(\w[-\w]*\.){1,5}([A-Za-z]){2,63}$/).test(v);
+ return (/^[\w+-~]+(\.[\w+-~]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*$/).test(v);
},
proxmoxMailText: gettext('Example') + ": user@example.com",
},
});
+// Fix text selection on drag when using DragZone,
+// see https://forum.sencha.com/forum/showthread.php?335100
+Ext.define('Proxmox.dd.DragDropManager', {
+ override: 'Ext.dd.DragDropManager',
+
+ stopEvent: function(e) {
+ if (this.stopPropagation) {
+ e.stopPropagation();
+ }
+
+ if (this.preventDefault) {
+ e.preventDefault();
+ }
+ },
+});
+
// 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