+
+
+
+
+
+
@@ -119,9 +139,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
assert.equal(getComputedStyle(container.querySelector('#l')).visibility, 'visible', 'label has visibility:visible');
});
- test('label is floated if value is initialized to not null', function() {
+ test('label is floated if value is initialized to not null', function(done) {
var container = fixture('has-value');
- assert.notEqual(getTransform(container.querySelector('#l')), 'none', 'label has transform');
+ requestAnimationFrame(function() {
+ assert.notEqual(getTransform(container.querySelector('#l')), 'none', 'label has transform');
+ done();
+ });
});
test('label is invisible if no-label-float and value is initialized to not null', function() {
@@ -132,7 +155,36 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
test('label is floated if always-float-label is true', function() {
var container = fixture('always-float');
assert.notEqual(getTransform(container.querySelector('#l')), 'none', 'label has transform');
- })
+ });
+
+ test('label is floated correctly with a prefix', function(done) {
+ var container = fixture('prefix');
+ var label = Polymer.dom(container).querySelector('#l');
+ var input = Polymer.dom(container).querySelector('#i');
+
+ // Label is initially visible.
+ assert.equal(getComputedStyle(label).visibility, 'visible', 'label has visibility:visible');
+
+ // After entering text, the label floats, and it is not indented.
+ input.bindValue = 'foobar';
+ requestAnimationFrame(function() {
+ assert.notEqual(getTransform(label), 'none', 'label has transform');
+ assert.equal(label.getBoundingClientRect().left, container.getBoundingClientRect().left);
+ done();
+ });
+ });
+
+ test('label is floated correctly with a prefix and prefilled value', function(done) {
+ var container = fixture('prefix-has-value');
+ var label = Polymer.dom(container).querySelector('#l');
+
+ // The label floats, and it is not indented.
+ requestAnimationFrame(function() {
+ assert.notEqual(getTransform(label), 'none', 'label has transform');
+ assert.equal(label.getBoundingClientRect().left, container.getBoundingClientRect().left);
+ done();
+ });
+ });
});
diff --git a/dashboard-ui/bower_components/requirejs/.bower.json b/dashboard-ui/bower_components/requirejs/.bower.json
index 0da5fbf063..82bf926c9d 100644
--- a/dashboard-ui/bower_components/requirejs/.bower.json
+++ b/dashboard-ui/bower_components/requirejs/.bower.json
@@ -1,6 +1,6 @@
{
"name": "requirejs",
- "version": "2.1.20",
+ "version": "2.1.21",
"ignore": [],
"homepage": "http://requirejs.org",
"authors": [
@@ -15,11 +15,11 @@
"BSD-3-Clause",
"MIT"
],
- "_release": "2.1.20",
+ "_release": "2.1.21",
"_resolution": {
"type": "version",
- "tag": "2.1.20",
- "commit": "eaec2af816f2550c0a4a2b69a4f3a635aec48d29"
+ "tag": "2.1.21",
+ "commit": "3c1c4d7d6fd882e58828ab561d2a80f744167cd9"
},
"_source": "git://github.com/jrburke/requirejs-bower.git",
"_target": "~2.1.19",
diff --git a/dashboard-ui/bower_components/requirejs/bower.json b/dashboard-ui/bower_components/requirejs/bower.json
index d008e02d68..88af670ffa 100644
--- a/dashboard-ui/bower_components/requirejs/bower.json
+++ b/dashboard-ui/bower_components/requirejs/bower.json
@@ -1,6 +1,6 @@
{
"name": "requirejs",
- "version": "2.1.19",
+ "version": "2.1.21",
"ignore": [],
"homepage": "http://requirejs.org",
"authors": [
diff --git a/dashboard-ui/bower_components/requirejs/require.js b/dashboard-ui/bower_components/requirejs/require.js
index 5237640495..d69cc22971 100644
--- a/dashboard-ui/bower_components/requirejs/require.js
+++ b/dashboard-ui/bower_components/requirejs/require.js
@@ -1,5 +1,5 @@
/** vim: et:ts=4:sw=4:sts=4
- * @license RequireJS 2.1.20 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved.
+ * @license RequireJS 2.1.21 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/requirejs for details
*/
@@ -12,7 +12,7 @@ var requirejs, require, define;
(function (global) {
var req, s, head, baseElement, dataMain, src,
interactiveScript, currentlyAddingScript, mainScript, subPath,
- version = '2.1.20',
+ version = '2.1.21',
commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
jsSuffixRegExp = /\.js$/,
@@ -861,21 +861,10 @@ var requirejs, require, define;
if (this.depCount < 1 && !this.defined) {
if (isFunction(factory)) {
- //If there is an error listener, favor passing
- //to that instead of throwing an error. However,
- //only do it for define()'d modules. require
- //errbacks should not be called for failures in
- //their callbacks (#699). However if a global
- //onError is set, use that.
- if ((this.events.error && this.map.isDefine) ||
- req.onError !== defaultOnError) {
- try {
- exports = context.execCb(id, factory, depExports, exports);
- } catch (e) {
- err = e;
- }
- } else {
+ try {
exports = context.execCb(id, factory, depExports, exports);
+ } catch (e) {
+ err = e;
}
// Favor return value over exports. If node/cjs in play,
@@ -892,12 +881,30 @@ var requirejs, require, define;
}
if (err) {
- err.requireMap = this.map;
- err.requireModules = this.map.isDefine ? [this.map.id] : null;
- err.requireType = this.map.isDefine ? 'define' : 'require';
- return onError((this.error = err));
+ // If there is an error listener, favor passing
+ // to that instead of throwing an error. However,
+ // only do it for define()'d modules. require
+ // errbacks should not be called for failures in
+ // their callbacks (#699). However if a global
+ // onError is set, use that.
+ if ((this.events.error && this.map.isDefine) ||
+ req.onError !== defaultOnError) {
+ err.requireMap = this.map;
+ err.requireModules = this.map.isDefine ? [this.map.id] : null;
+ err.requireType = this.map.isDefine ? 'define' : 'require';
+ return onError((this.error = err));
+ } else if (typeof console !== 'undefined' &&
+ console.error) {
+ // Log the error for debugging. If promises could be
+ // used, this would be different, but making do.
+ console.error(err);
+ } else {
+ // Do not want to completely lose the error. While this
+ // will mess up processing and lead to similar results
+ // as bug 1440, it at least surfaces the error.
+ req.onError(err);
+ }
}
-
} else {
//Just a literal value
exports = factory;
@@ -1704,9 +1711,23 @@ var requirejs, require, define;
* Callback for script errors.
*/
onScriptError: function (evt) {
- var data = getScriptData(evt);
+ data = getScriptData(evt);
if (!hasPathFallback(data.id)) {
- return onError(makeError('scripterror', 'Script error for: ' + data.id, evt, [data.id]));
+ var parents = [];
+ eachProp(registry, function(value, key) {
+ if (key.indexOf('_@r') !== 0) {
+ each(value.depMaps, function(depMap) {
+ if (depMap.id === data.id) {
+ parents.push(key);
+ }
+ return true;
+ });
+ }
+ });
+ return onError(makeError('scripterror', 'Script error for "' + data.id +
+ (parents.length ?
+ '", needed by: ' + parents.join(', ') :
+ '"'), evt, [data.id]));
}
}
};
@@ -1933,9 +1954,9 @@ var requirejs, require, define;
//In a web worker, use importScripts. This is not a very
//efficient use of importScripts, importScripts will block until
//its script is downloaded and evaluated. However, if web workers
- //are in play, the expectation that a build has been done so that
- //only one script needs to be loaded anyway. This may need to be
- //reevaluated if other use cases become common.
+ //are in play, the expectation is that a build has been done so
+ //that only one script needs to be loaded anyway. This may need
+ //to be reevaluated if other use cases become common.
importScripts(url);
//Account for anonymous modules
diff --git a/dashboard-ui/vulcanize-out.html b/dashboard-ui/vulcanize-out.html
index 45e65347c4..b5dd26d9a0 100644
--- a/dashboard-ui/vulcanize-out.html
+++ b/dashboard-ui/vulcanize-out.html
@@ -18528,21 +18528,6 @@ is separate from validation, and `allowed-pattern` does not affect how the input
} else {
this._handleValue(this._inputElement);
}
-
- this._numberOfPrefixNodes = 0;
- this._prefixObserver = Polymer.dom(this.$.prefix).observeNodes(
- function(mutations) {
- // Keep track whether there's at least one prefix node, since it
- // affects laying out the floating label.
- this._numberOfPrefixNodes += mutations.addedNodes.length -
- mutations.removedNodes.length;
- }.bind(this));
- },
-
- detached: function() {
- if (this._prefixObserver) {
- Polymer.dom(this.$.prefix).unobserveNodes(this._prefixObserver);
- }
},
_onAddonAttached: function(event) {
@@ -18634,16 +18619,15 @@ is separate from validation, and `allowed-pattern` does not affect how the input
if (alwaysFloatLabel || _inputHasContent) {
cls += ' label-is-floating';
+ // If the label is floating, ignore any offsets that may have been
+ // applied from a prefix element.
+ this.$.labelAndInputContainer.style.position = 'static';
+
if (invalid) {
cls += ' is-invalid';
} else if (focused) {
cls += " label-is-highlighted";
}
- // If a prefix element exists, the label has a horizontal offset
- // which needs to be undone when displayed as a floating label.
- if (this._numberOfPrefixNodes > 0) {
- this.$.labelAndInputContainer.style.position = 'static';
- }
} else {
// When the label is not floating, it should overlap the input element.
if (label) {
@@ -19940,6 +19924,7 @@ is separate from validation, and `allowed-pattern` does not affect how the input
position: relative;
width: 18px;
height: 18px;
+ min-width: 18px;
vertical-align: middle;
background-color: var(--paper-checkbox-unchecked-background-color, transparent);
}
@@ -19984,31 +19969,19 @@ is separate from validation, and `allowed-pattern` does not affect how the input
@-webkit-keyframes checkmark-expand {
0% {
- top: 9px;
- left: 6px;
- width: 0px;
- height: 0px;
+ -webkit-transform: scale(0, 0) rotate(45deg);
}
100% {
- top: -1px;
- left: 4px;
- width: 5px;
- height: 10px;
+ -webkit-transform: scale(1, 1) rotate(45deg);
}
}
@keyframes checkmark-expand {
0% {
- top: 9px;
- left: 6px;
- width: 0px;
- height: 0px;
+ transform: scale(0, 0) rotate(45deg);
}
100% {
- top: -1px;
- left: 4px;
- width: 5px;
- height: 10px;
+ transform: scale(1, 1) rotate(45deg);
}
}
@@ -20018,11 +19991,7 @@ is separate from validation, and `allowed-pattern` does not affect how the input
}
#checkmark {
- -webkit-transform: rotate(45deg);
- transform: rotate(45deg);
position: absolute;
- top: -1px;
- left: 4px;
width: 5px;
height: 10px;
border-style: solid;
@@ -20031,6 +20000,8 @@ is separate from validation, and `allowed-pattern` does not affect how the input
border-right-width: 2px;
border-bottom-width: 2px;
border-color: var(--paper-checkbox-checkmark-color, white);
+ transform-origin: 97% 86%;
+ -webkit-transform-origin: 97% 86%;
}
/* label */