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

update guide

This commit is contained in:
Luke Pulverenti 2016-04-26 15:33:09 -04:00
parent 7fbb1924d0
commit 9bbb9ecfb9
17 changed files with 291 additions and 56 deletions

View file

@ -16,12 +16,12 @@
}, },
"devDependencies": {}, "devDependencies": {},
"ignore": [], "ignore": [],
"version": "1.2.46", "version": "1.2.47",
"_release": "1.2.46", "_release": "1.2.47",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "1.2.46", "tag": "1.2.47",
"commit": "7c6fde73db194c24806367c052cf29d8d044b1a2" "commit": "52f3790ed3d535fa00811d7922c899f85273b25c"
}, },
"_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

@ -588,10 +588,12 @@
} }
} }
fetch(baseUrl + '/tvguide.template.html', { mode: 'no-cors' }).then(function (response) { var xhr = new XMLHttpRequest();
return response.text(); xhr.open('GET', baseUrl + '/tvguide.template.html', true);
}).then(function (template) {
xhr.onload = function (e) {
var template = this.response;
var context = options.element; var context = options.element;
context.innerHTML = globalize.translateDocument(template, 'core'); context.innerHTML = globalize.translateDocument(template, 'core');
@ -622,7 +624,9 @@
itemShortcuts.on(context); itemShortcuts.on(context);
self.refresh(); self.refresh();
}); }
xhr.send();
}; };
Guide.setBaseUrl = function (url) { Guide.setBaseUrl = function (url) {

View file

@ -26,14 +26,14 @@
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}, },
"main": "iron-meta.html", "main": "iron-meta.html",
"homepage": "https://github.com/PolymerElements/iron-meta", "homepage": "https://github.com/polymerelements/iron-meta",
"_release": "1.1.1", "_release": "1.1.1",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.1.1", "tag": "v1.1.1",
"commit": "e171ee234b482219c9514e6f9551df48ef48bd9f" "commit": "e171ee234b482219c9514e6f9551df48ef48bd9f"
}, },
"_source": "git://github.com/PolymerElements/iron-meta.git", "_source": "git://github.com/polymerelements/iron-meta.git",
"_target": "^1.0.0", "_target": "^1.0.0",
"_originalSource": "PolymerElements/iron-meta" "_originalSource": "polymerelements/iron-meta"
} }

View file

@ -36,7 +36,7 @@
"tag": "v1.4.0", "tag": "v1.4.0",
"commit": "554f7418fdbd97688eb21518b5f8172167d53a95" "commit": "554f7418fdbd97688eb21518b5f8172167d53a95"
}, },
"_source": "git://github.com/PolymerElements/iron-selector.git", "_source": "git://github.com/polymerelements/iron-selector.git",
"_target": "^1.0.0", "_target": "^1.0.0",
"_originalSource": "PolymerElements/iron-selector" "_originalSource": "polymerelements/iron-selector"
} }

View file

@ -1,6 +1,6 @@
{ {
"name": "iron-validatable-behavior", "name": "iron-validatable-behavior",
"version": "1.0.5", "version": "1.1.0",
"description": "Provides a behavior for an element that validates user input", "description": "Provides a behavior for an element that validates user input",
"authors": "The Polymer Authors", "authors": "The Polymer Authors",
"keywords": [ "keywords": [
@ -9,9 +9,7 @@
"iron", "iron",
"behavior" "behavior"
], ],
"main": [ "main": "iron-validatable-behavior.html",
"iron-validatable-behavior.html"
],
"private": true, "private": true,
"repository": { "repository": {
"type": "git", "type": "git",
@ -29,14 +27,14 @@
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0", "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
"iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0", "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0",
"test-fixture": "PolymerElements/test-fixture#^1.0.0", "test-fixture": "PolymerElements/test-fixture#^1.0.0",
"web-component-tester": "*", "web-component-tester": "^4.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}, },
"_release": "1.0.5", "_release": "1.1.0",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.0.5", "tag": "v1.1.0",
"commit": "c1334b835892b3d7a329a8e6b8741d4be3a8d99c" "commit": "01ed585b28d8ab41367518f9aebd8442b9166bfe"
}, },
"_source": "git://github.com/PolymerElements/iron-validatable-behavior.git", "_source": "git://github.com/PolymerElements/iron-validatable-behavior.git",
"_target": "^1.0.0", "_target": "^1.0.0",

View file

@ -0,0 +1,33 @@
<!-- Instructions: https://github.com/PolymerElements/iron-validatable-behavior/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

@ -0,0 +1,23 @@
language: node_js
sudo: required
before_script:
- npm install -g bower polylint web-component-tester
- bower install
- polylint
env:
global:
- secure: AsXK1s4viLG4eumYMxE0bJasVbWrpQ7JaUboMoK4Nzhmunx01udikRRAJifl3nkcc4m2GpzCb4Kmtyh5hxyLA05uE416VzmfDq3dGJKsNAQXbSescSVik63llq4HXAdOvek2eSo5wOVGNHslscIed5K2bJajXfPMIODJyBxo8aE=
- secure: V/H/0+/R8owujbwe3IDbND8v5zs4pWTe0hRCLefjgR9ci2lmNNP54Zb97nOZnLQqynafDSyrngL3+RP5F0fk1dC++cpuxQNKoYPwDFPZ41LAxp5dgtyxkb+J4eWtq0UilWF5thVt4oB1OWwPGtxMmSl+imXXKtq4a4Ov++t2Apo=
node_js: stable
addons:
firefox: latest
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
sauce_connect: true
script:
- xvfb-run wct
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
dist: trusty

View file

@ -0,0 +1,77 @@
<!--
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 :)
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
## 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: [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.
### 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 in the pull request description using the following syntax:
```markdown
(For a single issue)
Fixes #20
(For multiple issues)
Fixes #32, fixes #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,6 +1,6 @@
{ {
"name": "iron-validatable-behavior", "name": "iron-validatable-behavior",
"version": "1.0.5", "version": "1.1.0",
"description": "Provides a behavior for an element that validates user input", "description": "Provides a behavior for an element that validates user input",
"authors": "The Polymer Authors", "authors": "The Polymer Authors",
"keywords": [ "keywords": [
@ -9,9 +9,7 @@
"iron", "iron",
"behavior" "behavior"
], ],
"main": [ "main": "iron-validatable-behavior.html",
"iron-validatable-behavior.html"
],
"private": true, "private": true,
"repository": { "repository": {
"type": "git", "type": "git",
@ -29,7 +27,7 @@
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0", "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
"iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0", "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0",
"test-fixture": "PolymerElements/test-fixture#^1.0.0", "test-fixture": "PolymerElements/test-fixture#^1.0.0",
"web-component-tester": "*", "web-component-tester": "^4.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
} }
} }

View file

@ -12,6 +12,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<link rel="import" href="../iron-meta/iron-meta.html"> <link rel="import" href="../iron-meta/iron-meta.html">
<script> <script>
/**
* Singleton IronMeta instance.
*/
Polymer.IronValidatableBehaviorMeta = null;
/** /**
* `Use Polymer.IronValidatableBehavior` to implement an element that validates user input. * `Use Polymer.IronValidatableBehavior` to implement an element that validates user input.
@ -41,14 +45,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
properties: { properties: {
/**
* Namespace for this validator.
*/
validatorType: {
type: String,
value: 'validator'
},
/** /**
* Name of the validator to use. * Name of the validator to use.
*/ */
@ -66,22 +62,35 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
value: false value: false
}, },
/**
* This property is deprecated and should not be used. Use the global
* validator meta singleton, `Polymer.IronValidatableBehaviorMeta` instead.
*/
_validatorMeta: { _validatorMeta: {
type: Object type: Object
} },
/**
* Namespace for this validator. This property is deprecated and should
* not be used. For all intents and purposes, please consider it a
* read-only, config-time property.
*/
validatorType: {
type: String,
value: 'validator'
},
_validator: {
computed: '__computeValidator(validator)'
}
}, },
observers: [ observers: [
'_invalidChanged(invalid)' '_invalidChanged(invalid)'
], ],
get _validator() { registered: function() {
return this._validatorMeta && this._validatorMeta.byKey(this.validator); Polymer.IronValidatableBehaviorMeta = new Polymer.IronMeta({type: 'validator'});
},
ready: function() {
this._validatorMeta = new Polymer.IronMeta({type: this.validatorType});
}, },
_invalidChanged: function() { _invalidChanged: function() {
@ -128,6 +137,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
return this._validator.validate(value); return this._validator.validate(value);
} }
return true; return true;
},
__computeValidator: function() {
return Polymer.IronValidatableBehaviorMeta &&
Polymer.IronValidatableBehaviorMeta.byKey(this.validator);
} }
}; };

View file

@ -0,0 +1,30 @@
<!--
@license
Copyright (c) 2016 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="../../iron-validator-behavior/iron-validator-behavior.html">
<script>
Polymer({
is: 'cats-only',
behaviors: [
Polymer.IronValidatorBehavior
],
validate: function(value) {
return value === 'cats';
}
});
</script>

View file

@ -0,0 +1,30 @@
<!--
@license
Copyright (c) 2016 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="../../iron-validator-behavior/iron-validator-behavior.html">
<script>
Polymer({
is: 'dogs-only',
behaviors: [
Polymer.IronValidatorBehavior
],
validate: function(value) {
return value === 'dogs';
}
});
</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,11 +6,9 @@ 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>
<title>paper-validatable-behavior tests</title> <title>iron-validatable-behavior tests</title>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
@ -23,13 +20,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<body> <body>
<script> <script>
/* no tests */ /* no tests */
WCT.loadSuites([ WCT.loadSuites([
'iron-validatable-behavior.html' 'iron-validatable-behavior.html',
'iron-validatable-behavior.html?dom=shadow'
]); ]);
</script> </script>
</body>
</html>
</body></html>

View file

@ -1,5 +1,6 @@
<!doctype html> <!doctype html>
<!-- <!--
@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
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
@ -23,6 +24,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<link rel="import" href="../../test-fixture/test-fixture.html"> <link rel="import" href="../../test-fixture/test-fixture.html">
<link rel="import" href="test-validatable.html"> <link rel="import" href="test-validatable.html">
<link rel="import" href="cats-only.html">
<link rel="import" href="dogs-only.html">
</head> </head>
<body> <body>
@ -33,6 +36,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
</template> </template>
</test-fixture> </test-fixture>
<test-fixture id="validators">
<template>
<cats-only></cats-only>
<dogs-only></dogs-only>
<test-validatable></test-validatable>
</template>
</test-fixture>
<script> <script>
suite('basic', function() { suite('basic', function() {
@ -51,6 +62,25 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
assert.isTrue(valid); assert.isTrue(valid);
}); });
test('changing the validator works', function() {
var node = fixture('validators');
var input = node[2];
// Initially there's no validator, so everything is valid.
assert.isTrue(input.validate(''));
assert.isTrue(input.validate('cats'));
// Only valid if the value is 'cats'.
input.validator = 'cats-only';
assert.isFalse(input.validate('ca'));
assert.isTrue(input.validate('cats'));
// Only valid if the value is 'dogs'.
input.validator = 'dogs-only';
assert.isFalse(input.validate('cats'));
assert.isTrue(input.validate('dogs'));
});
}); });
</script> </script>

View file

@ -1,4 +1,5 @@
<!-- <!--
@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
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

View file

@ -54,7 +54,7 @@
"tag": "v1.1.11", "tag": "v1.1.11",
"commit": "8cfe5c5bf8c2e40d243443d046a94b6fe371983c" "commit": "8cfe5c5bf8c2e40d243443d046a94b6fe371983c"
}, },
"_source": "git://github.com/polymerelements/paper-input.git", "_source": "git://github.com/PolymerElements/paper-input.git",
"_target": "^1.0.9", "_target": "^1.0.0",
"_originalSource": "polymerelements/paper-input" "_originalSource": "PolymerElements/paper-input"
} }

View file

@ -34,6 +34,6 @@
"commit": "11c987b2eb3c73b388a79fc8aaea8ca01624f514" "commit": "11c987b2eb3c73b388a79fc8aaea8ca01624f514"
}, },
"_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"
} }