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

update video probing

This commit is contained in:
Luke Pulverenti 2015-09-23 00:00:30 -04:00
parent 8a32cc215f
commit b70aa4926c
25 changed files with 407 additions and 355 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "iron-dropdown", "name": "iron-dropdown",
"version": "1.0.5", "version": "1.0.6",
"description": "", "description": "",
"authors": [ "authors": [
"The Polymer Authors" "The Polymer Authors"
@ -35,11 +35,11 @@
"web-component-tester": "*", "web-component-tester": "*",
"iron-image": "polymerelements/iron-image#^1.0.0" "iron-image": "polymerelements/iron-image#^1.0.0"
}, },
"_release": "1.0.5", "_release": "1.0.6",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.0.5", "tag": "v1.0.6",
"commit": "9c300a14a5aeca1c02f085e9117521af814ce640" "commit": "9b52ccb37577b0e4b3d34f3795117d95648b39ff"
}, },
"_source": "git://github.com/polymerelements/iron-dropdown.git", "_source": "git://github.com/polymerelements/iron-dropdown.git",
"_target": "^1.0.0", "_target": "^1.0.0",

View file

@ -1,6 +1,6 @@
{ {
"name": "iron-dropdown", "name": "iron-dropdown",
"version": "1.0.5", "version": "1.0.6",
"description": "", "description": "",
"authors": [ "authors": [
"The Polymer Authors" "The Polymer Authors"

View file

@ -162,6 +162,17 @@ method is called on the element.
value: false value: false
}, },
/**
* By default, the dropdown will constrain scrolling on the page
* to itself when opened.
* Set to true in order to prevent scroll from being constrained
* to the dropdown when it opens.
*/
allowOutsideScroll: {
type: Boolean,
value: false
},
/** /**
* We memoize the positionTarget bounding rectangle so that we can * We memoize the positionTarget bounding rectangle so that we can
* limit the number of times it is queried per resize / relayout. * limit the number of times it is queried per resize / relayout.
@ -282,7 +293,10 @@ method is called on the element.
* Overridden from `IronOverlayBehavior`. * Overridden from `IronOverlayBehavior`.
*/ */
_renderOpened: function() { _renderOpened: function() {
if (!this.allowOutsideScroll) {
Polymer.IronDropdownScrollManager.pushScrollLock(this); Polymer.IronDropdownScrollManager.pushScrollLock(this);
}
if (!this.noAnimations && this.animationConfig && this.animationConfig.open) { if (!this.noAnimations && this.animationConfig && this.animationConfig.open) {
this.$.contentWrapper.classList.add('animating'); this.$.contentWrapper.classList.add('animating');
this.playAnimation('open'); this.playAnimation('open');

View file

@ -33,6 +33,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
</template> </template>
</test-fixture> </test-fixture>
<test-fixture id="NonLockingDropdown">
<template>
<iron-dropdown>
<div class="dropdown-content" allow-outside-scroll>I don't lock scroll!</div>
</iron-dropdown>
</template>
</test-fixture>
<test-fixture id="AlignedDropdown"> <test-fixture id="AlignedDropdown">
<template> <template>
<div style="display: block; position: relative; width: 100px; height: 100px;"> <div style="display: block; position: relative; width: 100px; height: 100px;">
@ -131,6 +139,21 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
}); });
}); });
suite('locking scroll', function() {
var dropdown;
setup(function() {
dropdown = fixture('NonLockingDropdown');
});
test('can be disabled with `allowOutsideScroll`', function() {
dropdown.open();
expect(Polymer.IronDropdownScrollManager.elementIsScrollLocked(document.body))
.to.be.equal(false);
});
});
suite('aligned dropdown', function() { suite('aligned dropdown', function() {
var parent; var parent;
setup(function() { setup(function() {

View file

@ -34,14 +34,14 @@
"web-component-tester": "*", "web-component-tester": "*",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}, },
"homepage": "https://github.com/polymerelements/iron-overlay-behavior", "homepage": "https://github.com/PolymerElements/iron-overlay-behavior",
"_release": "1.0.6", "_release": "1.0.6",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.0.6", "tag": "v1.0.6",
"commit": "9c77f077f4181b6f03cc986d0f3c224094edbc2d" "commit": "9c77f077f4181b6f03cc986d0f3c224094edbc2d"
}, },
"_source": "git://github.com/polymerelements/iron-overlay-behavior.git", "_source": "git://github.com/PolymerElements/iron-overlay-behavior.git",
"_target": "^1.0.0", "_target": "^1.0.0",
"_originalSource": "polymerelements/iron-overlay-behavior" "_originalSource": "PolymerElements/iron-overlay-behavior"
} }

View file

@ -1,6 +1,6 @@
{ {
"name": "iron-selector", "name": "iron-selector",
"version": "1.0.3", "version": "1.0.4",
"description": "Manages a set of elements that can be selected", "description": "Manages a set of elements that can be selected",
"private": true, "private": true,
"license": "http://polymer.github.io/LICENSE.txt", "license": "http://polymer.github.io/LICENSE.txt",
@ -31,11 +31,11 @@
"web-component-tester": "*", "web-component-tester": "*",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}, },
"_release": "1.0.3", "_release": "1.0.4",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.0.3", "tag": "v1.0.4",
"commit": "d93b02871f790b6bcb1fff52f24757e9c2eb04a5" "commit": "2af8ee5b7cd489bca7d4689c563b82fd356a9534"
}, },
"_source": "git://github.com/PolymerElements/iron-selector.git", "_source": "git://github.com/PolymerElements/iron-selector.git",
"_target": "^1.0.0", "_target": "^1.0.0",

View file

@ -1,6 +1,6 @@
{ {
"name": "iron-selector", "name": "iron-selector",
"version": "1.0.3", "version": "1.0.4",
"description": "Manages a set of elements that can be selected", "description": "Manages a set of elements that can be selected",
"private": true, "private": true,
"license": "http://polymer.github.io/LICENSE.txt", "license": "http://polymer.github.io/LICENSE.txt",

View file

@ -21,29 +21,33 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
* Cancel the event to abort selection. * Cancel the event to abort selection.
* *
* @event iron-activate * @event iron-activate
* */
**/
/** /**
* Fired when an item is selected * Fired when an item is selected
* *
* @event iron-select * @event iron-select
* */
**/
/** /**
* Fired when an item is deselected * Fired when an item is deselected
* *
* @event iron-deselect * @event iron-deselect
*/
/**
* Fired when the list of selectable items changes (e.g., items are
* added or removed). The detail of the event is a list of mutation
* records that describe what changed.
* *
**/ * @event iron-items-changed
*/
properties: { properties: {
/** /**
* If you want to use the attribute value of an element for `selected` instead of the index, * If you want to use the attribute value of an element for `selected` instead of the index,
* set this to the name of the attribute. * set this to the name of the attribute.
*
* @attribute attrForSelected
* @type {string}
*/ */
attrForSelected: { attrForSelected: {
type: String, type: String,
@ -52,9 +56,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
/** /**
* Gets or sets the selected element. The default is to use the index of the item. * Gets or sets the selected element. The default is to use the index of the item.
*
* @attribute selected
* @type {string}
*/ */
selected: { selected: {
type: String, type: String,
@ -63,9 +64,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
/** /**
* Returns the currently selected item. * Returns the currently selected item.
*
* @attribute selectedItem
* @type {Object}
*/ */
selectedItem: { selectedItem: {
type: Object, type: Object,
@ -77,10 +75,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
* The event that fires from items when they are selected. Selectable * The event that fires from items when they are selected. Selectable
* will listen for this event from items and update the selection state. * will listen for this event from items and update the selection state.
* Set to empty string to listen to no events. * Set to empty string to listen to no events.
*
* @attribute activateEvent
* @type {string}
* @default 'tap'
*/ */
activateEvent: { activateEvent: {
type: String, type: String,
@ -91,17 +85,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
/** /**
* This is a CSS selector string. If this is set, only items that match the CSS selector * This is a CSS selector string. If this is set, only items that match the CSS selector
* are selectable. * are selectable.
*
* @attribute selectable
* @type {string}
*/ */
selectable: String, selectable: String,
/** /**
* The class to set on elements when selected. * The class to set on elements when selected.
*
* @attribute selectedClass
* @type {string}
*/ */
selectedClass: { selectedClass: {
type: String, type: String,
@ -110,9 +98,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
/** /**
* The attribute to set on elements when selected. * The attribute to set on elements when selected.
*
* @attribute selectedAttribute
* @type {string}
*/ */
selectedAttribute: { selectedAttribute: {
type: String, type: String,
@ -123,10 +108,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
* The set of excluded elements where the key is the `localName` * The set of excluded elements where the key is the `localName`
* of the element that will be ignored from the item list. * of the element that will be ignored from the item list.
* *
* @type {object}
* @default {template: 1} * @default {template: 1}
*/ */
excludedLocalNames: { excludedLocalNames: {
type: Object, type: Object,
value: function() { value: function() {
@ -295,7 +278,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
// observe items change under the given node. // observe items change under the given node.
_observeItems: function(node) { _observeItems: function(node) {
var observer = new MutationObserver(function() { // TODO(cdata): Update this when we get distributed children changed.
var observer = new MutationObserver(function(mutations) {
// Let other interested parties know about the change so that
// we don't have to recreate mutation observers everywher.
this.fire('iron-items-changed', mutations, {
bubbles: false,
cancelable: false
});
if (this.selected != null) { if (this.selected != null) {
this._updateSelected(); this._updateSelected();
} }

View file

@ -142,6 +142,29 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
assert.equal(selectedEventCounter, 0); assert.equal(selectedEventCounter, 0);
}); });
suite('items changing', function() {
test('cause iron-items-changed to fire', function(done) {
var newItem = document.createElement('div');
var changeCount = 0;
newItem.id = 'item999';
s2.addEventListener('iron-items-changed', function() {
changeCount++;
});
s2.appendChild(newItem);
Polymer.Base.async(function() {
s2.removeChild(newItem);
Polymer.Base.async(function() {
expect(changeCount).to.be.equal(2);
done();
}, 1);
}, 1);
});
});
}); });
</script> </script>

View file

@ -54,7 +54,7 @@
"tag": "v1.0.6", "tag": "v1.0.6",
"commit": "ec51bf68f05c40373536cc726ca674e4549b7db2" "commit": "ec51bf68f05c40373536cc726ca674e4549b7db2"
}, },
"_source": "git://github.com/polymerelements/neon-animation.git", "_source": "git://github.com/PolymerElements/neon-animation.git",
"_target": "^1.0.0", "_target": "^1.0.0",
"_originalSource": "polymerelements/neon-animation" "_originalSource": "PolymerElements/neon-animation"
} }

View file

@ -1,6 +1,6 @@
{ {
"name": "paper-button", "name": "paper-button",
"version": "1.0.5", "version": "1.0.6",
"description": "Material design button", "description": "Material design button",
"authors": [ "authors": [
"The Polymer Authors" "The Polymer Authors"
@ -37,11 +37,11 @@
"iron-test-helpers": "polymerelements/iron-test-helpers#^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"
}, },
"_release": "1.0.5", "_release": "1.0.6",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.0.5", "tag": "v1.0.6",
"commit": "e8367f8f0d77e420a75c8811bda9b0666b81ff8e" "commit": "b70c4a22cbe3617d4a7717fe27ba68edd0d0c04f"
}, },
"_source": "git://github.com/PolymerElements/paper-button.git", "_source": "git://github.com/PolymerElements/paper-button.git",
"_target": "~1.0.1", "_target": "~1.0.1",

View file

@ -1,6 +1,6 @@
{ {
"name": "paper-button", "name": "paper-button",
"version": "1.0.5", "version": "1.0.6",
"description": "Material design button", "description": "Material design button",
"authors": [ "authors": [
"The Polymer Authors" "The Polymer Authors"

View file

@ -104,12 +104,12 @@ Custom property | Description | Default
:host([raised]) .keyboard-focus { :host([raised]) .keyboard-focus {
font-weight: bold; font-weight: bold;
@apply(paper-button-raised-keyboard-focus); @apply(--paper-button-raised-keyboard-focus);
} }
:host(:not([raised])) .keyboard-focus { :host(:not([raised])) .keyboard-focus {
font-weight: bold; font-weight: bold;
@apply(paper-button-flat-keyboard-focus); @apply(--paper-button-flat-keyboard-focus);
} }
:host([disabled]) { :host([disabled]) {

View file

@ -1,6 +1,6 @@
{ {
"name": "paper-radio-button", "name": "paper-radio-button",
"version": "1.0.7", "version": "1.0.8",
"description": "A material design radio button", "description": "A material design radio button",
"authors": [ "authors": [
"The Polymer Authors" "The Polymer Authors"
@ -24,7 +24,7 @@
"paper-styles": "PolymerLabs/paper-styles#^1.0.0", "paper-styles": "PolymerLabs/paper-styles#^1.0.0",
"paper-behaviors": "PolymerElements/paper-behaviors#^1.0.0", "paper-behaviors": "PolymerElements/paper-behaviors#^1.0.0",
"iron-checked-element-behavior": "PolymerElements/iron-checked-element-behavior#^1.0.0", "iron-checked-element-behavior": "PolymerElements/iron-checked-element-behavior#^1.0.0",
"polymer": "Polymer/polymer#^1.0.0" "polymer": "Polymer/polymer#^1.1.0"
}, },
"devDependencies": { "devDependencies": {
"web-component-tester": "Polymer/web-component-tester#^3.3.0", "web-component-tester": "Polymer/web-component-tester#^3.3.0",
@ -33,11 +33,11 @@
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}, },
"_release": "1.0.7", "_release": "1.0.8",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.0.7", "tag": "v1.0.8",
"commit": "63a78475ecc28dfbc849e63001f0c8d001811e44" "commit": "f6fcf203775984877bd97393ac4a9cb2da45597b"
}, },
"_source": "git://github.com/PolymerElements/paper-radio-button.git", "_source": "git://github.com/PolymerElements/paper-radio-button.git",
"_target": "~1.0.5", "_target": "~1.0.5",

View file

@ -1,6 +1,6 @@
{ {
"name": "paper-radio-button", "name": "paper-radio-button",
"version": "1.0.7", "version": "1.0.8",
"description": "A material design radio button", "description": "A material design radio button",
"authors": [ "authors": [
"The Polymer Authors" "The Polymer Authors"
@ -24,7 +24,7 @@
"paper-styles": "PolymerLabs/paper-styles#^1.0.0", "paper-styles": "PolymerLabs/paper-styles#^1.0.0",
"paper-behaviors": "PolymerElements/paper-behaviors#^1.0.0", "paper-behaviors": "PolymerElements/paper-behaviors#^1.0.0",
"iron-checked-element-behavior": "PolymerElements/iron-checked-element-behavior#^1.0.0", "iron-checked-element-behavior": "PolymerElements/iron-checked-element-behavior#^1.0.0",
"polymer": "Polymer/polymer#^1.0.0" "polymer": "Polymer/polymer#^1.1.0"
}, },
"devDependencies": { "devDependencies": {
"web-component-tester": "Polymer/web-component-tester#^3.3.0", "web-component-tester": "Polymer/web-component-tester#^3.3.0",

View file

@ -1,114 +0,0 @@
/**
@license
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;
box-sizing: content-box;
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;
box-sizing: content-box;
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;
}

View file

@ -46,10 +46,113 @@ Custom property | Description | Default
--> -->
<dom-module id="paper-radio-button"> <dom-module id="paper-radio-button">
<link rel="import" type="css" href="paper-radio-button.css">
<template> <template>
<style>
: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;
box-sizing: content-box;
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;
box-sizing: content-box;
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;
}
</style>
<div id="radioContainer"> <div id="radioContainer">
<div id="offRadio"></div> <div id="offRadio"></div>

View file

@ -30,14 +30,14 @@
"web-component-tester": "*", "web-component-tester": "*",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}, },
"homepage": "https://github.com/polymerelements/paper-ripple", "homepage": "https://github.com/PolymerElements/paper-ripple",
"_release": "1.0.2", "_release": "1.0.2",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.0.2", "tag": "v1.0.2",
"commit": "b546dbe6ad0b1f58cac80caec3136cf3232e12fc" "commit": "b546dbe6ad0b1f58cac80caec3136cf3232e12fc"
}, },
"_source": "git://github.com/polymerelements/paper-ripple.git", "_source": "git://github.com/PolymerElements/paper-ripple.git",
"_target": "^1.0.0", "_target": "^1.0.0",
"_originalSource": "polymerelements/paper-ripple" "_originalSource": "PolymerElements/paper-ripple"
} }

View file

@ -1,6 +1,6 @@
{ {
"name": "paper-toggle-button", "name": "paper-toggle-button",
"version": "1.0.7", "version": "1.0.8",
"description": "A material design toggle button control", "description": "A material design toggle button control",
"authors": [ "authors": [
"The Polymer Authors" "The Polymer Authors"
@ -34,11 +34,11 @@
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0" "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0"
}, },
"_release": "1.0.7", "_release": "1.0.8",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.0.7", "tag": "v1.0.8",
"commit": "9abc8568d25c83c77394d141b82ff1630649ee7c" "commit": "b1630a0597b9d55d09396c8636daf443890a46df"
}, },
"_source": "git://github.com/PolymerElements/paper-toggle-button.git", "_source": "git://github.com/PolymerElements/paper-toggle-button.git",
"_target": "~1.0.5", "_target": "~1.0.5",

View file

@ -1,6 +1,6 @@
{ {
"name": "paper-toggle-button", "name": "paper-toggle-button",
"version": "1.0.7", "version": "1.0.8",
"description": "A material design toggle button control", "description": "A material design toggle button control",
"authors": [ "authors": [
"The Polymer Authors" "The Polymer Authors"

View file

@ -98,7 +98,7 @@ Custom property | Description | Default
height: 14px; height: 14px;
} }
#toggleBar { .toggle-bar {
position: absolute; position: absolute;
height: 100%; height: 100%;
width: 100%; width: 100%;
@ -108,16 +108,16 @@ Custom property | Description | Default
transition: background-color linear .08s; transition: background-color linear .08s;
} }
:host([checked]) #toggleBar { :host([checked]) .toggle-bar {
opacity: 0.5; opacity: 0.5;
} }
:host([disabled]) #toggleBar { :host([disabled]) .toggle-bar {
background-color: #000; background-color: #000;
opacity: 0.12; opacity: 0.12;
} }
#toggleButton { .toggle-button {
position: absolute; position: absolute;
top: -3px; top: -3px;
height: 20px; height: 20px;
@ -129,22 +129,22 @@ Custom property | Description | Default
will-change: transform; will-change: transform;
} }
#toggleButton.dragging { .toggle-button.dragging {
-webkit-transition: none; -webkit-transition: none;
transition: none; transition: none;
} }
:host([checked]) #toggleButton { :host([checked]) .toggle-button {
-webkit-transform: translate(16px, 0); -webkit-transform: translate(16px, 0);
transform: translate(16px, 0); transform: translate(16px, 0);
} }
:host([disabled]) #toggleButton { :host([disabled]) .toggle-button {
background-color: #bdbdbd; background-color: #bdbdbd;
opacity: 1; opacity: 1;
} }
#ink { .toggle-ink {
position: absolute; position: absolute;
top: -14px; top: -14px;
left: -14px; left: -14px;

View file

@ -709,7 +709,7 @@
var deferred = DeferredBuilder.Deferred(); var deferred = DeferredBuilder.Deferred();
if ($.browser.android) { if ($.browser.android) {
deferred.resolveWith(null, ['file://' + ]); deferred.resolveWith(null, ['file://' + path]);
return deferred.promise(); return deferred.promise();
} }

View file

@ -61,6 +61,7 @@
var info = IapManager.getProductInfo(id) || {}; var info = IapManager.getProductInfo(id) || {};
if (info.owned) { if (info.owned) {
notifyServer(id);
validatedFeatures.push(id); validatedFeatures.push(id);
deferred.resolve(); deferred.resolve();
return; return;
@ -91,6 +92,33 @@
}); });
} }
function notifyServer(id) {
if (!$.browser.android) {
return;
}
HttpClient.send({
type: "POST",
url: "https://mb3admin.com/test/admin/service/appstore/addDeviceFeature",
data: {
deviceId: ConnectionManager.deviceId(),
feature: 'com.mb.android.unlock'
},
contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
headers: {
"X-EMBY-TOKEN": "EMBY_DEVICE"
}
}).done(function (result) {
Logger.log('addDeviceFeature succeeded');
}).fail(function () {
Logger.log('addDeviceFeature failed');
});
}
function getInAppPurchaseElement(info) { function getInAppPurchaseElement(info) {
require(['paperbuttonstyle']); require(['paperbuttonstyle']);

View file

@ -94,6 +94,12 @@ var Dashboard = {
var url = data.url.toLowerCase(); var url = data.url.toLowerCase();
// Don't bounce to login on failures to contact our external servers
if (url.indexOf('emby.media') != -1) {
Dashboard.hideLoadingMsg();
return;
}
// Bounce to the login screen, but not if a password entry fails, obviously // Bounce to the login screen, but not if a password entry fails, obviously
if (url.indexOf('/password') == -1 && if (url.indexOf('/password') == -1 &&
url.indexOf('/authenticate') == -1 && url.indexOf('/authenticate') == -1 &&

View file

@ -10809,29 +10809,33 @@ The `aria-labelledby` attribute will be set to the header element, if one exists
* Cancel the event to abort selection. * Cancel the event to abort selection.
* *
* @event iron-activate * @event iron-activate
* */
**/
/** /**
* Fired when an item is selected * Fired when an item is selected
* *
* @event iron-select * @event iron-select
* */
**/
/** /**
* Fired when an item is deselected * Fired when an item is deselected
* *
* @event iron-deselect * @event iron-deselect
*/
/**
* Fired when the list of selectable items changes (e.g., items are
* added or removed). The detail of the event is a list of mutation
* records that describe what changed.
* *
**/ * @event iron-items-changed
*/
properties: { properties: {
/** /**
* If you want to use the attribute value of an element for `selected` instead of the index, * If you want to use the attribute value of an element for `selected` instead of the index,
* set this to the name of the attribute. * set this to the name of the attribute.
*
* @attribute attrForSelected
* @type {string}
*/ */
attrForSelected: { attrForSelected: {
type: String, type: String,
@ -10840,9 +10844,6 @@ The `aria-labelledby` attribute will be set to the header element, if one exists
/** /**
* Gets or sets the selected element. The default is to use the index of the item. * Gets or sets the selected element. The default is to use the index of the item.
*
* @attribute selected
* @type {string}
*/ */
selected: { selected: {
type: String, type: String,
@ -10851,9 +10852,6 @@ The `aria-labelledby` attribute will be set to the header element, if one exists
/** /**
* Returns the currently selected item. * Returns the currently selected item.
*
* @attribute selectedItem
* @type {Object}
*/ */
selectedItem: { selectedItem: {
type: Object, type: Object,
@ -10865,10 +10863,6 @@ The `aria-labelledby` attribute will be set to the header element, if one exists
* The event that fires from items when they are selected. Selectable * The event that fires from items when they are selected. Selectable
* will listen for this event from items and update the selection state. * will listen for this event from items and update the selection state.
* Set to empty string to listen to no events. * Set to empty string to listen to no events.
*
* @attribute activateEvent
* @type {string}
* @default 'tap'
*/ */
activateEvent: { activateEvent: {
type: String, type: String,
@ -10879,17 +10873,11 @@ The `aria-labelledby` attribute will be set to the header element, if one exists
/** /**
* This is a CSS selector string. If this is set, only items that match the CSS selector * This is a CSS selector string. If this is set, only items that match the CSS selector
* are selectable. * are selectable.
*
* @attribute selectable
* @type {string}
*/ */
selectable: String, selectable: String,
/** /**
* The class to set on elements when selected. * The class to set on elements when selected.
*
* @attribute selectedClass
* @type {string}
*/ */
selectedClass: { selectedClass: {
type: String, type: String,
@ -10898,9 +10886,6 @@ The `aria-labelledby` attribute will be set to the header element, if one exists
/** /**
* The attribute to set on elements when selected. * The attribute to set on elements when selected.
*
* @attribute selectedAttribute
* @type {string}
*/ */
selectedAttribute: { selectedAttribute: {
type: String, type: String,
@ -10911,10 +10896,8 @@ The `aria-labelledby` attribute will be set to the header element, if one exists
* The set of excluded elements where the key is the `localName` * The set of excluded elements where the key is the `localName`
* of the element that will be ignored from the item list. * of the element that will be ignored from the item list.
* *
* @type {object}
* @default {template: 1} * @default {template: 1}
*/ */
excludedLocalNames: { excludedLocalNames: {
type: Object, type: Object,
value: function() { value: function() {
@ -11083,7 +11066,15 @@ The `aria-labelledby` attribute will be set to the header element, if one exists
// observe items change under the given node. // observe items change under the given node.
_observeItems: function(node) { _observeItems: function(node) {
var observer = new MutationObserver(function() { // TODO(cdata): Update this when we get distributed children changed.
var observer = new MutationObserver(function(mutations) {
// Let other interested parties know about the change so that
// we don't have to recreate mutation observers everywher.
this.fire('iron-items-changed', mutations, {
bubbles: false,
cancelable: false
});
if (this.selected != null) { if (this.selected != null) {
this._updateSelected(); this._updateSelected();
} }
@ -13791,12 +13782,12 @@ is separate from validation, and `allowed-pattern` does not affect how the input
:host([raised]) .keyboard-focus { :host([raised]) .keyboard-focus {
font-weight: bold; font-weight: bold;
@apply(paper-button-raised-keyboard-focus); @apply(--paper-button-raised-keyboard-focus);
} }
:host(:not([raised])) .keyboard-focus { :host(:not([raised])) .keyboard-focus {
font-weight: bold; font-weight: bold;
@apply(paper-button-flat-keyboard-focus); @apply(--paper-button-flat-keyboard-focus);
} }
:host([disabled]) { :host([disabled]) {
@ -18931,37 +18922,27 @@ paper-ripple {
</script> </script>
<dom-module id="paper-radio-button" assetpath="bower_components/paper-radio-button/"> <dom-module id="paper-radio-button" assetpath="bower_components/paper-radio-button/">
<template>
<style> <style>
/** :host {
@license
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; display: inline-block;
white-space: nowrap; white-space: nowrap;
} }
:host(:focus) { :host(:focus) {
outline: none; outline: none;
} }
#radioContainer { #radioContainer {
display: inline-block; display: inline-block;
position: relative; position: relative;
width: 16px; width: 16px;
height: 16px; height: 16px;
cursor: pointer; cursor: pointer;
vertical-align: middle; vertical-align: middle;
} }
:host #ink { :host #ink {
position: absolute; position: absolute;
top: -16px; top: -16px;
left: -16px; left: -16px;
@ -18970,13 +18951,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
color: var(--paper-radio-button-unchecked-ink-color, --primary-text-color); color: var(--paper-radio-button-unchecked-ink-color, --primary-text-color);
opacity: 0.6; opacity: 0.6;
pointer-events: none; pointer-events: none;
} }
:host #ink[checked] { :host #ink[checked] {
color: var(--paper-radio-button-checked-ink-color, --default-primary-color); color: var(--paper-radio-button-checked-ink-color, --default-primary-color);
} }
:host #offRadio { :host #offRadio {
position: absolute; position: absolute;
box-sizing: content-box; box-sizing: content-box;
top: 0px; top: 0px;
@ -18988,9 +18969,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
background-color: var(--paper-radio-button-unchecked-background-color, transparent); background-color: var(--paper-radio-button-unchecked-background-color, transparent);
border-color: var(--paper-radio-button-unchecked-color, --primary-text-color); border-color: var(--paper-radio-button-unchecked-color, --primary-text-color);
transition: border-color 0.28s; transition: border-color 0.28s;
} }
:host #onRadio { :host #onRadio {
position: absolute; position: absolute;
box-sizing: content-box; box-sizing: content-box;
top: 4px; top: 4px;
@ -19003,18 +18984,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
transform: scale(0); transform: scale(0);
transition: -webkit-transform ease 0.28s; transition: -webkit-transform ease 0.28s;
transition: transform ease 0.28s; transition: transform ease 0.28s;
} }
:host([checked]) #offRadio { :host([checked]) #offRadio {
border-color: var(--paper-radio-button-checked-color, --default-primary-color); border-color: var(--paper-radio-button-checked-color, --default-primary-color);
} }
:host([checked]) #onRadio { :host([checked]) #onRadio {
-webkit-transform: scale(1); -webkit-transform: scale(1);
transform: scale(1); transform: scale(1);
} }
#radioLabel { #radioLabel {
position: relative; position: relative;
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
@ -19022,35 +19003,32 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
white-space: normal; white-space: normal;
pointer-events: none; pointer-events: none;
color: var(--paper-radio-button-label-color, --primary-text-color); color: var(--paper-radio-button-label-color, --primary-text-color);
} }
#radioLabel[hidden] { #radioLabel[hidden] {
display: none; display: none;
} }
/* disabled state */ /* disabled state */
:host([disabled]) { :host([disabled]) {
pointer-events: none; pointer-events: none;
} }
:host([disabled]) #offRadio { :host([disabled]) #offRadio {
border-color: var(--paper-radio-button-unchecked-color, --primary-text-color); border-color: var(--paper-radio-button-unchecked-color, --primary-text-color);
opacity: 0.5; opacity: 0.5;
} }
:host([disabled][checked]) #onRadio { :host([disabled][checked]) #onRadio {
background-color: var(--paper-radio-button-unchecked-color, --primary-text-color); background-color: var(--paper-radio-button-unchecked-color, --primary-text-color);
opacity: 0.5; opacity: 0.5;
} }
:host([disabled]) #radioLabel { :host([disabled]) #radioLabel {
/* slightly darker than the button, so that it's readable */ /* slightly darker than the button, so that it's readable */
opacity: 0.65; opacity: 0.65;
} }
</style>
</style>
<template>
<div id="radioContainer"> <div id="radioContainer">
<div id="offRadio"></div> <div id="offRadio"></div>