mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
d9299a0a48
commit
101944aab9
36 changed files with 240 additions and 66 deletions
|
@ -526,6 +526,14 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
self.ensureWebSocket = function() {
|
||||||
|
if (self.isWebSocketOpenOrConnecting() || !self.isWebSocketSupported()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
self.openWebSocket();
|
||||||
|
};
|
||||||
|
|
||||||
self.openWebSocket = function () {
|
self.openWebSocket = function () {
|
||||||
|
|
||||||
var accessToken = self.accessToken();
|
var accessToken = self.accessToken();
|
||||||
|
@ -555,9 +563,7 @@
|
||||||
}, 0);
|
}, 0);
|
||||||
};
|
};
|
||||||
webSocket.onerror = function () {
|
webSocket.onerror = function () {
|
||||||
setTimeout(function () {
|
Events.trigger(self, 'websocketerror');
|
||||||
Events.trigger(self, 'websocketerror');
|
|
||||||
}, 0);
|
|
||||||
};
|
};
|
||||||
webSocket.onclose = function () {
|
webSocket.onclose = function () {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
|
|
|
@ -16,12 +16,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.2.5",
|
"version": "1.2.6",
|
||||||
"_release": "1.2.5",
|
"_release": "1.2.6",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.2.5",
|
"tag": "1.2.6",
|
||||||
"commit": "d4de191a85b3db35ca612453759cab089ecdff83"
|
"commit": "fe1b3e3069c875bb54cfede60ee94f8b8f876c90"
|
||||||
},
|
},
|
||||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||||
"_target": "^1.2.0",
|
"_target": "^1.2.0",
|
||||||
|
|
|
@ -285,7 +285,12 @@ define(['loading', 'viewManager', 'skinManager', 'pluginManager', 'backdrop', 'b
|
||||||
skinManager.loadUserSkin();
|
skinManager.loadUserSkin();
|
||||||
return;
|
return;
|
||||||
} else if (route.roles) {
|
} else if (route.roles) {
|
||||||
validateRoles(apiClient, route.roles, callback).then(callback, beginConnectionWizard);
|
validateRoles(apiClient, route.roles).then(function () {
|
||||||
|
|
||||||
|
apiClient.ensureWebSocket();
|
||||||
|
callback();
|
||||||
|
|
||||||
|
}, beginConnectionWizard);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "hls.js",
|
"name": "hls.js",
|
||||||
"version": "0.5.18",
|
"version": "0.5.19",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
||||||
"homepage": "https://github.com/dailymotion/hls.js",
|
"homepage": "https://github.com/dailymotion/hls.js",
|
||||||
|
@ -16,11 +16,11 @@
|
||||||
"test",
|
"test",
|
||||||
"tests"
|
"tests"
|
||||||
],
|
],
|
||||||
"_release": "0.5.18",
|
"_release": "0.5.19",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v0.5.18",
|
"tag": "v0.5.19",
|
||||||
"commit": "9ec23657e0c69b1a0a4304f2f0a2d1c575edc496"
|
"commit": "ad5665b216b04d1dd5a44dbf9242664e2da323e0"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/dailymotion/hls.js.git",
|
"_source": "git://github.com/dailymotion/hls.js.git",
|
||||||
"_target": "~0.5.7",
|
"_target": "~0.5.7",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "hls.js",
|
"name": "hls.js",
|
||||||
"version": "0.5.18",
|
"version": "0.5.19",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
||||||
"homepage": "https://github.com/dailymotion/hls.js",
|
"homepage": "https://github.com/dailymotion/hls.js",
|
||||||
|
|
|
@ -2446,9 +2446,12 @@ var StreamController = function (_EventHandler) {
|
||||||
case _errors.ErrorDetails.LEVEL_LOAD_TIMEOUT:
|
case _errors.ErrorDetails.LEVEL_LOAD_TIMEOUT:
|
||||||
case _errors.ErrorDetails.KEY_LOAD_ERROR:
|
case _errors.ErrorDetails.KEY_LOAD_ERROR:
|
||||||
case _errors.ErrorDetails.KEY_LOAD_TIMEOUT:
|
case _errors.ErrorDetails.KEY_LOAD_TIMEOUT:
|
||||||
// if fatal error, stop processing, otherwise move to IDLE to retry loading
|
// when in ERROR state, don't switch back to IDLE state in case a non-fatal error is received
|
||||||
_logger.logger.warn('mediaController: ' + data.details + ' while loading frag,switch to ' + (data.fatal ? 'ERROR' : 'IDLE') + ' state ...');
|
if (this.state !== State.ERROR) {
|
||||||
this.state = data.fatal ? State.ERROR : State.IDLE;
|
// if fatal error, stop processing, otherwise move to IDLE to retry loading
|
||||||
|
this.state = data.fatal ? State.ERROR : State.IDLE;
|
||||||
|
_logger.logger.warn('mediaController: ' + data.details + ' while loading frag,switch to ' + this.state + ' state ...');
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case _errors.ErrorDetails.BUFFER_FULL_ERROR:
|
case _errors.ErrorDetails.BUFFER_FULL_ERROR:
|
||||||
// trigger a smooth level switch to empty buffers
|
// trigger a smooth level switch to empty buffers
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "hls.js",
|
"name": "hls.js",
|
||||||
"version": "0.5.18",
|
"version": "0.5.19",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
||||||
"homepage": "https://github.com/dailymotion/hls.js",
|
"homepage": "https://github.com/dailymotion/hls.js",
|
||||||
|
|
|
@ -943,9 +943,12 @@ class StreamController extends EventHandler {
|
||||||
case ErrorDetails.LEVEL_LOAD_TIMEOUT:
|
case ErrorDetails.LEVEL_LOAD_TIMEOUT:
|
||||||
case ErrorDetails.KEY_LOAD_ERROR:
|
case ErrorDetails.KEY_LOAD_ERROR:
|
||||||
case ErrorDetails.KEY_LOAD_TIMEOUT:
|
case ErrorDetails.KEY_LOAD_TIMEOUT:
|
||||||
// if fatal error, stop processing, otherwise move to IDLE to retry loading
|
// when in ERROR state, don't switch back to IDLE state in case a non-fatal error is received
|
||||||
logger.warn(`mediaController: ${data.details} while loading frag,switch to ${data.fatal ? 'ERROR' : 'IDLE'} state ...`);
|
if(this.state !== State.ERROR) {
|
||||||
this.state = data.fatal ? State.ERROR : State.IDLE;
|
// if fatal error, stop processing, otherwise move to IDLE to retry loading
|
||||||
|
this.state = data.fatal ? State.ERROR : State.IDLE;
|
||||||
|
logger.warn(`mediaController: ${data.details} while loading frag,switch to ${this.state} state ...`);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case ErrorDetails.BUFFER_FULL_ERROR:
|
case ErrorDetails.BUFFER_FULL_ERROR:
|
||||||
// trigger a smooth level switch to empty buffers
|
// trigger a smooth level switch to empty buffers
|
||||||
|
|
|
@ -29,14 +29,14 @@
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"homepage": "https://github.com/polymerelements/iron-behaviors",
|
"homepage": "https://github.com/PolymerElements/iron-behaviors",
|
||||||
"_release": "1.0.13",
|
"_release": "1.0.13",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.13",
|
"tag": "v1.0.13",
|
||||||
"commit": "a7bc3428a6da2beed21987b3a8028206826a12bc"
|
"commit": "a7bc3428a6da2beed21987b3a8028206826a12bc"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/polymerelements/iron-behaviors.git",
|
"_source": "git://github.com/PolymerElements/iron-behaviors.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "polymerelements/iron-behaviors"
|
"_originalSource": "PolymerElements/iron-behaviors"
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iron-selector",
|
"name": "iron-selector",
|
||||||
"version": "1.3.0",
|
"version": "1.4.0",
|
||||||
"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",
|
||||||
|
@ -30,13 +30,13 @@
|
||||||
"web-component-tester": "^4.0.0",
|
"web-component-tester": "^4.0.0",
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"_release": "1.3.0",
|
"_release": "1.4.0",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.3.0",
|
"tag": "v1.4.0",
|
||||||
"commit": "1662093611cda3fd29125cdab94a61d3d88093da"
|
"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"
|
||||||
}
|
}
|
33
dashboard-ui/bower_components/iron-selector/.github/ISSUE_TEMPLATE.md
vendored
Normal file
33
dashboard-ui/bower_components/iron-selector/.github/ISSUE_TEMPLATE.md
vendored
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
<!-- Instructions: https://github.com/PolymerElements/iron-selector/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
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iron-selector",
|
"name": "iron-selector",
|
||||||
"version": "1.3.0",
|
"version": "1.4.0",
|
||||||
"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",
|
||||||
|
|
|
@ -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
|
||||||
|
@ -69,7 +70,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h3>Example</h3>
|
<h3>Example with attr-for-selected</h3>
|
||||||
<div class="horizontal-section">
|
<div class="horizontal-section">
|
||||||
<iron-selector selected="foo" attr-for-selected="name">
|
<iron-selector selected="foo" attr-for-selected="name">
|
||||||
<div name="foo">Foo</div>
|
<div name="foo">Foo</div>
|
||||||
|
@ -80,6 +81,20 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
</iron-selector>
|
</iron-selector>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h3>Example with fallback-selection</h3>
|
||||||
|
<div class="horizontal-section">
|
||||||
|
<iron-selector selected="non-existing" attr-for-selected="name" fallback-selection="default">
|
||||||
|
<div name="foo">Foo</div>
|
||||||
|
<div name="bar">Bar</div>
|
||||||
|
<div name="baz">Baz</div>
|
||||||
|
<div name="qux">Qux</div>
|
||||||
|
<div name="quux">Quux</div>
|
||||||
|
<div name="default">Default</div>
|
||||||
|
</iron-selector>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -82,7 +82,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
Polymer.IronSelectableBehavior._updateAttrForSelected.apply(this);
|
Polymer.IronSelectableBehavior._updateAttrForSelected.apply(this);
|
||||||
} else if (this._shouldUpdateSelection) {
|
} else if (this._shouldUpdateSelection) {
|
||||||
this.selectedValues = this.selectedItems.map(function(selectedItem) {
|
this.selectedValues = this.selectedItems.map(function(selectedItem) {
|
||||||
return this._indexToValue(this.indexOf(selectedItem));
|
return this._indexToValue(this.indexOf(selectedItem));
|
||||||
}, this).filter(function(unfilteredValue) {
|
}, this).filter(function(unfilteredValue) {
|
||||||
return unfilteredValue != null;
|
return unfilteredValue != null;
|
||||||
}, this);
|
}, this);
|
||||||
|
@ -106,6 +106,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
for (var i = 0; i < selectedItems.length; i++) {
|
for (var i = 0; i < selectedItems.length; i++) {
|
||||||
this._selection.setItemSelected(selectedItems[i], true);
|
this._selection.setItemSelected(selectedItems[i], true);
|
||||||
}
|
}
|
||||||
|
// Check for items, since this array is populated only when attached
|
||||||
|
if (this.fallbackSelection && this.items.length && !this._selection.get().length) {
|
||||||
|
var fallback = this._valueToItem(this.fallbackSelection);
|
||||||
|
if (fallback) {
|
||||||
|
this.selectedValues = [this.fallbackSelection];
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this._selection.clear();
|
this._selection.clear();
|
||||||
}
|
}
|
||||||
|
@ -129,7 +136,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
} else {
|
} else {
|
||||||
this.splice('selectedValues',i,1);
|
this.splice('selectedValues',i,1);
|
||||||
}
|
}
|
||||||
this._selection.setItemSelected(this._valueToItem(value), unselected);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_valuesToItems: function(values) {
|
_valuesToItems: function(values) {
|
||||||
|
|
|
@ -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
|
||||||
|
@ -113,6 +114,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
value: null
|
value: null
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default fallback if the selection based on selected with `attrForSelected`
|
||||||
|
* is not found.
|
||||||
|
*/
|
||||||
|
fallbackSelection: {
|
||||||
|
type: String,
|
||||||
|
value: null
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The list of items from which a selection can be made.
|
* The list of items from which a selection can be made.
|
||||||
*/
|
*/
|
||||||
|
@ -143,7 +153,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
|
|
||||||
observers: [
|
observers: [
|
||||||
'_updateAttrForSelected(attrForSelected)',
|
'_updateAttrForSelected(attrForSelected)',
|
||||||
'_updateSelected(selected)'
|
'_updateSelected(selected)',
|
||||||
|
'_checkFallback(fallbackSelection)'
|
||||||
],
|
],
|
||||||
|
|
||||||
created: function() {
|
created: function() {
|
||||||
|
@ -229,6 +240,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
return this.selected != null;
|
return this.selected != null;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_checkFallback: function() {
|
||||||
|
if (this._shouldUpdateSelection) {
|
||||||
|
this._updateSelected();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
_addListener: function(eventName) {
|
_addListener: function(eventName) {
|
||||||
this.listen(this, eventName, '_activateHandler');
|
this.listen(this, eventName, '_activateHandler');
|
||||||
},
|
},
|
||||||
|
@ -250,7 +267,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
|
|
||||||
_updateAttrForSelected: function() {
|
_updateAttrForSelected: function() {
|
||||||
if (this._shouldUpdateSelection) {
|
if (this._shouldUpdateSelection) {
|
||||||
this.selected = this._indexToValue(this.indexOf(this.selectedItem));
|
this.selected = this._indexToValue(this.indexOf(this.selectedItem));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -260,6 +277,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
|
|
||||||
_selectSelected: function(selected) {
|
_selectSelected: function(selected) {
|
||||||
this._selection.select(this._valueToItem(this.selected));
|
this._selection.select(this._valueToItem(this.selected));
|
||||||
|
// Check for items, since this array is populated only when attached
|
||||||
|
// Since Number(0) is falsy, explicitly check for undefined
|
||||||
|
if (this.fallbackSelection && this.items.length && (this._selection.get() === undefined)) {
|
||||||
|
this.selected = this.fallbackSelection;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_filterItem: function(node) {
|
_filterItem: function(node) {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
@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
|
||||||
|
|
|
@ -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
|
||||||
|
@ -37,6 +38,20 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
<div name="zot">Zot</div>
|
<div name="zot">Zot</div>
|
||||||
</iron-selector>
|
</iron-selector>
|
||||||
|
|
||||||
|
If no matching element is found using `attForSelected`, use `fallbackSelection` as fallback.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
<iron-selector attr-for-selected="name" selected="non-existing"
|
||||||
|
fallback-selection="default">
|
||||||
|
<div name="foo">Foo</div>
|
||||||
|
<div name="bar">Bar</div>
|
||||||
|
<div name="default">Default</div>
|
||||||
|
</iron-selector>
|
||||||
|
|
||||||
|
Note: When the selector is multi, the selection will set to `fallbackSelection` iff
|
||||||
|
the number of matching elements is zero.
|
||||||
|
|
||||||
`iron-selector` is not styled. Use the `iron-selected` CSS class to style the selected element.
|
`iron-selector` is not styled. Use the `iron-selected` CSS class to style the selected element.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<!--
|
<!--
|
||||||
|
@license
|
||||||
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
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
|
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
|
||||||
|
@ -7,7 +8,7 @@ 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
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<link rel="import" href="../polymer/polymer.html">
|
<link rel="import" href="../../polymer/polymer.html">
|
||||||
|
|
||||||
<dom-module id="attr-reflector">
|
<dom-module id="attr-reflector">
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<!--
|
<!--
|
||||||
|
@license
|
||||||
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
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
|
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
|
||||||
|
@ -71,6 +72,16 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
</template>
|
</template>
|
||||||
</test-fixture>
|
</test-fixture>
|
||||||
|
|
||||||
|
<test-fixture id="defaultAttribute">
|
||||||
|
<template>
|
||||||
|
<iron-selector attr-for-selected="some-attr" fallback-selection="default">
|
||||||
|
<div some-attr="value0">Item 0</div>
|
||||||
|
<div some-attr="value1">Item 1</div>
|
||||||
|
<div some-attr="default">Item 2</div>
|
||||||
|
</iron-selector>
|
||||||
|
</template>
|
||||||
|
</test-fixture>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
suite('inline attributes', function() {
|
suite('inline attributes', function() {
|
||||||
var selector;
|
var selector;
|
||||||
|
@ -157,6 +168,61 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
testSelectItem(i);
|
testSelectItem(i);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
suite('default attribute', function() {
|
||||||
|
var selector;
|
||||||
|
var items;
|
||||||
|
|
||||||
|
setup(function () {
|
||||||
|
selector = fixture('defaultAttribute');
|
||||||
|
items = Array.prototype.slice.apply(selector.querySelectorAll('div[some-attr]'));
|
||||||
|
});
|
||||||
|
|
||||||
|
test('setting non-existing value sets default', function() {
|
||||||
|
selector.select('non-existing-value');
|
||||||
|
assert.equal(selector.selected, 'default');
|
||||||
|
assert.equal(selector.selectedItem, items[2]);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('setting non-existing value sets default', function() {
|
||||||
|
selector.multi = true;
|
||||||
|
selector.select(['non-existing-value']);
|
||||||
|
assert.deepEqual(selector.selectedValues, ['default']);
|
||||||
|
assert.deepEqual(selector.selectedItems, [items[2]]);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('default not used when there was at least one match', function() {
|
||||||
|
selector.multi = true;
|
||||||
|
selector.selectedValues = ['non-existing-value', 'value0'];
|
||||||
|
assert.deepEqual(selector.selectedValues, ['non-existing-value', 'value0']);
|
||||||
|
assert.deepEqual(selector.selectedItems, [items[0]]);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('default element not found does not result in infinite loop', function() {
|
||||||
|
selector.fallbackSelection = 'non-existing-fallback';
|
||||||
|
selector.select('non-existing-value');
|
||||||
|
assert.equal(selector.selectedItem, undefined);
|
||||||
|
selector.multi = true;
|
||||||
|
selector.selectedValues = ['non-existing-value'];
|
||||||
|
assert.deepEqual(selector.selectedItems, [undefined]);
|
||||||
|
selector.fallbackSelection = 'default';
|
||||||
|
assert.deepEqual(selector.selectedItems, [items[2]]);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('selection is updated after fallback is set', function() {
|
||||||
|
selector.fallbackSolution = undefined;
|
||||||
|
selector.select('non-existing-value');
|
||||||
|
selector.fallbackSelection = 'default';
|
||||||
|
assert.equal(selector.selectedItem, items[2]);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('multi-selection is updated after fallback is set', function() {
|
||||||
|
selector.fallbackSolution = undefined;
|
||||||
|
selector.selectedValues = ['non-existing-value'];
|
||||||
|
selector.fallbackSolution = 'default';
|
||||||
|
assert.equal(selector.selectedItem, items[2]);
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<!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
|
||||||
|
@ -17,6 +18,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
<script>
|
<script>
|
||||||
WCT.loadSuites([
|
WCT.loadSuites([
|
||||||
'activate-event.html',
|
'activate-event.html',
|
||||||
|
'attr-for-selected.html',
|
||||||
'basic.html',
|
'basic.html',
|
||||||
'multi.html',
|
'multi.html',
|
||||||
'next-previous.html',
|
'next-previous.html',
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<!--
|
<!--
|
||||||
|
@license
|
||||||
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
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
|
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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
"tag": "v1.0.11",
|
"tag": "v1.0.11",
|
||||||
"commit": "e3c1ab0c72905b58fb4d9adc2921ea73b5c085a5"
|
"commit": "e3c1ab0c72905b58fb4d9adc2921ea73b5c085a5"
|
||||||
},
|
},
|
||||||
"_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"
|
||||||
}
|
}
|
|
@ -32,14 +32,14 @@
|
||||||
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
|
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
|
||||||
},
|
},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"homepage": "https://github.com/PolymerElements/paper-ripple",
|
"homepage": "https://github.com/polymerelements/paper-ripple",
|
||||||
"_release": "1.0.5",
|
"_release": "1.0.5",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.5",
|
"tag": "v1.0.5",
|
||||||
"commit": "d72e7a9a8ab518b901ed18dde492df3b87a93be5"
|
"commit": "d72e7a9a8ab518b901ed18dde492df3b87a93be5"
|
||||||
},
|
},
|
||||||
"_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"
|
||||||
}
|
}
|
|
@ -26,14 +26,14 @@
|
||||||
"web-component-tester": "*"
|
"web-component-tester": "*"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"homepage": "https://github.com/polymer/polymer",
|
"homepage": "https://github.com/Polymer/polymer",
|
||||||
"_release": "1.4.0",
|
"_release": "1.4.0",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.4.0",
|
"tag": "v1.4.0",
|
||||||
"commit": "11c987b2eb3c73b388a79fc8aaea8ca01624f514"
|
"commit": "11c987b2eb3c73b388a79fc8aaea8ca01624f514"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/polymer/polymer.git",
|
"_source": "git://github.com/Polymer/polymer.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "polymer/polymer"
|
"_originalSource": "Polymer/polymer"
|
||||||
}
|
}
|
|
@ -210,8 +210,6 @@ var Dashboard = {
|
||||||
|
|
||||||
Dashboard.lastSystemInfo = info;
|
Dashboard.lastSystemInfo = info;
|
||||||
|
|
||||||
Dashboard.ensureWebSocket();
|
|
||||||
|
|
||||||
if (!Dashboard.initialServerVersion) {
|
if (!Dashboard.initialServerVersion) {
|
||||||
Dashboard.initialServerVersion = info.Version;
|
Dashboard.initialServerVersion = info.Version;
|
||||||
}
|
}
|
||||||
|
@ -532,8 +530,6 @@ var Dashboard = {
|
||||||
|
|
||||||
Dashboard.updateSystemInfo(info);
|
Dashboard.updateSystemInfo(info);
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
Dashboard.ensureWebSocket();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -970,19 +966,6 @@ var Dashboard = {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
ensureWebSocket: function () {
|
|
||||||
|
|
||||||
if (ApiClient.isWebSocketOpenOrConnecting() || !ApiClient.isWebSocketSupported()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ApiClient.openWebSocket();
|
|
||||||
|
|
||||||
if (!Dashboard.isConnectMode()) {
|
|
||||||
ApiClient.reportCapabilities(Dashboard.capabilities());
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
processGeneralCommand: function (cmd) {
|
processGeneralCommand: function (cmd) {
|
||||||
|
|
||||||
// Full list
|
// Full list
|
||||||
|
@ -2116,7 +2099,10 @@ var AppInfo = {};
|
||||||
if (browser.mobile) {
|
if (browser.mobile) {
|
||||||
define("prompt", [embyWebComponentsBowerPath + "/prompt/nativeprompt"], returnFirstDependency);
|
define("prompt", [embyWebComponentsBowerPath + "/prompt/nativeprompt"], returnFirstDependency);
|
||||||
define("confirm", [embyWebComponentsBowerPath + "/confirm/nativeconfirm"], returnFirstDependency);
|
define("confirm", [embyWebComponentsBowerPath + "/confirm/nativeconfirm"], returnFirstDependency);
|
||||||
define("alert", [embyWebComponentsBowerPath + "/alert/nativealert"], returnFirstDependency);
|
|
||||||
|
// We have some alerts with markup
|
||||||
|
//define("alert", [embyWebComponentsBowerPath + "/alert/nativealert"], returnFirstDependency);
|
||||||
|
define("alert", [embyWebComponentsBowerPath + "/alert/alert"], returnFirstDependency);
|
||||||
} else {
|
} else {
|
||||||
define("prompt", [embyWebComponentsBowerPath + "/prompt/prompt"], returnFirstDependency);
|
define("prompt", [embyWebComponentsBowerPath + "/prompt/prompt"], returnFirstDependency);
|
||||||
define("confirm", [embyWebComponentsBowerPath + "/confirm/confirm"], returnFirstDependency);
|
define("confirm", [embyWebComponentsBowerPath + "/confirm/confirm"], returnFirstDependency);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue