fix forgot password page
This commit is contained in:
parent
9b20e2c860
commit
171f241ac3
18 changed files with 1037 additions and 78 deletions
|
@ -27,14 +27,14 @@
|
|||
"web-component-tester": "*",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"homepage": "https://github.com/polymerelements/iron-resizable-behavior",
|
||||
"homepage": "https://github.com/PolymerElements/iron-resizable-behavior",
|
||||
"_release": "1.0.2",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.2",
|
||||
"commit": "85de8ba28be2bf17c81d6436ef1119022b003674"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/iron-resizable-behavior.git",
|
||||
"_source": "git://github.com/PolymerElements/iron-resizable-behavior.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "polymerelements/iron-resizable-behavior"
|
||||
"_originalSource": "PolymerElements/iron-resizable-behavior"
|
||||
}
|
45
dashboard-ui/bower_components/paper-radio-button/.bower.json
vendored
Normal file
45
dashboard-ui/bower_components/paper-radio-button/.bower.json
vendored
Normal file
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
"name": "paper-radio-button",
|
||||
"version": "1.0.5",
|
||||
"description": "A material design radio button",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"polymer",
|
||||
"radio",
|
||||
"control"
|
||||
],
|
||||
"private": true,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/paper-radio-button"
|
||||
},
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"homepage": "https://github.com/PolymerElements/paper-radio-button",
|
||||
"ignore": [],
|
||||
"dependencies": {
|
||||
"paper-ripple": "PolymerElements/paper-ripple#^1.0.0",
|
||||
"paper-styles": "PolymerLabs/paper-styles#^1.0.0",
|
||||
"paper-behaviors": "PolymerElements/paper-behaviors#^1.0.0",
|
||||
"polymer": "Polymer/polymer#^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"web-component-tester": "*",
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"_release": "1.0.5",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.5",
|
||||
"commit": "05cd3c675d1e807362d2e72c83d3ae34c5d120a9"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/paper-radio-button.git",
|
||||
"_target": "~1.0.5",
|
||||
"_originalSource": "PolymerElements/paper-radio-button",
|
||||
"_direct": true
|
||||
}
|
1
dashboard-ui/bower_components/paper-radio-button/.gitignore
vendored
Normal file
1
dashboard-ui/bower_components/paper-radio-button/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
bower_components
|
35
dashboard-ui/bower_components/paper-radio-button/bower.json
vendored
Normal file
35
dashboard-ui/bower_components/paper-radio-button/bower.json
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"name": "paper-radio-button",
|
||||
"version": "1.0.5",
|
||||
"description": "A material design radio button",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"polymer",
|
||||
"radio",
|
||||
"control"
|
||||
],
|
||||
"private": true,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/paper-radio-button"
|
||||
},
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"homepage": "https://github.com/PolymerElements/paper-radio-button",
|
||||
"ignore": [],
|
||||
"dependencies": {
|
||||
"paper-ripple": "PolymerElements/paper-ripple#^1.0.0",
|
||||
"paper-styles": "PolymerLabs/paper-styles#^1.0.0",
|
||||
"paper-behaviors": "PolymerElements/paper-behaviors#^1.0.0",
|
||||
"polymer": "Polymer/polymer#^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"web-component-tester": "*",
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
}
|
||||
}
|
93
dashboard-ui/bower_components/paper-radio-button/demo/index.html
vendored
Normal file
93
dashboard-ui/bower_components/paper-radio-button/demo/index.html
vendored
Normal file
|
@ -0,0 +1,93 @@
|
|||
<!doctype html>
|
||||
<!--
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>paper-radio-button demo</title>
|
||||
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<link rel="import" href="../../paper-styles/demo-pages.html">
|
||||
<link rel="import" href="../paper-radio-button.html">
|
||||
|
||||
<style is="custom-style">
|
||||
paper-radio-button {
|
||||
display: block;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
paper-radio-button.blue {
|
||||
--paper-radio-button-checked-color: var(--paper-light-blue-500);
|
||||
--paper-radio-button-checked-ink-color: var(--paper-light-blue-500);
|
||||
--paper-radio-button-unchecked-color: var(--paper-light-blue-900);
|
||||
--paper-radio-button-unchecked-ink-color: var(--paper-light-blue-900);
|
||||
}
|
||||
|
||||
paper-radio-button.red {
|
||||
--paper-radio-button-checked-color: var(--paper-red-500);
|
||||
--paper-radio-button-checked-ink-color: var(--paper-red-500);
|
||||
--paper-radio-button-unchecked-color: var(--paper-red-900);
|
||||
--paper-radio-button-unchecked-ink-color: var(--paper-red-900);
|
||||
}
|
||||
|
||||
paper-radio-button.green {
|
||||
--paper-radio-button-checked-color: var(--paper-green-500);
|
||||
--paper-radio-button-checked-ink-color: var(--paper-green-500);
|
||||
--paper-radio-button-unchecked-color: var(--paper-green-900);
|
||||
--paper-radio-button-unchecked-ink-color: var(--paper-green-900);
|
||||
}
|
||||
|
||||
paper-radio-button.orange {
|
||||
--paper-radio-button-checked-color: var(--paper-orange-500);
|
||||
--paper-radio-button-checked-ink-color: var(--paper-orange-500);
|
||||
--paper-radio-button-unchecked-color: var(--paper-orange-900);
|
||||
--paper-radio-button-unchecked-ink-color: var(--paper-orange-900);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body unresolved>
|
||||
<div class="horizontal-section-container">
|
||||
<div>
|
||||
<h4>Enabled</h4>
|
||||
<div class="horizontal-section">
|
||||
<paper-radio-button>Oxygen</paper-radio-button>
|
||||
<paper-radio-button>Carbon</paper-radio-button>
|
||||
<paper-radio-button checked>Hydrogen</paper-radio-button>
|
||||
<paper-radio-button checked>Nitrogen</paper-radio-button>
|
||||
<paper-radio-button checked>Calcium</paper-radio-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4>Disabled</h4>
|
||||
<div class="horizontal-section">
|
||||
<paper-radio-button disabled>Oxygen</paper-radio-button>
|
||||
<paper-radio-button disabled>Carbon</paper-radio-button>
|
||||
<paper-radio-button checked disabled>Hydrogen</paper-radio-button>
|
||||
<paper-radio-button checked disabled>Nitrogen</paper-radio-button>
|
||||
<paper-radio-button checked disabled>Calcium</paper-radio-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4>Color</h4>
|
||||
<div class="horizontal-section">
|
||||
<paper-radio-button class="blue" checked>Oxygen</paper-radio-button>
|
||||
<paper-radio-button class="red" checked>Carbon</paper-radio-button>
|
||||
<paper-radio-button class="orange" checked>Hydrogen</paper-radio-button>
|
||||
<paper-radio-button class="green" checked>Nitrogen</paper-radio-button>
|
||||
<paper-radio-button class="blue" checked>Calcium</paper-radio-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
22
dashboard-ui/bower_components/paper-radio-button/hero.svg
vendored
Normal file
22
dashboard-ui/bower_components/paper-radio-button/hero.svg
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
|
||||
<g id="background" display="none">
|
||||
<rect display="inline" fill="#B0BEC5" width="225" height="126"/>
|
||||
</g>
|
||||
<g id="label">
|
||||
</g>
|
||||
<g id="art">
|
||||
<g>
|
||||
<circle cx="112.5" cy="63" r="8"/>
|
||||
<path d="M112.5,80c-9.4,0-17-7.6-17-17s7.6-17,17-17s17,7.6,17,17S121.9,80,112.5,80z M112.5,48c-8.3,0-15,6.7-15,15s6.7,15,15,15
|
||||
s15-6.7,15-15S120.8,48,112.5,48z"/>
|
||||
</g>
|
||||
<g id="ic_x5F_add_x0D_">
|
||||
</g>
|
||||
</g>
|
||||
<g id="Guides">
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 848 B |
29
dashboard-ui/bower_components/paper-radio-button/index.html
vendored
Normal file
29
dashboard-ui/bower_components/paper-radio-button/index.html
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
<!doctype html>
|
||||
<!--
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
|
||||
|
||||
<title>paper-radio-button</title>
|
||||
|
||||
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
|
||||
<link rel="import" href="../polymer/polymer.html">
|
||||
<link rel="import" href="../iron-component-page/iron-component-page.html">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<iron-component-page></iron-component-page>
|
||||
|
||||
</body>
|
||||
</html>
|
111
dashboard-ui/bower_components/paper-radio-button/paper-radio-button.css
vendored
Normal file
111
dashboard-ui/bower_components/paper-radio-button/paper-radio-button.css
vendored
Normal file
|
@ -0,0 +1,111 @@
|
|||
/*
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
*/
|
||||
|
||||
:host {
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
:host(:focus) {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#radioContainer {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
:host #ink {
|
||||
position: absolute;
|
||||
top: -16px;
|
||||
left: -16px;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
color: var(--paper-radio-button-unchecked-ink-color, --primary-text-color);
|
||||
opacity: 0.6;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
:host #ink[checked] {
|
||||
color: var(--paper-radio-button-checked-ink-color, --default-primary-color);
|
||||
}
|
||||
|
||||
:host #offRadio {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 50%;
|
||||
border: solid 2px;
|
||||
background-color: var(--paper-radio-button-unchecked-background-color, transparent);
|
||||
border-color: var(--paper-radio-button-unchecked-color, --primary-text-color);
|
||||
transition: border-color 0.28s;
|
||||
}
|
||||
|
||||
:host #onRadio {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left: 4px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background-color: var(--paper-radio-button-checked-color, --default-primary-color);
|
||||
-webkit-transform: scale(0);
|
||||
transform: scale(0);
|
||||
transition: -webkit-transform ease 0.28s;
|
||||
transition: transform ease 0.28s;
|
||||
}
|
||||
|
||||
:host([checked]) #offRadio {
|
||||
border-color: var(--paper-radio-button-checked-color, --default-primary-color);
|
||||
}
|
||||
|
||||
:host([checked]) #onRadio {
|
||||
-webkit-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
#radioLabel {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-left: 10px;
|
||||
white-space: normal;
|
||||
pointer-events: none;
|
||||
color: var(--paper-radio-button-label-color, --primary-text-color);
|
||||
}
|
||||
|
||||
#radioLabel[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* disabled state */
|
||||
:host([disabled]) {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
:host([disabled]) #offRadio {
|
||||
border-color: var(--paper-radio-button-unchecked-color, --primary-text-color);
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
:host([disabled][checked]) #onRadio {
|
||||
background-color: var(--paper-radio-button-unchecked-color, --primary-text-color);
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
:host([disabled]) #radioLabel {
|
||||
/* slightly darker than the button, so that it's readable */
|
||||
opacity: 0.65;
|
||||
}
|
138
dashboard-ui/bower_components/paper-radio-button/paper-radio-button.html
vendored
Normal file
138
dashboard-ui/bower_components/paper-radio-button/paper-radio-button.html
vendored
Normal file
|
@ -0,0 +1,138 @@
|
|||
<!--
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
|
||||
<link rel="import" href="../polymer/polymer.html">
|
||||
<link rel="import" href="../paper-ripple/paper-ripple.html">
|
||||
<link rel="import" href="../paper-styles/default-theme.html">
|
||||
<link rel="import" href="../paper-behaviors/paper-inky-focus-behavior.html">
|
||||
|
||||
<!--
|
||||
`paper-radio-button` is a button that can be either checked or unchecked.
|
||||
User can tap the radio button to check or uncheck it.
|
||||
|
||||
Use a `<paper-radio-group>` to group a set of radio buttons. When radio buttons
|
||||
are inside a radio group, exactly one radio button in the group can be checked
|
||||
at any time.
|
||||
|
||||
Example:
|
||||
|
||||
<paper-radio-button></paper-radio-button>
|
||||
<paper-radio-button>Item label</paper-radio-button>
|
||||
|
||||
### Styling
|
||||
|
||||
The following custom properties and mixins are available for styling:
|
||||
|
||||
Custom property | Description | Default
|
||||
----------------|-------------|----------
|
||||
`--paper-radio-button-unchecked-background-color` | Radio button background color when the input is not checked | `transparent`
|
||||
`--paper-radio-button-unchecked-color` | Radio button color when the input is not checked | `--primary-text-color`
|
||||
`--paper-radio-button-unchecked-ink-color` | Selected/focus ripple color when the input is not checked | `--primary-text-color`
|
||||
`--paper-radio-button-checked-color` | Radio button color when the input is checked | `--default-primary-color`
|
||||
`--paper-radio-button-checked-ink-color` | Selected/focus ripple color when the input is checked | `--default-primary-color`
|
||||
`--paper-radio-button-label-color` | Label color | `--primary-text-color`
|
||||
|
||||
@group Paper Elements
|
||||
@element paper-radio-button
|
||||
@hero hero.svg
|
||||
@demo demo/index.html
|
||||
-->
|
||||
|
||||
<dom-module id="paper-radio-button">
|
||||
|
||||
<link rel="import" type="css" href="paper-radio-button.css">
|
||||
|
||||
<template>
|
||||
|
||||
<div id="radioContainer">
|
||||
<div id="offRadio"></div>
|
||||
<div id="onRadio"></div>
|
||||
<paper-ripple id="ink" class="circle" center checked$="[[checked]]"></paper-ripple>
|
||||
</div>
|
||||
|
||||
<div id="radioLabel" aria-hidden="true"><content></content></div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
Polymer({
|
||||
is: 'paper-radio-button',
|
||||
|
||||
behaviors: [
|
||||
Polymer.PaperInkyFocusBehavior
|
||||
],
|
||||
|
||||
hostAttributes: {
|
||||
role: 'radio',
|
||||
'aria-checked': false,
|
||||
tabindex: 0
|
||||
},
|
||||
|
||||
properties: {
|
||||
/**
|
||||
* Fired when the checked state changes due to user interaction.
|
||||
*
|
||||
* @event change
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fired when the checked state changes.
|
||||
*
|
||||
* @event iron-change
|
||||
*/
|
||||
|
||||
/**
|
||||
* Gets or sets the state, `true` is checked and `false` is unchecked.
|
||||
*/
|
||||
checked: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
reflectToAttribute: true,
|
||||
notify: true,
|
||||
observer: '_checkedChanged'
|
||||
},
|
||||
|
||||
/**
|
||||
* If true, the button toggles the active state with each tap or press
|
||||
* of the spacebar.
|
||||
*/
|
||||
toggles: {
|
||||
type: Boolean,
|
||||
value: true,
|
||||
reflectToAttribute: true
|
||||
}
|
||||
},
|
||||
|
||||
ready: function() {
|
||||
if (Polymer.dom(this).textContent == '') {
|
||||
this.$.radioLabel.hidden = true;
|
||||
} else {
|
||||
this.setAttribute('aria-label', Polymer.dom(this).textContent);
|
||||
}
|
||||
this._isReady = true;
|
||||
},
|
||||
|
||||
_buttonStateChanged: function() {
|
||||
if (this.disabled) {
|
||||
return;
|
||||
}
|
||||
if (this._isReady) {
|
||||
this.checked = this.active;
|
||||
}
|
||||
},
|
||||
|
||||
_checkedChanged: function() {
|
||||
this.setAttribute('aria-checked', this.checked ? 'true' : 'false');
|
||||
this.active = this.checked;
|
||||
this.fire('iron-change');
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
</dom-module>
|
101
dashboard-ui/bower_components/paper-radio-button/test/basic.html
vendored
Normal file
101
dashboard-ui/bower_components/paper-radio-button/test/basic.html
vendored
Normal file
|
@ -0,0 +1,101 @@
|
|||
<!doctype html>
|
||||
<!--
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>paper-radio-button basic tests</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
<script src="../../test-fixture/test-fixture-mocha.js"></script>
|
||||
<script src="../../iron-test-helpers/mock-interactions.js"></script>
|
||||
|
||||
<link rel="import" href="../../test-fixture/test-fixture.html">
|
||||
<link rel="import" href="../paper-radio-button.html">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<test-fixture id="NoLabel">
|
||||
<template>
|
||||
<paper-radio-button id="radio1"></paper-radio-button>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="WithLabel">
|
||||
<template>
|
||||
<paper-radio-button id="radio2">Batman</paper-radio-button>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<script>
|
||||
suite('defaults', function() {
|
||||
var r1;
|
||||
|
||||
setup(function() {
|
||||
r1 = fixture('NoLabel');
|
||||
});
|
||||
|
||||
test('check button via click', function() {
|
||||
r1.addEventListener('click', function() {
|
||||
assert.isTrue(r1.getAttribute('aria-checked'));
|
||||
assert.isTrue(r1.checked);
|
||||
done();
|
||||
});
|
||||
MockInteractions.down(r1);
|
||||
});
|
||||
|
||||
test('toggle button via click', function() {
|
||||
r1.checked = true;
|
||||
r1.addEventListener('click', function() {
|
||||
assert.isFalse(r1.getAttribute('aria-checked'));
|
||||
assert.isFalse(r1.checked);
|
||||
done();
|
||||
});
|
||||
MockInteractions.down(r1);
|
||||
});
|
||||
|
||||
test('disabled button cannot be clicked', function() {
|
||||
r1.disabled = true;
|
||||
r1.addEventListener('click', function() {
|
||||
assert.isTrue(r1.getAttribute('aria-checked'));
|
||||
assert.isTrue(r1.checked);
|
||||
done();
|
||||
});
|
||||
MockInteractions.down(r1);
|
||||
});
|
||||
});
|
||||
|
||||
suite('a11y', function() {
|
||||
var r1;
|
||||
var r2;
|
||||
|
||||
setup(function() {
|
||||
r1 = fixture('NoLabel');
|
||||
r2 = fixture('WithLabel');
|
||||
});
|
||||
|
||||
test('has aria role "radio"', function() {
|
||||
assert.isTrue(r1.getAttribute('role') == 'radio');
|
||||
assert.isTrue(r2.getAttribute('role') == 'radio');
|
||||
});
|
||||
|
||||
test('button with no label has no aria label', function() {
|
||||
assert.isTrue(!r1.getAttribute('aria-label'));
|
||||
});
|
||||
|
||||
test('button with a label sets an aria label', function() {
|
||||
assert.isTrue(r2.getAttribute('aria-label') == "Batman");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
24
dashboard-ui/bower_components/paper-radio-button/test/index.html
vendored
Normal file
24
dashboard-ui/bower_components/paper-radio-button/test/index.html
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
<!doctype html>
|
||||
<!--
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
|
||||
<title>paper-radio-button tests</title>
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
WCT.loadSuites([
|
||||
'basic.html'
|
||||
]);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "requirejs",
|
||||
"version": "2.1.19",
|
||||
"version": "2.1.20",
|
||||
"ignore": [],
|
||||
"homepage": "http://requirejs.org",
|
||||
"authors": [
|
||||
"jrburke.com"
|
||||
|
@ -14,14 +15,13 @@
|
|||
"BSD-3-Clause",
|
||||
"MIT"
|
||||
],
|
||||
"_release": "2.1.19",
|
||||
"_release": "2.1.20",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "2.1.19",
|
||||
"commit": "0616d2b7899c058419342c6dff56ca6ad9f04955"
|
||||
"tag": "2.1.20",
|
||||
"commit": "eaec2af816f2550c0a4a2b69a4f3a635aec48d29"
|
||||
},
|
||||
"_source": "git://github.com/jrburke/requirejs-bower.git",
|
||||
"_target": "~2.1.19",
|
||||
"_originalSource": "requirejs",
|
||||
"_direct": true
|
||||
"_originalSource": "requirejs"
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "requirejs",
|
||||
"version": "2.1.19",
|
||||
"ignore": [],
|
||||
"homepage": "http://requirejs.org",
|
||||
"authors": [
|
||||
"jrburke.com"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/** vim: et:ts=4:sw=4:sts=4
|
||||
* @license RequireJS 2.1.19 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved.
|
||||
* @license RequireJS 2.1.20 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.19',
|
||||
version = '2.1.20',
|
||||
commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
|
||||
cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
|
||||
jsSuffixRegExp = /\.js$/,
|
||||
|
@ -21,7 +21,6 @@ var requirejs, require, define;
|
|||
ostring = op.toString,
|
||||
hasOwn = op.hasOwnProperty,
|
||||
ap = Array.prototype,
|
||||
apsp = ap.splice,
|
||||
isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document),
|
||||
isWebWorker = !isBrowser && typeof importScripts !== 'undefined',
|
||||
//PS3 indicates loaded and complete, but need to wait for complete
|
||||
|
@ -554,11 +553,13 @@ var requirejs, require, define;
|
|||
function takeGlobalQueue() {
|
||||
//Push all the globalDefQueue items into the context's defQueue
|
||||
if (globalDefQueue.length) {
|
||||
//Array splice in the values since the context code has a
|
||||
//local var ref to defQueue, so cannot just reassign the one
|
||||
//on context.
|
||||
apsp.apply(defQueue,
|
||||
[defQueue.length, 0].concat(globalDefQueue));
|
||||
each(globalDefQueue, function(queueItem) {
|
||||
var id = queueItem[0];
|
||||
if (typeof id === 'string') {
|
||||
context.defQueueMap[id] = true;
|
||||
}
|
||||
defQueue.push(queueItem);
|
||||
});
|
||||
globalDefQueue = [];
|
||||
}
|
||||
}
|
||||
|
@ -845,7 +846,10 @@ var requirejs, require, define;
|
|||
factory = this.factory;
|
||||
|
||||
if (!this.inited) {
|
||||
this.fetch();
|
||||
// Only fetch if not already in the defQueue.
|
||||
if (!hasProp(context.defQueueMap, id)) {
|
||||
this.fetch();
|
||||
}
|
||||
} else if (this.error) {
|
||||
this.emit('error', this.error);
|
||||
} else if (!this.defining) {
|
||||
|
@ -1244,6 +1248,7 @@ var requirejs, require, define;
|
|||
callGetModule(args);
|
||||
}
|
||||
}
|
||||
context.defQueueMap = {};
|
||||
}
|
||||
|
||||
context = {
|
||||
|
@ -1253,6 +1258,7 @@ var requirejs, require, define;
|
|||
defined: defined,
|
||||
urlFetched: urlFetched,
|
||||
defQueue: defQueue,
|
||||
defQueueMap: {},
|
||||
Module: Module,
|
||||
makeModuleMap: makeModuleMap,
|
||||
nextTick: req.nextTick,
|
||||
|
@ -1502,6 +1508,7 @@ var requirejs, require, define;
|
|||
defQueue.splice(i, 1);
|
||||
}
|
||||
});
|
||||
delete context.defQueueMap[id];
|
||||
|
||||
if (mod) {
|
||||
//Hold on to listeners in case the
|
||||
|
@ -1563,6 +1570,7 @@ var requirejs, require, define;
|
|||
|
||||
callGetModule(args);
|
||||
}
|
||||
context.defQueueMap = {};
|
||||
|
||||
//Do this after the cycle of callGetModule in case the result
|
||||
//of those calls/init calls changes the registry.
|
||||
|
@ -2067,7 +2075,12 @@ var requirejs, require, define;
|
|||
//where the module name is not known until the script onload event
|
||||
//occurs. If no context, use the global queue, and get it processed
|
||||
//in the onscript load callback.
|
||||
(context ? context.defQueue : globalDefQueue).push([name, deps, callback]);
|
||||
if (context) {
|
||||
context.defQueue.push([name, deps, callback]);
|
||||
context.defQueueMap[name] = true;
|
||||
} else {
|
||||
globalDefQueue.push([name, deps, callback]);
|
||||
}
|
||||
};
|
||||
|
||||
define.amd = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue