Comparing version 1.11.3 to 1.12.1
@@ -83,3 +83,3 @@ define(["../has", "./config", "require", "module"], function(has, config, require, module){ | ||
var rev = "$Rev: d49fdc4 $".match(/[0-9a-f]{7,}/); | ||
var rev = "$Rev: a1e2d9d $".match(/[0-9a-f]{7,}/); | ||
dojo.version = { | ||
@@ -97,3 +97,3 @@ // summary: | ||
major: 1, minor: 11, patch: 3, flag: "", | ||
major: 1, minor: 12, patch: 1, flag: "", | ||
revision: rev ? rev[0] : NaN, | ||
@@ -100,0 +100,0 @@ toString: function(){ |
@@ -17,3 +17,3 @@ define( | ||
"decimalFormat": "#,##0.###", | ||
"currencyFormat": "#,##0.00 ¤;(#,##0.00 ¤)", | ||
"currencyFormat": "#,##0.00 ¤", | ||
"plusSign": "+", | ||
@@ -20,0 +20,0 @@ "decimalFormat-long": "000 biliónov", |
@@ -188,25 +188,5 @@ define(["./sniff", "./_base/window","./dom", "./dom-style"], | ||
l = node.offsetLeft - me.l, t = node.offsetTop - me.t, p = node.parentNode, px = style.toPixelValue, pcs; | ||
if(has("mozilla")){ | ||
// Mozilla: | ||
// If offsetParent has a computed overflow != visible, the offsetLeft is decreased | ||
// by the parent's border. | ||
// We don't want to compute the parent's style, so instead we examine node's | ||
// computed left/top which is more stable. | ||
var sl = parseFloat(s.left), st = parseFloat(s.top); | ||
if(!isNaN(sl) && !isNaN(st)){ | ||
l = sl; | ||
t = st; | ||
}else{ | ||
// If child's computed left/top are not parseable as a number (e.g. "auto"), we | ||
// have no choice but to examine the parent's computed style. | ||
if(p && p.style){ | ||
pcs = style.getComputedStyle(p); | ||
if(pcs.overflow != "visible"){ | ||
l += pcs.borderLeftStyle != none ? px(node, pcs.borderLeftWidth) : 0; | ||
t += pcs.borderTopStyle != none ? px(node, pcs.borderTopWidth) : 0; | ||
} | ||
} | ||
} | ||
}else if(has("opera") || (has("ie") == 8 && !has("quirks"))){ | ||
// On Opera and IE 8, offsetLeft/Top includes the parent's border | ||
if((has("ie") == 8 && !has("quirks"))){ | ||
// IE 8 offsetLeft/Top includes the parent's border | ||
if(p){ | ||
@@ -239,16 +219,22 @@ pcs = style.getComputedStyle(p); | ||
var s = computedStyle || style.getComputedStyle(node), w = node.clientWidth, h, | ||
pe = geom.getPadExtents(node, s), be = geom.getBorderExtents(node, s); | ||
pe = geom.getPadExtents(node, s), be = geom.getBorderExtents(node, s), l = node.offsetLeft + pe.l + be.l, | ||
t = node.offsetTop + pe.t + be.t; | ||
if(!w){ | ||
w = node.offsetWidth; | ||
h = node.offsetHeight; | ||
w = node.offsetWidth - be.w; | ||
h = node.offsetHeight - be.h; | ||
}else{ | ||
h = node.clientHeight; | ||
be.w = be.h = 0; | ||
} | ||
// On Opera, offsetLeft includes the parent's border | ||
if(has("opera")){ | ||
pe.l += be.l; | ||
pe.t += be.t; | ||
if((has("ie") == 8 && !has("quirks"))){ | ||
// IE 8 offsetLeft/Top includes the parent's border | ||
var p = node.parentNode, px = style.toPixelValue, pcs; | ||
if(p){ | ||
pcs = style.getComputedStyle(p); | ||
l -= pcs.borderLeftStyle != none ? px(node, pcs.borderLeftWidth) : 0; | ||
t -= pcs.borderTopStyle != none ? px(node, pcs.borderTopWidth) : 0; | ||
} | ||
} | ||
return {l: pe.l, t: pe.t, w: w - pe.w - be.w, h: h - pe.h - be.h}; | ||
return {l: l, t: t, w: w - pe.w, h: h - pe.h}; | ||
}; | ||
@@ -255,0 +241,0 @@ |
{ | ||
"name": "dojo", | ||
"version": "1.11.3", | ||
"version": "1.12.1", | ||
"directories": { | ||
@@ -14,3 +14,3 @@ "lib": "." | ||
"sinon": "1.12.2", | ||
"dojo": "1.11.3" | ||
"dojo": "1.12.1" | ||
}, | ||
@@ -17,0 +17,0 @@ "main": "main", |
@@ -151,3 +151,9 @@ define([ | ||
} | ||
return transform(value, key).toString(); | ||
var result = transform(value, key); | ||
if (typeof result === 'undefined') { | ||
throw new Error('string.substitute could not find key "' + key + '" in template'); | ||
} | ||
return result.toString(); | ||
}); // String | ||
@@ -154,0 +160,0 @@ }; |
@@ -42,6 +42,8 @@ define([ | ||
); | ||
}, | ||
'missing key': function () { | ||
assert.throws(function () { | ||
string.substitute('${x}', { y: 1 }); | ||
}); | ||
}, /^string\.substitute could not find key "\w+" in template$/); | ||
}, | ||
@@ -48,0 +50,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4621500
137417