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

merge from dev

This commit is contained in:
Luke Pulverenti 2015-12-14 10:43:03 -05:00
parent 1c8f02ce0f
commit 33b01d778c
911 changed files with 34157 additions and 57125 deletions

View file

@ -1,7 +1,7 @@
{
"name": "iron-iconset-svg",
"description": "Manages a set of svg icons",
"version": "1.0.6",
"version": "1.0.9",
"keywords": [
"web-components",
"polymer",
@ -29,12 +29,13 @@
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
"web-component-tester": "*"
},
"main": "iron-iconset-svg.html",
"homepage": "https://github.com/polymerelements/iron-iconset-svg",
"_release": "1.0.6",
"_release": "1.0.9",
"_resolution": {
"type": "version",
"tag": "v1.0.6",
"commit": "ebd17924942abe6110aa0fe81b1b31e1fcc34a9f"
"tag": "v1.0.9",
"commit": "ce9b2ea1f73d936cffdd05f3fe34b1f69d1d32db"
},
"_source": "git://github.com/polymerelements/iron-iconset-svg.git",
"_target": "^1.0.0",

View file

@ -0,0 +1,28 @@
language: node_js
sudo: false
matrix:
include:
- node_js: stable
script: xvfb-run wct
addons:
firefox: latest
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
- node_js: node
script:
- |
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
wct -s 'default'
fi
before_script:
- npm install web-component-tester
- npm install bower
- export PATH=$PWD/node_modules/.bin:$PATH
- bower install
env:
global:
- secure: UR1rxThVZH+l6fFHhAlgNIWs9wHmC5A102oAQBtCuQqKiXPZCDAPQHdjufX8z6hH93JkR+Esh2VPv0baSXFrHteKTRN6bsNDTMFDdHJ5BiRAdhVoV6bsdNH2GTgRXQ+ACMgrh4sXLA5+2Z+JGq7m0zaHehDfNZqmo/1U59qImP8=
- secure: PmWDypBdjKlUGPn9UoBEkjoYiyJFQGe2QiACmdOgueOLSLeA6xW+/1521uFIBHpwuWn29mxVYv5gS1D8hafWhZdXn4OYQl550RrT092jXIO6+mMKZXPmUaKCkPMY6QYJJ5j9ZOC36KgF//IpoE7OCxpLReYOD2KBR3mhw0jOYJA=

View file

@ -0,0 +1,72 @@
<!--
This file is autogenerated based on
https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
If you edit that file, it will get updated everywhere else.
If you edit this file, your changes will get overridden :)
-->
# Polymer Elements
## Guide for Contributors
Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
### Filing Issues
**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
1. **Who will use the feature?** _“As someone filling out a form…”_
2. **When will they use the feature?** _“When I enter an invalid value…”_
3. **What is the users goal?** _“I want to be visually notified that the value needs to be corrected…”_
**If you are filing an issue to report a bug**, please provide:
1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
```markdown
The `paper-foo` element causes the page to turn pink when clicked.
## Expected outcome
The page stays the same color.
## Actual outcome
The page turns pink.
## Steps to reproduce
1. Put a `paper-foo` element in the page.
2. Open the page in a web browser.
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).
3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
### Submitting Pull Requests
**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
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:
```markdown
(For a single issue)
Fixes #20
(For multiple issues)
Fixes #32, #40
```
2. **A succinct description of the design** used to fix any related issues. For example:
```markdown
This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
```
3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so dont be afraid to ask us if you need help with that!

View file

@ -1,7 +1,7 @@
{
"name": "iron-iconset-svg",
"description": "Manages a set of svg icons",
"version": "1.0.6",
"version": "1.0.9",
"keywords": [
"web-components",
"polymer",
@ -28,5 +28,6 @@
"test-fixture": "polymerelements/test-fixture#^1.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
"web-component-tester": "*"
}
},
"main": "iron-iconset-svg.html"
}

View file

@ -42,6 +42,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
fill: navy;
}
iron-icon:nth-of-type(4) {
fill: red;
}
iron-icon {
transition: all 0.5s;
-webkit-transition: all 0.5s;
@ -59,6 +63,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<iron-icon icon="svg-sample-icons:codepen"></iron-icon>
<iron-icon icon="svg-sample-icons:twitter"></iron-icon>
<iron-icon icon="svg-sample-icons:youtube"></iron-icon>
<iron-icon icon="inline:shape"></iron-icon>
</div>
</body>

View file

@ -65,5 +65,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
</g>
</defs>
</svg>
</iron-iconset-svg>
<iron-iconset-svg name="inline" size="24">
<svg>
<defs>
<g id="shape">
<rect x="12" y="0" width="12" height="24" />
<circle cx="12" cy="12" r="12" />
</g>
</defs>
</svg>
</iron-iconset-svg>

View file

@ -18,9 +18,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
* `iron-iconset-svg` element. Multiple icons should be given distinct id's.
*
* Using svg elements to create icons has a few advantages over traditional
* bitmap graphics like jpg or png. Icons that use svg are vector based so they
* are resolution independent and should look good on any device. They are
* stylable via css. Icons can be themed, colorized, and even animated.
* bitmap graphics like jpg or png. Icons that use svg are vector based so
* they are resolution independent and should look good on any device. They
* are stylable via css. Icons can be themed, colorized, and even animated.
*
* Example:
*
@ -28,8 +28,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
* <svg>
* <defs>
* <g id="shape">
* <rect x="50" y="50" width="50" height="50" />
* <circle cx="50" cy="50" r="50" />
* <rect x="12" y="0" width="12" height="24" />
* <circle cx="12" cy="12" r="12" />
* </g>
* </defs>
* </svg>
@ -45,18 +45,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
*
* @element iron-iconset-svg
* @demo demo/index.html
* @implements {Polymer.Iconset}
*/
Polymer({
is: 'iron-iconset-svg',
properties: {
/**
* The name of the iconset.
*
* @attribute name
* @type string
*/
name: {
type: String,
@ -65,10 +62,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
/**
* The size of an individual icon. Note that icons must be square.
*
* @attribute iconSize
* @type number
* @default 24
*/
size: {
type: Number,
@ -77,6 +70,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
},
attached: function() {
this.style.display = 'none';
},
/**
* Construct an array of all icon names in this iconset.
*
@ -98,7 +95,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
* @method applyIcon
* @param {Element} element Element to which the icon is applied.
* @param {string} iconName Name of the icon to apply.
* @return {Element} The svg element which renders the icon.
* @return {?Element} The svg element which renders the icon.
*/
applyIcon: function(element, iconName) {
// insert svg element into shadow root, if it exists

View file

@ -78,6 +78,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
expect(meta.byKey('foo')).to.be.equal(iconset);
});
test('it does not have a size', function () {
var rect = iconset.getBoundingClientRect();
expect(rect.width).to.be.equal(0);
expect(rect.height).to.be.equal(0);
});
test('it fires an iron-iconset-added event on the window', function() {
return loadedPromise;
});
@ -93,6 +99,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
div = elements[1];
});
test('it does not have a size', function () {
var rect = iconset.getBoundingClientRect();
expect(rect.width).to.be.equal(0);
expect(rect.height).to.be.equal(0);
});
test('appends a child to the target element', function () {
expect(div.firstElementChild).to.not.be.ok;
iconset.applyIcon(div, 'circle');