]> git.proxmox.com Git - pve-manager.git/blame - www/manager6/Toolkit.js
Extend the .gitignore(s)
[pve-manager.git] / www / manager6 / Toolkit.js
CommitLineData
52e4096b
DM
1// ExtJS related things
2
e7ade592 3Proxmox.Utils.toolkit = 'extjs';
52e4096b 4
21026cce 5// custom PVE specific VTypes
52e4096b 6Ext.apply(Ext.form.field.VTypes, {
52e4096b
DM
7
8 QemuStartDate: function(v) {
9 return (/^(now|\d{4}-\d{1,2}-\d{1,2}(T\d{1,2}:\d{1,2}:\d{1,2})?)$/).test(v);
10 },
f6673991
DC
11 QemuStartDateText: gettext('Format') + ': "now" or "2006-06-17T16:01:21" or "2006-06-17"',
12 IP64AddressList: function(v) {
13 var list = v.split(/[\ \,\;]+/);
14 var i;
15 for (i = 0; i < list.length; i++) {
16 if (list[i] == '') {
17 continue;
18 }
52e4096b 19
f6673991
DC
20 if (!Proxmox.Utils.IP64_match.test(list[i])) {
21 return false;
22 }
23 }
24
25 return true;
26 },
27 IP64AddressListText: gettext('Example') + ': 192.168.1.1,192.168.1.2',
28 IP64AddressListMask: /[A-Fa-f0-9\,\:\.\;\ ]/
52e4096b 29});