mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update polymer
This commit is contained in:
parent
d2bb0d6805
commit
d96a2b7946
28 changed files with 109 additions and 118 deletions
|
@ -166,7 +166,7 @@
|
||||||
var accessToken = currentServerInfo.AccessToken;
|
var accessToken = currentServerInfo.AccessToken;
|
||||||
|
|
||||||
if (accessToken) {
|
if (accessToken) {
|
||||||
headers['X-MediaBrowser-Token'] = accessToken;
|
headers['X-Emby-Token'] = accessToken;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -356,6 +356,10 @@
|
||||||
throw new Error("serverAddress is yet not set");
|
throw new Error("serverAddress is yet not set");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (url.toLowerCase().indexOf('/emby') == -1) {
|
||||||
|
url += '/emby';
|
||||||
|
}
|
||||||
|
|
||||||
if (name.charAt(0) != '/') {
|
if (name.charAt(0) != '/') {
|
||||||
url += '/';
|
url += '/';
|
||||||
}
|
}
|
||||||
|
@ -407,7 +411,7 @@
|
||||||
throw new Error("Cannot open web socket without access token.");
|
throw new Error("Cannot open web socket without access token.");
|
||||||
}
|
}
|
||||||
|
|
||||||
var url = serverAddress.replace('http', 'ws');
|
var url = self.getUrl("socket").replace("/socket", "").replace('http', 'ws');
|
||||||
url += "?api_key=" + accessToken;
|
url += "?api_key=" + accessToken;
|
||||||
url += "&deviceId=" + deviceId;
|
url += "&deviceId=" + deviceId;
|
||||||
|
|
||||||
|
|
|
@ -79,9 +79,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getEmbyServerUrl(baseUrl, handler) {
|
||||||
|
return baseUrl + "/emby/" + handler;
|
||||||
|
}
|
||||||
|
|
||||||
function tryConnect(url, timeout) {
|
function tryConnect(url, timeout) {
|
||||||
|
|
||||||
url += "/system/info/public";
|
url = getEmbyServerUrl(url, "system/info/public");
|
||||||
|
|
||||||
logger.log('tryConnect url: ' + url);
|
logger.log('tryConnect url: ' + url);
|
||||||
|
|
||||||
|
@ -399,14 +403,14 @@
|
||||||
|
|
||||||
var url = MediaBrowser.ServerInfo.getServerAddress(server, connectionMode);
|
var url = MediaBrowser.ServerInfo.getServerAddress(server, connectionMode);
|
||||||
|
|
||||||
url += "/Connect/Exchange?format=json&ConnectUserId=" + credentials.ConnectUserId;
|
url = getEmbyServerUrl(url, "Connect/Exchange?format=json&ConnectUserId=" + credentials.ConnectUserId);
|
||||||
|
|
||||||
return HttpClient.send({
|
return HttpClient.send({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
url: url,
|
url: url,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
headers: {
|
headers: {
|
||||||
"X-MediaBrowser-Token": server.ExchangeToken
|
"X-Emby-Token": server.ExchangeToken
|
||||||
}
|
}
|
||||||
|
|
||||||
}).done(function (auth) {
|
}).done(function (auth) {
|
||||||
|
@ -430,10 +434,10 @@
|
||||||
HttpClient.send({
|
HttpClient.send({
|
||||||
|
|
||||||
type: "GET",
|
type: "GET",
|
||||||
url: url + "/system/info",
|
url: getEmbyServerUrl(url, "System/Info"),
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
headers: {
|
headers: {
|
||||||
"X-MediaBrowser-Token": server.AccessToken
|
"X-Emby-Token": server.AccessToken
|
||||||
}
|
}
|
||||||
|
|
||||||
}).done(function (systemInfo) {
|
}).done(function (systemInfo) {
|
||||||
|
@ -445,10 +449,10 @@
|
||||||
HttpClient.send({
|
HttpClient.send({
|
||||||
|
|
||||||
type: "GET",
|
type: "GET",
|
||||||
url: url + "/users/" + server.UserId,
|
url: getEmbyServerUrl(url, "users/" + server.UserId),
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
headers: {
|
headers: {
|
||||||
"X-MediaBrowser-Token": server.AccessToken
|
"X-Emby-Token": server.AccessToken
|
||||||
}
|
}
|
||||||
|
|
||||||
}).done(function (user) {
|
}).done(function (user) {
|
||||||
|
|
|
@ -29,14 +29,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-a11y-keys-behavior",
|
"homepage": "https://github.com/PolymerElements/iron-a11y-keys-behavior",
|
||||||
"_release": "1.0.6",
|
"_release": "1.0.6",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.6",
|
"tag": "v1.0.6",
|
||||||
"commit": "af5c98b1cf9b3d180a6326c99ac9c7057eee647f"
|
"commit": "af5c98b1cf9b3d180a6326c99ac9c7057eee647f"
|
||||||
},
|
},
|
||||||
"_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"
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "iron-iconset-svg",
|
"name": "iron-iconset-svg",
|
||||||
"description": "Manages a set of svg icons",
|
"description": "Manages a set of svg icons",
|
||||||
"version": "1.0.5",
|
"version": "1.0.6",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"web-components",
|
"web-components",
|
||||||
"polymer",
|
"polymer",
|
||||||
|
@ -30,11 +30,11 @@
|
||||||
"web-component-tester": "*"
|
"web-component-tester": "*"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/polymerelements/iron-iconset-svg",
|
"homepage": "https://github.com/polymerelements/iron-iconset-svg",
|
||||||
"_release": "1.0.5",
|
"_release": "1.0.6",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.5",
|
"tag": "v1.0.6",
|
||||||
"commit": "54d35698c1e06462452997f8731ea31a4bf1638c"
|
"commit": "ebd17924942abe6110aa0fe81b1b31e1fcc34a9f"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/polymerelements/iron-iconset-svg.git",
|
"_source": "git://github.com/polymerelements/iron-iconset-svg.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "iron-iconset-svg",
|
"name": "iron-iconset-svg",
|
||||||
"description": "Manages a set of svg icons",
|
"description": "Manages a set of svg icons",
|
||||||
"version": "1.0.5",
|
"version": "1.0.6",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"web-components",
|
"web-components",
|
||||||
"polymer",
|
"polymer",
|
||||||
|
|
|
@ -179,13 +179,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
*/
|
*/
|
||||||
_prepareSvgClone: function(sourceSvg, size) {
|
_prepareSvgClone: function(sourceSvg, size) {
|
||||||
if (sourceSvg) {
|
if (sourceSvg) {
|
||||||
var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
var content = sourceSvg.cloneNode(true),
|
||||||
svg.setAttribute('viewBox', ['0', '0', size, size].join(' '));
|
svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'),
|
||||||
|
viewBox = content.getAttribute('viewBox') || '0 0 ' + size + ' ' + size;
|
||||||
|
svg.setAttribute('viewBox', viewBox);
|
||||||
svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');
|
svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');
|
||||||
// TODO(dfreedm): `pointer-events: none` works around https://crbug.com/370136
|
// TODO(dfreedm): `pointer-events: none` works around https://crbug.com/370136
|
||||||
// TODO(sjmiles): inline style may not be ideal, but avoids requiring a shadow-root
|
// TODO(sjmiles): inline style may not be ideal, but avoids requiring a shadow-root
|
||||||
svg.style.cssText = 'pointer-events: none; display: block; width: 100%; height: 100%;';
|
svg.style.cssText = 'pointer-events: none; display: block; width: 100%; height: 100%;';
|
||||||
svg.appendChild(sourceSvg.cloneNode(true)).removeAttribute('id');
|
svg.appendChild(content).removeAttribute('id');
|
||||||
return svg;
|
return svg;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -42,6 +42,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
<defs>
|
<defs>
|
||||||
<circle id="circle" cx="20" cy="20" r="10"></circle>
|
<circle id="circle" cx="20" cy="20" r="10"></circle>
|
||||||
<rect id="square" x="0" y="0" width="20" height="20"></rect>
|
<rect id="square" x="0" y="0" width="20" height="20"></rect>
|
||||||
|
<symbol id="rect" viewBox="0 0 50 25">
|
||||||
|
<rect x="0" y="0" width="50" height="25"></rect>
|
||||||
|
</symbol>
|
||||||
</defs>
|
</defs>
|
||||||
</svg>
|
</svg>
|
||||||
</iron-iconset-svg>
|
</iron-iconset-svg>
|
||||||
|
@ -97,7 +100,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
});
|
});
|
||||||
|
|
||||||
test('can be queried for all available icons', function () {
|
test('can be queried for all available icons', function () {
|
||||||
expect(iconset.getIconNames()).to.deep.eql(['my-icons:circle', 'my-icons:square']);
|
expect(iconset.getIconNames()).to.deep.eql(['my-icons:circle', 'my-icons:square', 'my-icons:rect']);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('supports any icon defined in the svg', function () {
|
test('supports any icon defined in the svg', function () {
|
||||||
|
@ -110,6 +113,16 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('prefers a viewBox attribute over the iconset size', function () {
|
||||||
|
iconset.applyIcon(div, 'rect');
|
||||||
|
expect(div.firstElementChild.getAttribute('viewBox')).to.be.equal('0 0 50 25');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('uses the iconset size when viewBox is not defined on the element', function () {
|
||||||
|
iconset.applyIcon(div, 'circle');
|
||||||
|
expect(div.firstElementChild.getAttribute('viewBox')).to.be.equal('0 0 20 20');
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iron-selector",
|
"name": "iron-selector",
|
||||||
"version": "1.0.5",
|
"version": "1.0.6",
|
||||||
"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",
|
||||||
|
@ -32,11 +32,11 @@
|
||||||
"web-component-tester": "*",
|
"web-component-tester": "*",
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"_release": "1.0.5",
|
"_release": "1.0.6",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.5",
|
"tag": "v1.0.6",
|
||||||
"commit": "396ef93a5d3467810cec0328c53f09037d6ee8e1"
|
"commit": "08fa18c70b79abdee8a02486223ab9a4f0acc72c"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/iron-selector.git",
|
"_source": "git://github.com/PolymerElements/iron-selector.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iron-selector",
|
"name": "iron-selector",
|
||||||
"version": "1.0.5",
|
"version": "1.0.6",
|
||||||
"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",
|
||||||
|
|
|
@ -111,7 +111,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
* @type {object}
|
* @type {object}
|
||||||
* @default {template: 1}
|
* @default {template: 1}
|
||||||
*/
|
*/
|
||||||
excludedLocalNames: {
|
_excludedLocalNames: {
|
||||||
type: Object,
|
type: Object,
|
||||||
value: function() {
|
value: function() {
|
||||||
return {
|
return {
|
||||||
|
@ -223,7 +223,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
},
|
},
|
||||||
|
|
||||||
_filterItem: function(node) {
|
_filterItem: function(node) {
|
||||||
return !this.excludedLocalNames[node.localName];
|
return !this._excludedLocalNames[node.localName];
|
||||||
},
|
},
|
||||||
|
|
||||||
_valueToItem: function(value) {
|
_valueToItem: function(value) {
|
||||||
|
|
|
@ -57,22 +57,22 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
test2 = fixture('test2');
|
test2 = fixture('test2');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('default `excludedLocalNames`', function() {
|
test('default `_excludedLocalNames`', function() {
|
||||||
assert.isTrue('template' in test1.excludedLocalNames);
|
assert.isTrue('template' in test1._excludedLocalNames);
|
||||||
assert.isTrue('template' in test2.excludedLocalNames);
|
assert.isTrue('template' in test2._excludedLocalNames);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('custom `excludedLocalNames`', function() {
|
test('custom `_excludedLocalNames`', function() {
|
||||||
test1.excludedLocalNames.foo = 1;
|
test1._excludedLocalNames.foo = 1;
|
||||||
|
|
||||||
assert.isTrue('foo' in test1.excludedLocalNames);
|
assert.isTrue('foo' in test1._excludedLocalNames);
|
||||||
assert.isFalse('foo' in test2.excludedLocalNames);
|
assert.isFalse('foo' in test2._excludedLocalNames);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
test('items', function() {
|
test('items', function() {
|
||||||
test1.excludedLocalNames.span = 1;
|
test1._excludedLocalNames.span = 1;
|
||||||
test2.excludedLocalNames.div = 1;
|
test2._excludedLocalNames.div = 1;
|
||||||
|
|
||||||
var NOT_FOUND = -1;
|
var NOT_FOUND = -1;
|
||||||
var items1 = test1.items.map(function(el) { return el.localName; });
|
var items1 = test1.items.map(function(el) { return el.localName; });
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
"tag": "v1.0.4",
|
"tag": "v1.0.4",
|
||||||
"commit": "a7ac7fbdb79b4d82416ec9b41613575386d0d226"
|
"commit": "a7ac7fbdb79b4d82416ec9b41613575386d0d226"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/polymerelements/paper-behaviors.git",
|
"_source": "git://github.com/PolymerElements/paper-behaviors.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "polymerelements/paper-behaviors"
|
"_originalSource": "PolymerElements/paper-behaviors"
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "paper-checkbox",
|
"name": "paper-checkbox",
|
||||||
"version": "1.0.10",
|
"version": "1.0.11",
|
||||||
"description": "A material design checkbox",
|
"description": "A material design checkbox",
|
||||||
"authors": [
|
"authors": [
|
||||||
"The Polymer Authors"
|
"The Polymer Authors"
|
||||||
|
@ -35,11 +35,11 @@
|
||||||
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
|
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
|
||||||
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
|
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
|
||||||
},
|
},
|
||||||
"_release": "1.0.10",
|
"_release": "1.0.11",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.10",
|
"tag": "v1.0.11",
|
||||||
"commit": "ce4a8e8663892e95fccc0142055db214fa292d6d"
|
"commit": "00a147c81fe766f5c90222b2d1b0d8b5ddb12be5"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/paper-checkbox.git",
|
"_source": "git://github.com/PolymerElements/paper-checkbox.git",
|
||||||
"_target": "~1.0.5",
|
"_target": "~1.0.5",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "paper-checkbox",
|
"name": "paper-checkbox",
|
||||||
"version": "1.0.10",
|
"version": "1.0.11",
|
||||||
"description": "A material design checkbox",
|
"description": "A material design checkbox",
|
||||||
"authors": [
|
"authors": [
|
||||||
"The Polymer Authors"
|
"The Polymer Authors"
|
||||||
|
|
|
@ -80,7 +80,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
<div>
|
<div>
|
||||||
<h4>Color</h4>
|
<h4>Color</h4>
|
||||||
<div class="horizontal-section">
|
<div class="horizontal-section">
|
||||||
<paper-checkbox class="blue" checked>Oxygen</paper-checkbox>
|
<paper-checkbox class="blue" checked aria-label="Hurray for oxygen">Oxygen</paper-checkbox>
|
||||||
<paper-checkbox class="red" checked>Carbon</paper-checkbox>
|
<paper-checkbox class="red" checked>Carbon</paper-checkbox>
|
||||||
<paper-checkbox class="orange" checked>Hydrogen</paper-checkbox>
|
<paper-checkbox class="orange" checked>Hydrogen</paper-checkbox>
|
||||||
<paper-checkbox class="green" checked>Nitrogen</paper-checkbox>
|
<paper-checkbox class="green" checked>Nitrogen</paper-checkbox>
|
||||||
|
|
|
@ -14,7 +14,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
<link rel="import" href="../paper-styles/color.html">
|
<link rel="import" href="../paper-styles/color.html">
|
||||||
<link rel="import" href="../paper-behaviors/paper-inky-focus-behavior.html">
|
<link rel="import" href="../paper-behaviors/paper-inky-focus-behavior.html">
|
||||||
<link rel="import" href="../iron-checked-element-behavior/iron-checked-element-behavior.html">
|
<link rel="import" href="../iron-checked-element-behavior/iron-checked-element-behavior.html">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
Material design: [Checkbox](https://www.google.com/design/spec/components/selection-controls.html#selection-controls-checkbox)
|
||||||
|
|
||||||
`paper-checkbox` is a button that can be either checked or unchecked. User
|
`paper-checkbox` is a button that can be either checked or unchecked. User
|
||||||
can tap the checkbox to check or uncheck it. Usually you use checkboxes
|
can tap the checkbox to check or uncheck it. Usually you use checkboxes
|
||||||
|
@ -243,23 +245,6 @@ Custom property | Description | Default
|
||||||
|
|
||||||
attached: function() {
|
attached: function() {
|
||||||
this._isReady = true;
|
this._isReady = true;
|
||||||
|
|
||||||
// Don't stomp over a user-set aria-label.
|
|
||||||
if (!this.getAttribute('aria-label')) {
|
|
||||||
this.updateAriaLabel();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update the checkbox aria-label. This is a temporary workaround not
|
|
||||||
* being able to observe changes in <content>
|
|
||||||
* (see: https://github.com/Polymer/polymer/issues/1773)
|
|
||||||
*
|
|
||||||
* Call this if you manually change the contents of the checkbox
|
|
||||||
* and want the aria-label to match the new contents.
|
|
||||||
*/
|
|
||||||
updateAriaLabel: function() {
|
|
||||||
this.setAttribute('aria-label', Polymer.dom(this).textContent.trim());
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// button-behavior hook
|
// button-behavior hook
|
||||||
|
|
|
@ -96,16 +96,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
c1.checked = true;
|
c1.checked = true;
|
||||||
assert.isTrue(c1.validate());
|
assert.isTrue(c1.validate());
|
||||||
});
|
});
|
||||||
|
|
||||||
test('checkbox label can be updated', function() {
|
|
||||||
Polymer.dom(c1).textContent = 'Batman';
|
|
||||||
c1.updateAriaLabel();
|
|
||||||
assert.isTrue(c1.getAttribute('aria-label') == 'Batman');
|
|
||||||
|
|
||||||
Polymer.dom(c1).textContent = 'Robin';
|
|
||||||
c1.updateAriaLabel();
|
|
||||||
assert.isTrue(c1.getAttribute('aria-label') == 'Robin');
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
suite('a11y', function() {
|
suite('a11y', function() {
|
||||||
|
@ -126,10 +116,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
assert.isTrue(!c1.getAttribute('aria-label'));
|
assert.isTrue(!c1.getAttribute('aria-label'));
|
||||||
});
|
});
|
||||||
|
|
||||||
test('checkbox with a label sets an aria label', function() {
|
|
||||||
assert.isTrue(c2.getAttribute('aria-label') == "Batman");
|
|
||||||
});
|
|
||||||
|
|
||||||
test('checkbox respects the user set aria-label', function() {
|
test('checkbox respects the user set aria-label', function() {
|
||||||
var c = fixture('AriaLabel');
|
var c = fixture('AriaLabel');
|
||||||
assert.isTrue(c.getAttribute('aria-label') == "Batman");
|
assert.isTrue(c.getAttribute('aria-label') == "Batman");
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "paper-tabs",
|
"name": "paper-tabs",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"license": "http://polymer.github.io/LICENSE.txt",
|
"license": "http://polymer.github.io/LICENSE.txt",
|
||||||
"description": "Material design tabs",
|
"description": "Material design tabs",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
@ -39,11 +39,11 @@
|
||||||
"web-component-tester": "*"
|
"web-component-tester": "*"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/PolymerElements/paper-tabs",
|
"homepage": "https://github.com/PolymerElements/paper-tabs",
|
||||||
"_release": "1.0.3",
|
"_release": "1.0.4",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.3",
|
"tag": "v1.0.4",
|
||||||
"commit": "19546ca9fbe23da457177cac8de1a7720cb62c57"
|
"commit": "b07b594cc08e7c97cda7e9b30b0bdd6c8969226c"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/paper-tabs.git",
|
"_source": "git://github.com/PolymerElements/paper-tabs.git",
|
||||||
"_target": "~1.0.0",
|
"_target": "~1.0.0",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "paper-tabs",
|
"name": "paper-tabs",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"license": "http://polymer.github.io/LICENSE.txt",
|
"license": "http://polymer.github.io/LICENSE.txt",
|
||||||
"description": "Material design tabs",
|
"description": "Material design tabs",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|
|
@ -20,6 +20,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
<link rel="import" href="paper-tab.html">
|
<link rel="import" href="paper-tab.html">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
Material design: [Tabs](https://www.google.com/design/spec/components/tabs.html)
|
||||||
|
|
||||||
`paper-tabs` makes it easy to explore and switch between different views or functional aspects of
|
`paper-tabs` makes it easy to explore and switch between different views or functional aspects of
|
||||||
an app, or to browse categorized data sets.
|
an app, or to browse categorized data sets.
|
||||||
|
|
||||||
|
@ -125,6 +127,7 @@ Custom property | Description | Default
|
||||||
|
|
||||||
.not-visible {
|
.not-visible {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
paper-icon-button {
|
paper-icon-button {
|
||||||
|
@ -172,7 +175,7 @@ Custom property | Description | Default
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
||||||
<paper-icon-button icon="paper-tabs:chevron-left" class$="[[_computeScrollButtonClass(_leftHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onLeftScrollButtonDown"></paper-icon-button>
|
<paper-icon-button icon="paper-tabs:chevron-left" class$="[[_computeScrollButtonClass(_leftHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onLeftScrollButtonDown" tabindex="-1"></paper-icon-button>
|
||||||
|
|
||||||
<div id="tabsContainer" class="flex" on-track="_scroll" on-down="_down">
|
<div id="tabsContainer" class="flex" on-track="_scroll" on-down="_down">
|
||||||
|
|
||||||
|
@ -187,7 +190,7 @@ Custom property | Description | Default
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<paper-icon-button icon="paper-tabs:chevron-right" class$="[[_computeScrollButtonClass(_rightHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onRightScrollButtonDown"></paper-icon-button>
|
<paper-icon-button icon="paper-tabs:chevron-right" class$="[[_computeScrollButtonClass(_rightHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onRightScrollButtonDown" tabindex="-1"></paper-icon-button>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
2
dashboard-ui/cordova/ios/tabbar.js
vendored
2
dashboard-ui/cordova/ios/tabbar.js
vendored
|
@ -101,7 +101,7 @@
|
||||||
|
|
||||||
var tabs = ['Library', 'Favorites', 'Search', 'NowPlaying'];
|
var tabs = ['Library', 'Favorites', 'Search', 'NowPlaying'];
|
||||||
|
|
||||||
if (user.Policy.EnableSync) {
|
if (user.Policy.EnableSync && Dashboard.capabilities().SupportsSync) {
|
||||||
|
|
||||||
tabs.push('Sync');
|
tabs.push('Sync');
|
||||||
}
|
}
|
||||||
|
|
|
@ -364,7 +364,7 @@
|
||||||
html += '<div class="sidebarDivider"></div>';
|
html += '<div class="sidebarDivider"></div>';
|
||||||
|
|
||||||
if (user.localUser && showUserAtTop()) {
|
if (user.localUser && showUserAtTop()) {
|
||||||
html += '<a class="sidebarLink lnkMediaFolder lnkMySettings" onclick="return LibraryMenu.onLinkClicked(event, this);" data-itemid="mysync" href="mypreferencesmenu.html?userId=' + user.localUser.Id + '"><iron-icon icon="settings" class="sidebarLinkIcon"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonSettings') + '</span></a>';
|
html += '<a class="sidebarLink lnkMediaFolder lnkMySettings" onclick="return LibraryMenu.onLinkClicked(event, this);" href="mypreferencesmenu.html?userId=' + user.localUser.Id + '"><iron-icon icon="settings" class="sidebarLinkIcon"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonSettings') + '</span></a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
html += '<a class="sidebarLink lnkMediaFolder lnkMySync" data-itemid="mysync" onclick="return LibraryMenu.onLinkClicked(event, this);" href="mysync.html"><iron-icon icon="sync" class="sidebarLinkIcon"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonSync') + '</span></a>';
|
html += '<a class="sidebarLink lnkMediaFolder lnkMySync" data-itemid="mysync" onclick="return LibraryMenu.onLinkClicked(event, this);" href="mysync.html"><iron-icon icon="sync" class="sidebarLinkIcon"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonSync') + '</span></a>';
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
window.LocalSync = {
|
window.LocalSync = {
|
||||||
|
|
||||||
isSupported: function () {
|
isSupported: function () {
|
||||||
return AppInfo.isNativeApp;
|
return AppInfo.isNativeApp && Dashboard.capabilities().SupportsSync;
|
||||||
},
|
},
|
||||||
|
|
||||||
sync: function (options) {
|
sync: function (options) {
|
||||||
|
|
|
@ -926,11 +926,6 @@
|
||||||
return s.Type == 'Subtitle';
|
return s.Type == 'Subtitle';
|
||||||
});
|
});
|
||||||
|
|
||||||
// Reports of stuttering with h264 stream copy in IE
|
|
||||||
if (streamInfo.playMethod == 'Transcode' && streamInfo.url.indexOf('.m3u8') == -1) {
|
|
||||||
streamInfo.url += '&EnableAutoStreamCopy=false';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create video player
|
// Create video player
|
||||||
var mediaPlayerContainer = $("#mediaPlayer").show();
|
var mediaPlayerContainer = $("#mediaPlayer").show();
|
||||||
var videoControls = $('.videoControls', mediaPlayerContainer);
|
var videoControls = $('.videoControls', mediaPlayerContainer);
|
||||||
|
|
|
@ -950,10 +950,16 @@
|
||||||
|
|
||||||
if (mediaSource.TranscodingSubProtocol == 'hls') {
|
if (mediaSource.TranscodingSubProtocol == 'hls') {
|
||||||
|
|
||||||
|
// Reports of stuttering with h264 stream copy in IE
|
||||||
|
mediaUrl += '&EnableAutoStreamCopy=false';
|
||||||
|
|
||||||
mediaUrl += seekParam;
|
mediaUrl += seekParam;
|
||||||
contentType = 'application/x-mpegURL';
|
contentType = 'application/x-mpegURL';
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
// Reports of stuttering with h264 stream copy in IE
|
||||||
|
mediaUrl += '&EnableAutoStreamCopy=false';
|
||||||
|
|
||||||
startTimeTicksOffset = startPosition || 0;
|
startTimeTicksOffset = startPosition || 0;
|
||||||
contentType = 'video/' + mediaSource.TranscodingContainer;
|
contentType = 'video/' + mediaSource.TranscodingContainer;
|
||||||
}
|
}
|
||||||
|
@ -1893,7 +1899,6 @@
|
||||||
|
|
||||||
self.createStreamInfo('Audio', item, mediaSource, startPositionTicks).done(function (streamInfo) {
|
self.createStreamInfo('Audio', item, mediaSource, startPositionTicks).done(function (streamInfo) {
|
||||||
|
|
||||||
var audioUrl = streamInfo.url;
|
|
||||||
self.startTimeTicksOffset = streamInfo.startTimeTicksOffset;
|
self.startTimeTicksOffset = streamInfo.startTimeTicksOffset;
|
||||||
|
|
||||||
var initialVolume = self.getSavedVolume();
|
var initialVolume = self.getSavedVolume();
|
||||||
|
|
|
@ -1549,7 +1549,7 @@ var Dashboard = {
|
||||||
SupportedLiveMediaTypes: ['Audio', 'Video']
|
SupportedLiveMediaTypes: ['Audio', 'Video']
|
||||||
};
|
};
|
||||||
|
|
||||||
if (Dashboard.isRunningInCordova()) {
|
if (Dashboard.isRunningInCordova() && !$.browser.safari) {
|
||||||
caps.SupportsOfflineAccess = true;
|
caps.SupportsOfflineAccess = true;
|
||||||
caps.SupportsSync = true;
|
caps.SupportsSync = true;
|
||||||
caps.SupportsContentUploading = true;
|
caps.SupportsContentUploading = true;
|
||||||
|
@ -2317,7 +2317,11 @@ var AppInfo = {};
|
||||||
var deps = [];
|
var deps = [];
|
||||||
|
|
||||||
if (AppInfo.isNativeApp && $.browser.safari) {
|
if (AppInfo.isNativeApp && $.browser.safari) {
|
||||||
deps.push('cordova/ios/backgroundfetch');
|
|
||||||
|
if (Dashboard.capabilities().SupportsSync) {
|
||||||
|
deps.push('cordova/ios/backgroundfetch');
|
||||||
|
}
|
||||||
|
|
||||||
deps.push('cordova/ios/tabbar');
|
deps.push('cordova/ios/tabbar');
|
||||||
}
|
}
|
||||||
if (AppInfo.isNativeApp && $.browser.android) {
|
if (AppInfo.isNativeApp && $.browser.android) {
|
||||||
|
|
|
@ -362,6 +362,10 @@
|
||||||
|
|
||||||
function isAvailable(item, user) {
|
function isAvailable(item, user) {
|
||||||
|
|
||||||
|
if (AppInfo.isNativeApp && !Dashboard.capabilities().SupportsSync) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return item.SupportsSync;
|
return item.SupportsSync;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10898,7 +10898,7 @@ The `aria-labelledby` attribute will be set to the header element, if one exists
|
||||||
* @type {object}
|
* @type {object}
|
||||||
* @default {template: 1}
|
* @default {template: 1}
|
||||||
*/
|
*/
|
||||||
excludedLocalNames: {
|
_excludedLocalNames: {
|
||||||
type: Object,
|
type: Object,
|
||||||
value: function() {
|
value: function() {
|
||||||
return {
|
return {
|
||||||
|
@ -11010,7 +11010,7 @@ The `aria-labelledby` attribute will be set to the header element, if one exists
|
||||||
},
|
},
|
||||||
|
|
||||||
_filterItem: function(node) {
|
_filterItem: function(node) {
|
||||||
return !this.excludedLocalNames[node.localName];
|
return !this._excludedLocalNames[node.localName];
|
||||||
},
|
},
|
||||||
|
|
||||||
_valueToItem: function(value) {
|
_valueToItem: function(value) {
|
||||||
|
@ -11886,13 +11886,15 @@ The `aria-labelledby` attribute will be set to the header element, if one exists
|
||||||
*/
|
*/
|
||||||
_prepareSvgClone: function(sourceSvg, size) {
|
_prepareSvgClone: function(sourceSvg, size) {
|
||||||
if (sourceSvg) {
|
if (sourceSvg) {
|
||||||
var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
var content = sourceSvg.cloneNode(true),
|
||||||
svg.setAttribute('viewBox', ['0', '0', size, size].join(' '));
|
svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'),
|
||||||
|
viewBox = content.getAttribute('viewBox') || '0 0 ' + size + ' ' + size;
|
||||||
|
svg.setAttribute('viewBox', viewBox);
|
||||||
svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');
|
svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');
|
||||||
// TODO(dfreedm): `pointer-events: none` works around https://crbug.com/370136
|
// TODO(dfreedm): `pointer-events: none` works around https://crbug.com/370136
|
||||||
// TODO(sjmiles): inline style may not be ideal, but avoids requiring a shadow-root
|
// TODO(sjmiles): inline style may not be ideal, but avoids requiring a shadow-root
|
||||||
svg.style.cssText = 'pointer-events: none; display: block; width: 100%; height: 100%;';
|
svg.style.cssText = 'pointer-events: none; display: block; width: 100%; height: 100%;';
|
||||||
svg.appendChild(sourceSvg.cloneNode(true)).removeAttribute('id');
|
svg.appendChild(content).removeAttribute('id');
|
||||||
return svg;
|
return svg;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -16167,6 +16169,7 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] {
|
||||||
|
|
||||||
.not-visible {
|
.not-visible {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
paper-icon-button {
|
paper-icon-button {
|
||||||
|
@ -16214,7 +16217,7 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
||||||
<paper-icon-button icon="paper-tabs:chevron-left" class$="[[_computeScrollButtonClass(_leftHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onLeftScrollButtonDown"></paper-icon-button>
|
<paper-icon-button icon="paper-tabs:chevron-left" class$="[[_computeScrollButtonClass(_leftHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onLeftScrollButtonDown" tabindex="-1"></paper-icon-button>
|
||||||
|
|
||||||
<div id="tabsContainer" class="flex" on-track="_scroll" on-down="_down">
|
<div id="tabsContainer" class="flex" on-track="_scroll" on-down="_down">
|
||||||
|
|
||||||
|
@ -16228,7 +16231,7 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] {
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<paper-icon-button icon="paper-tabs:chevron-right" class$="[[_computeScrollButtonClass(_rightHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onRightScrollButtonDown"></paper-icon-button>
|
<paper-icon-button icon="paper-tabs:chevron-right" class$="[[_computeScrollButtonClass(_rightHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onRightScrollButtonDown" tabindex="-1"></paper-icon-button>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -18749,23 +18752,6 @@ paper-ripple {
|
||||||
|
|
||||||
attached: function() {
|
attached: function() {
|
||||||
this._isReady = true;
|
this._isReady = true;
|
||||||
|
|
||||||
// Don't stomp over a user-set aria-label.
|
|
||||||
if (!this.getAttribute('aria-label')) {
|
|
||||||
this.updateAriaLabel();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update the checkbox aria-label. This is a temporary workaround not
|
|
||||||
* being able to observe changes in <content>
|
|
||||||
* (see: https://github.com/Polymer/polymer/issues/1773)
|
|
||||||
*
|
|
||||||
* Call this if you manually change the contents of the checkbox
|
|
||||||
* and want the aria-label to match the new contents.
|
|
||||||
*/
|
|
||||||
updateAriaLabel: function() {
|
|
||||||
this.setAttribute('aria-label', Polymer.dom(this).textContent.trim());
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// button-behavior hook
|
// button-behavior hook
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue