CBind.js: ignore case in regex

This commit is contained in:
Dietmar Maurer 2017-03-31 12:26:33 +02:00
parent 281ad45b5d
commit fbdf4ca751

View File

@ -36,13 +36,13 @@ Ext.define('Proxmox.Mixin.CBind', {
cdata = cbind[prop]; cdata = cbind[prop];
found = false; found = false;
if (match = /^\{(!)?([a-z_][a-z0-9_]*)\}$/.exec(cdata)) { if (match = /^\{(!)?([a-z_][a-z0-9_]*)\}$/i.exec(cdata)) {
var cvalue = getConfigValue(match[2]); var cvalue = getConfigValue(match[2]);
if (match[1]) cvalue = !cvalue; if (match[1]) cvalue = !cvalue;
obj[prop] = cvalue; obj[prop] = cvalue;
found = true; found = true;
} else { } else {
obj[prop] = cdata.replace(/{([a-z_][a-z0-9_]*)\}/g, function(match, cname) { obj[prop] = cdata.replace(/{([a-z_][a-z0-9_]*)\}/ig, function(match, cname) {
var cvalue = getConfigValue(cname); var cvalue = getConfigValue(cname);
found = true; found = true;
return cvalue; return cvalue;