1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update components

This commit is contained in:
Luke Pulverenti 2016-06-22 00:39:24 -04:00
parent f64a03b3f4
commit 75a40a8dbb
17 changed files with 177 additions and 88 deletions

View file

@ -15,12 +15,12 @@
}, },
"devDependencies": {}, "devDependencies": {},
"ignore": [], "ignore": [],
"version": "1.4.52", "version": "1.4.53",
"_release": "1.4.52", "_release": "1.4.53",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "1.4.52", "tag": "1.4.53",
"commit": "80aad0c646abb9e92cdf3caea1340ce81c9ab38d" "commit": "300770cf6f36621ffdb2d2482438916f1520ffb5"
}, },
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "^1.2.0", "_target": "^1.2.0",

View file

@ -89,6 +89,10 @@
browser.safari = true; browser.safari = true;
} }
if (userAgent.toLowerCase().indexOf("playstation 4") != -1) {
browser.ps4 = true;
}
if (isMobile.any) { if (isMobile.any) {
browser.mobile = true; browser.mobile = true;
} }
@ -101,7 +105,7 @@
browser.tv = isTv(); browser.tv = isTv();
browser.operaTv = browser.tv && userAgent.toLowerCase().indexOf('opr/') != -1; browser.operaTv = browser.tv && userAgent.toLowerCase().indexOf('opr/') != -1;
browser.noFlex = browser.tv && !browser.chrome && !browser.operaTv; browser.noFlex = (browser.tv && !browser.chrome && !browser.operaTv) || browser.ps4;
return browser; return browser;
}); });

View file

@ -73,6 +73,13 @@ define([], function () {
return false; return false;
} }
if (elem.tagName == 'INPUT') {
var type = elem.type;
if (type == 'range') {
return false;
}
}
return true; return true;
} }
@ -272,7 +279,6 @@ define([], function () {
nearestElement = nearestElementFocusableParent; nearestElement = nearestElementFocusableParent;
} }
} }
focus(nearestElement); focus(nearestElement);
} }
} }

View file

@ -81,10 +81,10 @@
"MessageDownloadQueued": "\u0416\u04af\u043a\u0442\u0435\u043f \u0430\u043b\u0443 \u043a\u0435\u0437\u0435\u043a\u0442\u0435.", "MessageDownloadQueued": "\u0416\u04af\u043a\u0442\u0435\u043f \u0430\u043b\u0443 \u043a\u0435\u0437\u0435\u043a\u0442\u0435.",
"EditSubtitles": "\u0421\u0443\u0431\u0442\u0438\u0442\u0440\u043b\u0435\u0440\u0434\u0456 \u04e9\u04a3\u0434\u0435\u0443", "EditSubtitles": "\u0421\u0443\u0431\u0442\u0438\u0442\u0440\u043b\u0435\u0440\u0434\u0456 \u04e9\u04a3\u0434\u0435\u0443",
"UnlockGuide": "\u0422\u0435\u043b\u0435\u0433\u0438\u0434\u0442\u0456 \u049b\u04b1\u0440\u0441\u0430\u0443\u0434\u0430\u043d \u0431\u043e\u0441\u0430\u0442\u0443", "UnlockGuide": "\u0422\u0435\u043b\u0435\u0433\u0438\u0434\u0442\u0456 \u049b\u04b1\u0440\u0441\u0430\u0443\u0434\u0430\u043d \u0431\u043e\u0441\u0430\u0442\u0443",
"RefreshMetadata": "Refresh Metadata", "RefreshMetadata": "\u041c\u0435\u0442\u0430\u0434\u0435\u0440\u0435\u043a\u0442\u0435\u0440\u0434\u0456 \u0436\u0430\u04a3\u0493\u044b\u0440\u0442\u0443",
"ReplaceExistingImages": "Replace existing images", "ReplaceExistingImages": "\u0411\u0430\u0440 \u0441\u0443\u0440\u0435\u0442\u0442\u0435\u0440\u0434\u0456 \u0430\u0443\u044b\u0441\u0442\u044b\u0440\u0443",
"ReplaceAllMetadata": "Replace all metadata", "ReplaceAllMetadata": "\u0411\u0430\u0440\u043b\u044b\u049b \u043c\u0435\u0442\u0430\u0434\u0435\u0440\u0435\u043a\u0442\u0435\u0440\u0434\u0456 \u0430\u0443\u044b\u0441\u0442\u044b\u0440\u0443",
"SearchForMissingMetadata": "Search for missing metadata", "SearchForMissingMetadata": "\u0416\u043e\u049b \u043c\u0435\u0442\u0430\u0434\u0435\u0440\u0435\u043a\u0442\u0435\u0440\u0434\u0456 \u0456\u0437\u0434\u0435\u0443",
"LabelRefreshMode": "Refresh mode:", "LabelRefreshMode": "\u0416\u0430\u04a3\u0493\u044b\u0440\u0442\u0443 \u0440\u0435\u0436\u0456\u043c\u0456:",
"RefreshDialogHelp": "Metadata is refreshed based on settings and internet services that are enabled in the Emby Server dashboard." "RefreshDialogHelp": "\u041c\u0435\u0442\u0430\u0434\u0435\u0440\u0435\u043a\u0442\u0435\u0440 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043b\u0435\u0440 \u043c\u0435\u043d Emby Server \u0431\u0430\u049b\u044b\u043b\u0430\u0443 \u0442\u0430\u049b\u0442\u0430\u0441\u044b\u043d\u0434\u0430 \u049b\u043e\u0441\u044b\u043b\u0493\u0430\u043d \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u049b\u044b\u0437\u043c\u0435\u0442\u0442\u0435\u0440\u0456 \u043d\u0435\u0433\u0456\u0437\u0456\u043d\u0434\u0435 \u0436\u0430\u04a3\u0493\u044b\u0440\u0442\u044b\u043b\u0430\u0434\u044b."
} }

View file

@ -81,10 +81,10 @@
"MessageDownloadQueued": "\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438.", "MessageDownloadQueued": "\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438.",
"EditSubtitles": "\u041f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u0443\u0431\u0442\u0438\u0442\u0440\u044b", "EditSubtitles": "\u041f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u0443\u0431\u0442\u0438\u0442\u0440\u044b",
"UnlockGuide": "\u0420\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043b\u0435\u0433\u0438\u0434", "UnlockGuide": "\u0420\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043b\u0435\u0433\u0438\u0434",
"RefreshMetadata": "Refresh Metadata", "RefreshMetadata": "\u041f\u043e\u0434\u043d\u043e\u0432\u0438\u0442\u044c \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435",
"ReplaceExistingImages": "Replace existing images", "ReplaceExistingImages": "\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f \u0440\u0438\u0441\u0443\u043d\u043a\u0438",
"ReplaceAllMetadata": "Replace all metadata", "ReplaceAllMetadata": "\u0417\u0430\u043c\u0435\u043d\u0430 \u0432\u0441\u0435\u0445 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445",
"SearchForMissingMetadata": "Search for missing metadata", "SearchForMissingMetadata": "\u041f\u043e\u0438\u0441\u043a \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445",
"LabelRefreshMode": "Refresh mode:", "LabelRefreshMode": "\u0420\u0435\u0436\u0438\u043c \u043f\u043e\u0434\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f:",
"RefreshDialogHelp": "Metadata is refreshed based on settings and internet services that are enabled in the Emby Server dashboard." "RefreshDialogHelp": "\u041f\u043e\u0434\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u0432 \u0438\u043d\u0444\u043e\u043f\u0430\u043d\u0435\u043b\u0438 Emby Server \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u0443\u0441\u043b\u0443\u0433\u0430\u043c\u0438."
} }

View file

@ -30,14 +30,14 @@
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}, },
"ignore": [], "ignore": [],
"homepage": "https://github.com/polymerelements/iron-a11y-keys-behavior", "homepage": "https://github.com/PolymerElements/iron-a11y-keys-behavior",
"_release": "1.1.3", "_release": "1.1.3",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.1.3", "tag": "v1.1.3",
"commit": "bfbb922fb9029958e618baf06acf8e3c6513898b" "commit": "bfbb922fb9029958e618baf06acf8e3c6513898b"
}, },
"_source": "git://github.com/polymerelements/iron-a11y-keys-behavior.git", "_source": "git://github.com/PolymerElements/iron-a11y-keys-behavior.git",
"_target": "^1.0.0", "_target": "^1.0.0",
"_originalSource": "polymerelements/iron-a11y-keys-behavior" "_originalSource": "PolymerElements/iron-a11y-keys-behavior"
} }

View file

@ -37,14 +37,14 @@
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}, },
"ignore": [], "ignore": [],
"homepage": "https://github.com/PolymerElements/paper-icon-button", "homepage": "https://github.com/polymerelements/paper-icon-button",
"_release": "1.1.2", "_release": "1.1.2",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.1.2", "tag": "v1.1.2",
"commit": "0a6c65f73765d6f6ae6cfe90ddc9905a2cf45f20" "commit": "0a6c65f73765d6f6ae6cfe90ddc9905a2cf45f20"
}, },
"_source": "git://github.com/PolymerElements/paper-icon-button.git", "_source": "git://github.com/polymerelements/paper-icon-button.git",
"_target": "^1.0.0", "_target": "^1.0.0",
"_originalSource": "PolymerElements/paper-icon-button" "_originalSource": "polymerelements/paper-icon-button"
} }

View file

@ -1,6 +1,6 @@
{ {
"name": "paper-ripple", "name": "paper-ripple",
"version": "1.0.5", "version": "1.0.6",
"license": "http://polymer.github.io/LICENSE.txt", "license": "http://polymer.github.io/LICENSE.txt",
"description": "Adds a material design ripple to any container", "description": "Adds a material design ripple to any container",
"private": true, "private": true,
@ -18,26 +18,26 @@
}, },
"main": "paper-ripple.html", "main": "paper-ripple.html",
"dependencies": { "dependencies": {
"polymer": "Polymer/polymer#^1.1.0", "iron-a11y-keys-behavior": "polymerelements/iron-a11y-keys-behavior#^1.0.0",
"iron-a11y-keys-behavior": "polymerelements/iron-a11y-keys-behavior#^1.0.0" "polymer": "Polymer/polymer#^1.1.0"
}, },
"devDependencies": { "devDependencies": {
"iron-component-page": "polymerelements/iron-component-page#^1.0.0", "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
"iron-icon": "polymerelements/iron-icon#^1.0.0", "iron-icon": "polymerelements/iron-icon#^1.0.0",
"iron-icons": "polymerelements/iron-icons#^1.0.0", "iron-icons": "polymerelements/iron-icons#^1.0.0",
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
"paper-styles": "polymerelements/paper-styles#^1.0.0", "paper-styles": "polymerelements/paper-styles#^1.0.0",
"test-fixture": "polymerelements/test-fixture#^1.0.0", "test-fixture": "polymerelements/test-fixture#^1.0.0",
"web-component-tester": "polymer/web-component-tester#^3.4.0", "web-component-tester": "^4.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
}, },
"ignore": [], "ignore": [],
"homepage": "https://github.com/PolymerElements/paper-ripple", "homepage": "https://github.com/PolymerElements/paper-ripple",
"_release": "1.0.5", "_release": "1.0.6",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.0.5", "tag": "v1.0.6",
"commit": "d72e7a9a8ab518b901ed18dde492df3b87a93be5" "commit": "8e9ec00765b14acb387205e5f748c7ebeac16fd3"
}, },
"_source": "git://github.com/PolymerElements/paper-ripple.git", "_source": "git://github.com/PolymerElements/paper-ripple.git",
"_target": "^1.0.0", "_target": "^1.0.0",

View file

@ -0,0 +1,33 @@
<!-- Instructions: https://github.com/PolymerElements/paper-ripple/CONTRIBUTING.md#filing-issues -->
### Description
<!-- Example: The `paper-foo` element causes the page to turn pink when clicked. -->
### Expected outcome
<!-- Example: The page stays the same color. -->
### Actual outcome
<!-- Example: The page turns pink. -->
### Live Demo
<!-- Example: https://jsbin.com/cagaye/edit?html,output -->
### Steps to reproduce
<!-- Example
1. Put a `paper-foo` element in the page.
2. Open the page in a web browser.
3. Click the `paper-foo` element.
-->
### Browsers Affected
<!-- Check all that apply -->
- [ ] Chrome
- [ ] Firefox
- [ ] Safari 9
- [ ] Safari 8
- [ ] Safari 7
- [ ] Edge
- [ ] IE 11
- [ ] IE 10

View file

@ -1,22 +1,23 @@
language: node_js language: node_js
sudo: false sudo: required
before_script: before_script:
- npm install web-component-tester - npm install -g bower polylint web-component-tester
- npm install bower
- 'export PATH=$PWD/node_modules/.bin:$PATH'
- bower install - bower install
- polylint
env: env:
global: global:
- secure: YrC5bTrJwlszZQWfnRwDbLaZNLf+KnWXTAfzvul7eij21W3/v+E0wp9pFTLQj/G3bZWgOEZSsoXxASNcNu1JUmJRyLXpJgTps25IlS/VJTRHoK7jUjt5pJG1CbcgTixQblyOVtPqT6j0V23V0d3mhQ3H2xFBbcl87iYO1w+6nmQ= - secure: YrC5bTrJwlszZQWfnRwDbLaZNLf+KnWXTAfzvul7eij21W3/v+E0wp9pFTLQj/G3bZWgOEZSsoXxASNcNu1JUmJRyLXpJgTps25IlS/VJTRHoK7jUjt5pJG1CbcgTixQblyOVtPqT6j0V23V0d3mhQ3H2xFBbcl87iYO1w+6nmQ=
- secure: NZv74uwtibMbmarEOWRUNkEwjz/2akWEIe2JDxglag2JUECWrcAKJIQUqYsO0KNUIg09xJEqWLWED4fN73p3z27Jl/z99ssVMvPQt8duoxwZ6UwcjVWUQNjgXKN6JDZCf+3hJsmU51Lp6mpzj0Y5m8nCjhh7/bBnJahH+VRm7bA= - secure: NZv74uwtibMbmarEOWRUNkEwjz/2akWEIe2JDxglag2JUECWrcAKJIQUqYsO0KNUIg09xJEqWLWED4fN73p3z27Jl/z99ssVMvPQt8duoxwZ6UwcjVWUQNjgXKN6JDZCf+3hJsmU51Lp6mpzj0Y5m8nCjhh7/bBnJahH+VRm7bA=
node_js: 4 node_js: stable
addons: addons:
firefox: '42.0' firefox: '46.0'
apt: apt:
sources: sources:
- google-chrome - google-chrome
packages: packages:
- google-chrome-stable - google-chrome-stable
sauce_connect: true
script: script:
- xvfb-run wct - xvfb-run wct
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi" - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
dist: trusty

View file

@ -1,11 +1,16 @@
<!-- <!--
This file is autogenerated based on This file is autogenerated based on
https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
If you edit that file, it will get updated everywhere else. If you edit that file, it will get updated everywhere else.
If you edit this file, your changes will get overridden :) If you edit this file, your changes will get overridden :)
You can however override the jsbin link with one that's customized to this
specific element:
jsbin=https://jsbin.com/cagaye/edit?html,output
--> -->
# Polymer Elements # Polymer Elements
## Guide for Contributors ## Guide for Contributors
@ -41,7 +46,7 @@ Polymer Elements are built in the open, and the Polymer authors eagerly encourag
3. Click the `paper-foo` element. 3. Click the `paper-foo` element.
``` ```
2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output). 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
@ -51,14 +56,14 @@ Polymer Elements are built in the open, and the Polymer authors eagerly encourag
When submitting pull requests, please provide: When submitting pull requests, please provide:
1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax: 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
```markdown ```markdown
(For a single issue) (For a single issue)
Fixes #20 Fixes #20
(For multiple issues) (For multiple issues)
Fixes #32, #40 Fixes #32, fixes #40
``` ```
2. **A succinct description of the design** used to fix any related issues. For example: 2. **A succinct description of the design** used to fix any related issues. For example:

View file

@ -1,6 +1,6 @@
{ {
"name": "paper-ripple", "name": "paper-ripple",
"version": "1.0.5", "version": "1.0.6",
"license": "http://polymer.github.io/LICENSE.txt", "license": "http://polymer.github.io/LICENSE.txt",
"description": "Adds a material design ripple to any container", "description": "Adds a material design ripple to any container",
"private": true, "private": true,
@ -18,18 +18,18 @@
}, },
"main": "paper-ripple.html", "main": "paper-ripple.html",
"dependencies": { "dependencies": {
"polymer": "Polymer/polymer#^1.1.0", "iron-a11y-keys-behavior": "polymerelements/iron-a11y-keys-behavior#^1.0.0",
"iron-a11y-keys-behavior": "polymerelements/iron-a11y-keys-behavior#^1.0.0" "polymer": "Polymer/polymer#^1.1.0"
}, },
"devDependencies": { "devDependencies": {
"iron-component-page": "polymerelements/iron-component-page#^1.0.0", "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
"iron-icon": "polymerelements/iron-icon#^1.0.0", "iron-icon": "polymerelements/iron-icon#^1.0.0",
"iron-icons": "polymerelements/iron-icons#^1.0.0", "iron-icons": "polymerelements/iron-icons#^1.0.0",
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
"paper-styles": "polymerelements/paper-styles#^1.0.0", "paper-styles": "polymerelements/paper-styles#^1.0.0",
"test-fixture": "polymerelements/test-fixture#^1.0.0", "test-fixture": "polymerelements/test-fixture#^1.0.0",
"web-component-tester": "polymer/web-component-tester#^3.4.0", "web-component-tester": "^4.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
}, },
"ignore": [] "ignore": []
} }

View file

@ -1,4 +1,5 @@
<!-- <!--
@license
Copyright (c) 2014 The Polymer Project Authors. All rights reserved. Copyright (c) 2014 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 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 authors may be found at http://polymer.github.io/AUTHORS.txt
@ -37,7 +38,7 @@ Example:
<paper-ripple id="ripple" style="pointer-events: none;"></paper-ripple> <paper-ripple id="ripple" style="pointer-events: none;"></paper-ripple>
... ...
downAction: function(e) { downAction: function(e) {
this.$.ripple.downAction({x: e.x, y: e.y}); this.$.ripple.downAction({detail: {x: e.x, y: e.y}});
}, },
upAction: function(e) { upAction: function(e) {
this.$.ripple.upAction(); this.$.ripple.upAction();
@ -75,15 +76,6 @@ Apply `circle` class to make the rippling effect within a circle.
<dom-module id="paper-ripple"> <dom-module id="paper-ripple">
<!--
Fired when the animation finishes. This is useful if you want to wait until the ripple
animation finishes to perform some action.
@event transitionend
@param {Object} detail
@param {Object} detail.node The animated node
-->
<template> <template>
<style> <style>
:host { :host {
@ -559,16 +551,7 @@ Apply `circle` class to make the rippling effect within a circle.
}, },
get target () { get target () {
var ownerRoot = Polymer.dom(this).getOwnerRoot(); return this.keyEventTarget;
var target;
if (this.parentNode.nodeType == 11) { // DOCUMENT_FRAGMENT_NODE
target = ownerRoot.host;
} else {
target = this.parentNode;
}
return target;
}, },
keyBindings: { keyBindings: {
@ -581,14 +564,19 @@ Apply `circle` class to make the rippling effect within a circle.
// Set up a11yKeysBehavior to listen to key events on the target, // Set up a11yKeysBehavior to listen to key events on the target,
// so that space and enter activate the ripple even if the target doesn't // so that space and enter activate the ripple even if the target doesn't
// handle key events. The key handlers deal with `noink` themselves. // handle key events. The key handlers deal with `noink` themselves.
this.keyEventTarget = this.target; if (this.parentNode.nodeType == 11) { // DOCUMENT_FRAGMENT_NODE
this.listen(this.target, 'up', 'uiUpAction'); this.keyEventTarget = Polymer.dom(this).getOwnerRoot().host;
this.listen(this.target, 'down', 'uiDownAction'); } else {
this.keyEventTarget = this.parentNode;
}
this.listen(this.keyEventTarget, 'up', 'uiUpAction');
this.listen(this.keyEventTarget, 'down', 'uiDownAction');
}, },
detached: function() { detached: function() {
this.unlisten(this.target, 'up', 'uiUpAction'); this.unlisten(this.keyEventTarget, 'up', 'uiUpAction');
this.unlisten(this.target, 'down', 'uiDownAction'); this.unlisten(this.keyEventTarget, 'down', 'uiDownAction');
this.keyEventTarget = null;
}, },
get shouldKeepAnimating () { get shouldKeepAnimating () {
@ -636,6 +624,7 @@ Apply `circle` class to make the rippling effect within a circle.
ripple.downAction(event); ripple.downAction(event);
if (!this._animating) { if (!this._animating) {
this._animating = true;
this.animate(); this.animate();
} }
}, },
@ -665,6 +654,7 @@ Apply `circle` class to make the rippling effect within a circle.
ripple.upAction(event); ripple.upAction(event);
}); });
this._animating = true;
this.animate(); this.animate();
}, },
@ -703,11 +693,12 @@ Apply `circle` class to make the rippling effect within a circle.
}, },
animate: function() { animate: function() {
if (!this._animating) {
return;
}
var index; var index;
var ripple; var ripple;
this._animating = true;
for (index = 0; index < this.ripples.length; ++index) { for (index = 0; index < this.ripples.length; ++index) {
ripple = this.ripples[index]; ripple = this.ripples[index];
@ -752,6 +743,15 @@ Apply `circle` class to make the rippling effect within a circle.
this.upAction(); this.upAction();
} }
} }
/**
Fired when the animation finishes.
This is useful if you want to wait until
the ripple animation finishes to perform some action.
@event transitionend
@param {{node: Object}} detail Contains the animated node.
*/
}); });
})(); })();
</script> </script>

View file

@ -1,5 +1,4 @@
<!doctype html> <!DOCTYPE html><!--
<!--
@license @license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved. 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 This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
@ -7,9 +6,7 @@ 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 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 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 subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--> --><html><head>
<html>
<head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"> <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>Tests</title> <title>Tests</title>
@ -18,8 +15,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<body> <body>
<script> <script>
WCT.loadSuites([ WCT.loadSuites([
'paper-ripple.html' 'paper-ripple.html',
'paper-ripple.html?dom=shadow'
]); ]);
</script> </script>
</body>
</html>
</body></html>

View file

@ -63,6 +63,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
</template> </template>
</test-fixture> </test-fixture>
<test-fixture id="NoRipple">
<template>
<div id="RippleContainer">
</div>
</template>
</test-fixture>
<script> <script>
suite('<paper-ripple>', function () { suite('<paper-ripple>', function () {
var mouseEvent; var mouseEvent;
@ -130,8 +137,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
}); });
}); });
suite('with the `center` attribute set to true', function () { suite('with the `center` attribute set to true', function () {
setup(function () { setup(function () {
rippleContainer = fixture('CenteringRipple'); rippleContainer = fixture('CenteringRipple');
@ -191,6 +196,42 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
}); });
}); });
suite('remove a paper ripple', function () {
setup(function () {
rippleContainer = fixture('NoRipple');
});
test('add and remove a paper-ripple', function (done) {
var ripple = document.createElement('paper-ripple');
ripple.addEventListener('transitionend', function() {
expect(ripple.parentNode).to.be.ok;
Polymer.dom(rippleContainer).removeChild(ripple);
done();
});
Polymer.dom(rippleContainer).appendChild(ripple);
ripple.downAction();
ripple.upAction();
});
});
suite('avoid double transitionend event', function () {
setup(function () {
rippleContainer = fixture('NoRipple');
});
test('the transitionend event should only fire once', function (done) {
var ripple = document.createElement('paper-ripple');
var transitionedEventCount = 0;
ripple.addEventListener('transitionend', function() {
++transitionedEventCount;
expect(transitionedEventCount).to.be.eql(1);
Polymer.dom(rippleContainer).removeChild(ripple);
setTimeout(function() { done(); });
});
Polymer.dom(rippleContainer).appendChild(ripple);
ripple.downAction();
ripple.upAction();
});
});
}); });
</script> </script>

View file

@ -37,6 +37,6 @@
"commit": "885bbd74db88dab4fb5dc229cdf994c55fb2b31b" "commit": "885bbd74db88dab4fb5dc229cdf994c55fb2b31b"
}, },
"_source": "git://github.com/PolymerElements/paper-styles.git", "_source": "git://github.com/PolymerElements/paper-styles.git",
"_target": "^1.0.0", "_target": "^1.1.4",
"_originalSource": "PolymerElements/paper-styles" "_originalSource": "PolymerElements/paper-styles"
} }

View file

@ -39,6 +39,6 @@
"commit": "ce5b9fb2d8aa03c698410e2e55cffcfa0b788a3a" "commit": "ce5b9fb2d8aa03c698410e2e55cffcfa0b788a3a"
}, },
"_source": "git://github.com/Polymer/polymer.git", "_source": "git://github.com/Polymer/polymer.git",
"_target": "^1.1.0", "_target": "^1.0.0",
"_originalSource": "Polymer/polymer" "_originalSource": "Polymer/polymer"
} }