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
dbf135beac
commit
2a2b9b7fe5
32 changed files with 322 additions and 172 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iron-overlay-behavior",
|
"name": "iron-overlay-behavior",
|
||||||
"version": "1.0.4",
|
"version": "1.0.5",
|
||||||
"license": "http://polymer.github.io/LICENSE.txt",
|
"license": "http://polymer.github.io/LICENSE.txt",
|
||||||
"description": "Provides a behavior for making an element an overlay",
|
"description": "Provides a behavior for making an element an overlay",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
@ -35,11 +35,11 @@
|
||||||
"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.4",
|
"_release": "1.0.5",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.4",
|
"tag": "v1.0.5",
|
||||||
"commit": "7939cabf4f23467a0d02b572094ef05d35ad0dcc"
|
"commit": "f03cea265587c724cf3a85aef76b2ab7ccfd2b94"
|
||||||
},
|
},
|
||||||
"_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",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iron-overlay-behavior",
|
"name": "iron-overlay-behavior",
|
||||||
"version": "1.0.4",
|
"version": "1.0.5",
|
||||||
"license": "http://polymer.github.io/LICENSE.txt",
|
"license": "http://polymer.github.io/LICENSE.txt",
|
||||||
"description": "Provides a behavior for making an element an overlay",
|
"description": "Provides a behavior for making an element an overlay",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|
|
@ -145,8 +145,8 @@ context. You should place this element as a child of `<body>` whenever possible.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fired after the `iron-overlay` closes.
|
* Fired after the `iron-overlay` closes.
|
||||||
* @event iron-overlay-closed {{canceled: boolean}} detail -
|
* @event iron-overlay-closed
|
||||||
* canceled: True if the overlay was canceled.
|
* @param {{canceled: (boolean|undefined)}} set to the `closingReason` attribute
|
||||||
*/
|
*/
|
||||||
|
|
||||||
listeners: {
|
listeners: {
|
||||||
|
@ -250,7 +250,7 @@ context. You should place this element as a child of `<body>` whenever possible.
|
||||||
// overlay becomes visible here
|
// overlay becomes visible here
|
||||||
this.style.display = '';
|
this.style.display = '';
|
||||||
// force layout to ensure transitions will go
|
// force layout to ensure transitions will go
|
||||||
this.offsetWidth;
|
/** @suppress {suspiciousCode} */ this.offsetWidth;
|
||||||
if (this.opened) {
|
if (this.opened) {
|
||||||
this._renderOpened();
|
this._renderOpened();
|
||||||
} else {
|
} else {
|
||||||
|
@ -374,7 +374,7 @@ context. You should place this element as a child of `<body>` whenever possible.
|
||||||
this.style.display = 'none';
|
this.style.display = 'none';
|
||||||
this.style.transform = this.style.webkitTransform = '';
|
this.style.transform = this.style.webkitTransform = '';
|
||||||
// force layout to avoid application of transform
|
// force layout to avoid application of transform
|
||||||
this.offsetWidth;
|
/** @suppress {suspiciousCode} */ this.offsetWidth;
|
||||||
this.style.transition = this.style.webkitTransition = '';
|
this.style.transition = this.style.webkitTransition = '';
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "polymer",
|
"name": "polymer",
|
||||||
"version": "1.0.9",
|
"version": "1.1.0",
|
||||||
"main": [
|
"main": [
|
||||||
"polymer.html"
|
"polymer.html"
|
||||||
],
|
],
|
||||||
|
@ -24,11 +24,11 @@
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"homepage": "https://github.com/Polymer/polymer",
|
"homepage": "https://github.com/Polymer/polymer",
|
||||||
"_release": "1.0.9",
|
"_release": "1.1.0",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.9",
|
"tag": "v1.1.0",
|
||||||
"commit": "8e894841ae36be85bade4b42f858ccb99b770e5d"
|
"commit": "67fb2f85fd66d8556fc07cf1dec41ff5273fa68a"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/Polymer/polymer.git",
|
"_source": "git://github.com/Polymer/polymer.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "polymer",
|
"name": "polymer",
|
||||||
"version": "1.0.9",
|
"version": "1.1.0",
|
||||||
"main": [
|
"main": [
|
||||||
"polymer.html"
|
"polymer.html"
|
||||||
],
|
],
|
||||||
|
|
|
@ -247,19 +247,14 @@ return m;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
var cePolyfill = window.CustomElements && !CustomElements.useNative;
|
var cePolyfill = window.CustomElements && !CustomElements.useNative;
|
||||||
if (cePolyfill) {
|
|
||||||
var ready = CustomElements.ready;
|
|
||||||
CustomElements.ready = true;
|
|
||||||
}
|
|
||||||
document.registerElement('dom-module', DomModule);
|
document.registerElement('dom-module', DomModule);
|
||||||
if (cePolyfill) {
|
|
||||||
CustomElements.ready = ready;
|
|
||||||
}
|
|
||||||
function forceDocumentUpgrade() {
|
function forceDocumentUpgrade() {
|
||||||
if (cePolyfill) {
|
if (cePolyfill) {
|
||||||
var script = document._currentScript || document.currentScript;
|
var script = document._currentScript || document.currentScript;
|
||||||
if (script) {
|
var doc = script && script.ownerDocument;
|
||||||
CustomElements.upgradeAll(script.ownerDocument);
|
if (doc && !doc.__customElementsForceUpgraded) {
|
||||||
|
doc.__customElementsForceUpgraded = true;
|
||||||
|
CustomElements.upgradeAll(doc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -563,7 +558,7 @@ debouncer.stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Polymer.version = '1.0.9';
|
Polymer.version = '1.1.0';
|
||||||
Polymer.Base._addFeature({
|
Polymer.Base._addFeature({
|
||||||
_registerFeatures: function () {
|
_registerFeatures: function () {
|
||||||
this._prepIs();
|
this._prepIs();
|
||||||
|
|
|
@ -458,11 +458,14 @@ Polymer.dom.addDebouncer(host.debounce('_distribute', host._distributeContent));
|
||||||
},
|
},
|
||||||
appendChild: function (node) {
|
appendChild: function (node) {
|
||||||
var handled;
|
var handled;
|
||||||
|
this._ensureContentLogicalInfo(node);
|
||||||
this._removeNodeFromHost(node, true);
|
this._removeNodeFromHost(node, true);
|
||||||
if (this._nodeIsInLogicalTree(this.node)) {
|
if (this._nodeIsInLogicalTree(this.node)) {
|
||||||
this._addLogicalInfo(node, this.node);
|
this._addLogicalInfo(node, this.node);
|
||||||
this._addNodeToHost(node);
|
this._addNodeToHost(node);
|
||||||
handled = this._maybeDistribute(node, this.node);
|
handled = this._maybeDistribute(node, this.node);
|
||||||
|
} else {
|
||||||
|
this._addNodeToHost(node);
|
||||||
}
|
}
|
||||||
if (!handled && !this._tryRemoveUndistributedNode(node)) {
|
if (!handled && !this._tryRemoveUndistributedNode(node)) {
|
||||||
var container = this.node._isShadyRoot ? this.node.host : this.node;
|
var container = this.node._isShadyRoot ? this.node.host : this.node;
|
||||||
|
@ -476,9 +479,9 @@ if (!ref_node) {
|
||||||
return this.appendChild(node);
|
return this.appendChild(node);
|
||||||
}
|
}
|
||||||
var handled;
|
var handled;
|
||||||
|
this._ensureContentLogicalInfo(node);
|
||||||
this._removeNodeFromHost(node, true);
|
this._removeNodeFromHost(node, true);
|
||||||
if (this._nodeIsInLogicalTree(this.node)) {
|
if (this._nodeIsInLogicalTree(this.node)) {
|
||||||
saveLightChildrenIfNeeded(this.node);
|
|
||||||
var children = this.childNodes;
|
var children = this.childNodes;
|
||||||
var index = children.indexOf(ref_node);
|
var index = children.indexOf(ref_node);
|
||||||
if (index < 0) {
|
if (index < 0) {
|
||||||
|
@ -487,6 +490,8 @@ throw Error('The ref_node to be inserted before is not a child ' + 'of this node
|
||||||
this._addLogicalInfo(node, this.node, index);
|
this._addLogicalInfo(node, this.node, index);
|
||||||
this._addNodeToHost(node);
|
this._addNodeToHost(node);
|
||||||
handled = this._maybeDistribute(node, this.node);
|
handled = this._maybeDistribute(node, this.node);
|
||||||
|
} else {
|
||||||
|
this._addNodeToHost(node);
|
||||||
}
|
}
|
||||||
if (!handled && !this._tryRemoveUndistributedNode(node)) {
|
if (!handled && !this._tryRemoveUndistributedNode(node)) {
|
||||||
ref_node = ref_node.localName === CONTENT ? this._firstComposedNode(ref_node) : ref_node;
|
ref_node = ref_node.localName === CONTENT ? this._firstComposedNode(ref_node) : ref_node;
|
||||||
|
@ -504,6 +509,8 @@ var handled;
|
||||||
if (this._nodeIsInLogicalTree(this.node)) {
|
if (this._nodeIsInLogicalTree(this.node)) {
|
||||||
this._removeNodeFromHost(node);
|
this._removeNodeFromHost(node);
|
||||||
handled = this._maybeDistribute(node, this.node);
|
handled = this._maybeDistribute(node, this.node);
|
||||||
|
} else {
|
||||||
|
this._removeNodeFromHost(node);
|
||||||
}
|
}
|
||||||
if (!handled) {
|
if (!handled) {
|
||||||
var container = this.node._isShadyRoot ? this.node.host : this.node;
|
var container = this.node._isShadyRoot ? this.node.host : this.node;
|
||||||
|
@ -572,10 +579,27 @@ return true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_updateInsertionPoints: function (host) {
|
_updateInsertionPoints: function (host) {
|
||||||
host.shadyRoot._insertionPoints = factory(host.shadyRoot).querySelectorAll(CONTENT);
|
var i$ = host.shadyRoot._insertionPoints = factory(host.shadyRoot).querySelectorAll(CONTENT);
|
||||||
|
for (var i = 0, c; i < i$.length; i++) {
|
||||||
|
c = i$[i];
|
||||||
|
saveLightChildrenIfNeeded(c);
|
||||||
|
saveLightChildrenIfNeeded(factory(c).parentNode);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
_nodeIsInLogicalTree: function (node) {
|
_nodeIsInLogicalTree: function (node) {
|
||||||
return Boolean(node._lightParent !== undefined || node._isShadyRoot || this._ownerShadyRootForNode(node) || node.shadyRoot);
|
return Boolean(node._lightParent !== undefined || node._isShadyRoot || node.shadyRoot);
|
||||||
|
},
|
||||||
|
_ensureContentLogicalInfo: function (node) {
|
||||||
|
if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
||||||
|
saveLightChildrenIfNeeded(this.node);
|
||||||
|
var c$ = Array.prototype.slice.call(node.childNodes);
|
||||||
|
for (var i = 0, n; i < c$.length && (n = c$[i]); i++) {
|
||||||
|
this._ensureContentLogicalInfo(n);
|
||||||
|
}
|
||||||
|
} else if (node.localName === CONTENT) {
|
||||||
|
saveLightChildrenIfNeeded(this.node);
|
||||||
|
saveLightChildrenIfNeeded(node);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
_parentNeedsDistribution: function (parent) {
|
_parentNeedsDistribution: function (parent) {
|
||||||
return parent && parent.shadyRoot && hasInsertionPoint(parent.shadyRoot);
|
return parent && parent.shadyRoot && hasInsertionPoint(parent.shadyRoot);
|
||||||
|
@ -629,14 +653,12 @@ node = factory(node).parentNode;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_addNodeToHost: function (node) {
|
_addNodeToHost: function (node) {
|
||||||
var checkNode = node.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? node.firstChild : node;
|
var root = this.getOwnerRoot();
|
||||||
var root = this._ownerShadyRootForNode(checkNode);
|
|
||||||
if (root) {
|
if (root) {
|
||||||
root.host._elementAdd(node);
|
root.host._elementAdd(node);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_addLogicalInfo: function (node, container, index) {
|
_addLogicalInfo: function (node, container, index) {
|
||||||
saveLightChildrenIfNeeded(container);
|
|
||||||
var children = factory(container).childNodes;
|
var children = factory(container).childNodes;
|
||||||
index = index === undefined ? children.length : index;
|
index = index === undefined ? children.length : index;
|
||||||
if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
||||||
|
@ -1163,8 +1185,13 @@ this.shadyRoot = this.root;
|
||||||
this.shadyRoot._distributionClean = false;
|
this.shadyRoot._distributionClean = false;
|
||||||
this.shadyRoot._isShadyRoot = true;
|
this.shadyRoot._isShadyRoot = true;
|
||||||
this.shadyRoot._dirtyRoots = [];
|
this.shadyRoot._dirtyRoots = [];
|
||||||
this.shadyRoot._insertionPoints = !this._notes || this._notes._hasContent ? this.shadyRoot.querySelectorAll('content') : [];
|
var i$ = this.shadyRoot._insertionPoints = !this._notes || this._notes._hasContent ? this.shadyRoot.querySelectorAll('content') : [];
|
||||||
saveLightChildrenIfNeeded(this.shadyRoot);
|
saveLightChildrenIfNeeded(this.shadyRoot);
|
||||||
|
for (var i = 0, c; i < i$.length; i++) {
|
||||||
|
c = i$[i];
|
||||||
|
saveLightChildrenIfNeeded(c);
|
||||||
|
saveLightChildrenIfNeeded(c.parentNode);
|
||||||
|
}
|
||||||
this.shadyRoot.host = this;
|
this.shadyRoot.host = this;
|
||||||
},
|
},
|
||||||
get domHost() {
|
get domHost() {
|
||||||
|
@ -1399,14 +1426,12 @@ if (newChildParent !== parentNode) {
|
||||||
removeFromComposedParent(newChildParent, newChild);
|
removeFromComposedParent(newChildParent, newChild);
|
||||||
}
|
}
|
||||||
remove(newChild);
|
remove(newChild);
|
||||||
saveLightChildrenIfNeeded(parentNode);
|
|
||||||
nativeInsertBefore.call(parentNode, newChild, refChild || null);
|
nativeInsertBefore.call(parentNode, newChild, refChild || null);
|
||||||
newChild._composedParent = parentNode;
|
newChild._composedParent = parentNode;
|
||||||
}
|
}
|
||||||
function remove(node) {
|
function remove(node) {
|
||||||
var parentNode = getComposedParent(node);
|
var parentNode = getComposedParent(node);
|
||||||
if (parentNode) {
|
if (parentNode) {
|
||||||
saveLightChildrenIfNeeded(parentNode);
|
|
||||||
node._composedParent = null;
|
node._composedParent = null;
|
||||||
nativeRemoveChild.call(parentNode, node);
|
nativeRemoveChild.call(parentNode, node);
|
||||||
}
|
}
|
||||||
|
|
115
dashboard-ui/bower_components/polymer/polymer.html
vendored
115
dashboard-ui/bower_components/polymer/polymer.html
vendored
|
@ -637,8 +637,7 @@ prevent = dy > dx;
|
||||||
prevent = dx > dy;
|
prevent = dx > dy;
|
||||||
}
|
}
|
||||||
if (prevent) {
|
if (prevent) {
|
||||||
// This prevents horizontal scrolling in safari
|
ev.preventDefault();
|
||||||
//ev.preventDefault();
|
|
||||||
} else {
|
} else {
|
||||||
Gestures.prevent('track');
|
Gestures.prevent('track');
|
||||||
}
|
}
|
||||||
|
@ -2187,7 +2186,7 @@ MIXIN_RULE: 1000
|
||||||
OPEN_BRACE: '{',
|
OPEN_BRACE: '{',
|
||||||
CLOSE_BRACE: '}',
|
CLOSE_BRACE: '}',
|
||||||
_rx: {
|
_rx: {
|
||||||
comments: /\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim,
|
comments: /\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,
|
||||||
port: /@import[^;]*;/gim,
|
port: /@import[^;]*;/gim,
|
||||||
customProp: /(?:^|[\s;])--[^;{]*?:[^{};]*?(?:[;\n]|$)/gim,
|
customProp: /(?:^|[\s;])--[^;{]*?:[^{};]*?(?:[;\n]|$)/gim,
|
||||||
mixinProp: /(?:^|[\s;])--[^;{]*?:[^{;]*?{[^}]*?}(?:[;\n]|$)?/gim,
|
mixinProp: /(?:^|[\s;])--[^;{]*?:[^{;]*?{[^}]*?}(?:[;\n]|$)?/gim,
|
||||||
|
@ -2203,7 +2202,8 @@ return api;
|
||||||
}();
|
}();
|
||||||
Polymer.StyleUtil = function () {
|
Polymer.StyleUtil = function () {
|
||||||
return {
|
return {
|
||||||
MODULE_STYLES_SELECTOR: 'style, link[rel=import][type~=css]',
|
MODULE_STYLES_SELECTOR: 'style, link[rel=import][type~=css], template',
|
||||||
|
INCLUDE_ATTR: 'include',
|
||||||
toCssText: function (rules, callback, preserveProperties) {
|
toCssText: function (rules, callback, preserveProperties) {
|
||||||
if (typeof rules === 'string') {
|
if (typeof rules === 'string') {
|
||||||
rules = this.parser.parse(rules);
|
rules = this.parser.parse(rules);
|
||||||
|
@ -2258,27 +2258,52 @@ afterNode = n$[n$.length - 1];
|
||||||
target.insertBefore(style, afterNode && afterNode.nextSibling || target.firstChild);
|
target.insertBefore(style, afterNode && afterNode.nextSibling || target.firstChild);
|
||||||
return style;
|
return style;
|
||||||
},
|
},
|
||||||
|
cssFromModules: function (moduleIds) {
|
||||||
|
var modules = moduleIds.trim().split(' ');
|
||||||
|
var cssText = '';
|
||||||
|
for (var i = 0; i < modules.length; i++) {
|
||||||
|
cssText += this.cssFromModule(modules[i]);
|
||||||
|
}
|
||||||
|
return cssText;
|
||||||
|
},
|
||||||
cssFromModule: function (moduleId) {
|
cssFromModule: function (moduleId) {
|
||||||
var m = Polymer.DomModule.import(moduleId);
|
var m = Polymer.DomModule.import(moduleId);
|
||||||
if (m && !m._cssText) {
|
if (m && !m._cssText) {
|
||||||
|
m._cssText = this._cssFromElement(m);
|
||||||
|
}
|
||||||
|
return m && m._cssText || '';
|
||||||
|
},
|
||||||
|
_cssFromElement: function (element) {
|
||||||
var cssText = '';
|
var cssText = '';
|
||||||
var e$ = Array.prototype.slice.call(m.querySelectorAll(this.MODULE_STYLES_SELECTOR));
|
var content = element.content || element;
|
||||||
for (var i = 0, e; i < e$.length; i++) {
|
var sourceDoc = element.ownerDocument;
|
||||||
|
var e$ = Array.prototype.slice.call(content.querySelectorAll(this.MODULE_STYLES_SELECTOR));
|
||||||
|
for (var i = 0, e, resolveDoc, addModule; i < e$.length; i++) {
|
||||||
e = e$[i];
|
e = e$[i];
|
||||||
|
resolveDoc = sourceDoc;
|
||||||
|
addModule = null;
|
||||||
|
if (e.localName === 'template') {
|
||||||
|
cssText += this._cssFromElement(e);
|
||||||
|
} else {
|
||||||
if (e.localName === 'style') {
|
if (e.localName === 'style') {
|
||||||
|
addModule = e.getAttribute(this.INCLUDE_ATTR);
|
||||||
e = e.__appliedElement || e;
|
e = e.__appliedElement || e;
|
||||||
e.parentNode.removeChild(e);
|
e.parentNode.removeChild(e);
|
||||||
} else {
|
} else {
|
||||||
e = e.import && e.import.body;
|
e = e.import && e.import.body;
|
||||||
|
resolveDoc = e.ownerDocument;
|
||||||
}
|
}
|
||||||
if (e) {
|
if (e) {
|
||||||
cssText += Polymer.ResolveUrl.resolveCss(e.textContent, e.ownerDocument);
|
cssText += this.resolveCss(e.textContent, resolveDoc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m._cssText = cssText;
|
if (addModule) {
|
||||||
|
cssText += this.cssFromModules(addModule);
|
||||||
}
|
}
|
||||||
return m && m._cssText || '';
|
}
|
||||||
|
return cssText;
|
||||||
},
|
},
|
||||||
|
resolveCss: Polymer.ResolveUrl.resolveCss,
|
||||||
parser: Polymer.CssParse,
|
parser: Polymer.CssParse,
|
||||||
ruleTypes: Polymer.CssParse.types
|
ruleTypes: Polymer.CssParse.types
|
||||||
};
|
};
|
||||||
|
@ -3179,7 +3204,8 @@ var styleTransformer = Polymer.StyleTransformer;
|
||||||
Polymer({
|
Polymer({
|
||||||
is: 'custom-style',
|
is: 'custom-style',
|
||||||
extends: 'style',
|
extends: 'style',
|
||||||
created: function () {
|
properties: { include: String },
|
||||||
|
ready: function () {
|
||||||
this._tryApply();
|
this._tryApply();
|
||||||
},
|
},
|
||||||
attached: function () {
|
attached: function () {
|
||||||
|
@ -3191,7 +3217,7 @@ if (this.parentNode && this.parentNode.localName !== 'dom-module') {
|
||||||
this._appliesToDocument = true;
|
this._appliesToDocument = true;
|
||||||
var e = this.__appliedElement || this;
|
var e = this.__appliedElement || this;
|
||||||
styleDefaults.addStyle(e);
|
styleDefaults.addStyle(e);
|
||||||
if (e.textContent) {
|
if (e.textContent || this.include) {
|
||||||
this._apply();
|
this._apply();
|
||||||
} else {
|
} else {
|
||||||
var observer = new MutationObserver(function () {
|
var observer = new MutationObserver(function () {
|
||||||
|
@ -3205,6 +3231,9 @@ observer.observe(e, { childList: true });
|
||||||
},
|
},
|
||||||
_apply: function () {
|
_apply: function () {
|
||||||
var e = this.__appliedElement || this;
|
var e = this.__appliedElement || this;
|
||||||
|
if (this.include) {
|
||||||
|
e.textContent += styleUtil.cssFromModules(this.include);
|
||||||
|
}
|
||||||
this._computeStyleProperties();
|
this._computeStyleProperties();
|
||||||
var props = this._styleProperties;
|
var props = this._styleProperties;
|
||||||
var self = this;
|
var self = this;
|
||||||
|
@ -3542,29 +3571,36 @@ items.push(store[key]);
|
||||||
return items;
|
return items;
|
||||||
},
|
},
|
||||||
_applySplices: function (splices) {
|
_applySplices: function (splices) {
|
||||||
var keySplices = [];
|
var keyMap = {}, key, i;
|
||||||
for (var i = 0; i < splices.length; i++) {
|
splices.forEach(function (s) {
|
||||||
var j, o, key, s = splices[i];
|
s.addedKeys = [];
|
||||||
|
for (i = 0; i < s.removed.length; i++) {
|
||||||
|
key = this.getKey(s.removed[i]);
|
||||||
|
keyMap[key] = keyMap[key] ? null : -1;
|
||||||
|
}
|
||||||
|
for (i = 0; i < s.addedCount; i++) {
|
||||||
|
var item = this.userArray[s.index + i];
|
||||||
|
key = this.getKey(item);
|
||||||
|
key = key === undefined ? this.add(item) : key;
|
||||||
|
keyMap[key] = keyMap[key] ? null : 1;
|
||||||
|
s.addedKeys.push(key);
|
||||||
|
}
|
||||||
|
}, this);
|
||||||
var removed = [];
|
var removed = [];
|
||||||
for (j = 0; j < s.removed.length; j++) {
|
var added = [];
|
||||||
o = s.removed[j];
|
for (var key in keyMap) {
|
||||||
key = this.remove(o);
|
if (keyMap[key] < 0) {
|
||||||
|
this.removeKey(key);
|
||||||
removed.push(key);
|
removed.push(key);
|
||||||
}
|
}
|
||||||
var added = [];
|
if (keyMap[key] > 0) {
|
||||||
for (j = 0; j < s.addedCount; j++) {
|
|
||||||
o = this.userArray[s.index + j];
|
|
||||||
key = this.add(o);
|
|
||||||
added.push(key);
|
added.push(key);
|
||||||
}
|
}
|
||||||
keySplices.push({
|
|
||||||
index: s.index,
|
|
||||||
removed: removed,
|
|
||||||
removedItems: s.removed,
|
|
||||||
added: added
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
return keySplices;
|
return [{
|
||||||
|
removed: removed,
|
||||||
|
added: added
|
||||||
|
}];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Polymer.Collection.get = function (userArray) {
|
Polymer.Collection.get = function (userArray) {
|
||||||
|
@ -3659,11 +3695,13 @@ this.collection = null;
|
||||||
} else {
|
} else {
|
||||||
this._error(this._logf('dom-repeat', 'expected array for `items`,' + ' found', this.items));
|
this._error(this._logf('dom-repeat', 'expected array for `items`,' + ' found', this.items));
|
||||||
}
|
}
|
||||||
this._splices = [];
|
this._keySplices = [];
|
||||||
|
this._indexSplices = [];
|
||||||
this._needFullRefresh = true;
|
this._needFullRefresh = true;
|
||||||
this._debounceTemplate(this._render);
|
this._debounceTemplate(this._render);
|
||||||
} else if (change.path == 'items.splices') {
|
} else if (change.path == 'items.splices') {
|
||||||
this._splices = this._splices.concat(change.value.keySplices);
|
this._keySplices = this._keySplices.concat(change.value.keySplices);
|
||||||
|
this._indexSplices = this._indexSplices.concat(change.value.indexSplices);
|
||||||
this._debounceTemplate(this._render);
|
this._debounceTemplate(this._render);
|
||||||
} else {
|
} else {
|
||||||
var subpath = change.path.slice(6);
|
var subpath = change.path.slice(6);
|
||||||
|
@ -3700,16 +3738,17 @@ this._applyFullRefresh();
|
||||||
this._needFullRefresh = false;
|
this._needFullRefresh = false;
|
||||||
} else {
|
} else {
|
||||||
if (this._sortFn) {
|
if (this._sortFn) {
|
||||||
this._applySplicesUserSort(this._splices);
|
this._applySplicesUserSort(this._keySplices);
|
||||||
} else {
|
} else {
|
||||||
if (this._filterFn) {
|
if (this._filterFn) {
|
||||||
this._applyFullRefresh();
|
this._applyFullRefresh();
|
||||||
} else {
|
} else {
|
||||||
this._applySplicesArrayOrder(this._splices);
|
this._applySplicesArrayOrder(this._indexSplices);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this._splices = [];
|
this._keySplices = [];
|
||||||
|
this._indexSplices = [];
|
||||||
var keyToIdx = this._keyToInstIdx = {};
|
var keyToIdx = this._keyToInstIdx = {};
|
||||||
for (var i = 0; i < this._instances.length; i++) {
|
for (var i = 0; i < this._instances.length; i++) {
|
||||||
var inst = this._instances[i];
|
var inst = this._instances[i];
|
||||||
|
@ -3847,10 +3886,10 @@ pool.push(inst);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this._instances.splice(s.index, s.removed.length);
|
this._instances.splice(s.index, s.removed.length);
|
||||||
for (var i = 0; i < s.added.length; i++) {
|
for (var i = 0; i < s.addedKeys.length; i++) {
|
||||||
var inst = {
|
var inst = {
|
||||||
isPlaceholder: true,
|
isPlaceholder: true,
|
||||||
key: s.added[i]
|
key: s.addedKeys[i]
|
||||||
};
|
};
|
||||||
this._instances.splice(s.index + i, 0, inst);
|
this._instances.splice(s.index + i, 0, inst);
|
||||||
}
|
}
|
||||||
|
@ -3959,12 +3998,12 @@ is: 'array-selector',
|
||||||
properties: {
|
properties: {
|
||||||
items: {
|
items: {
|
||||||
type: Array,
|
type: Array,
|
||||||
observer: '_resetSelection'
|
observer: 'clearSelection'
|
||||||
},
|
},
|
||||||
multi: {
|
multi: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
value: false,
|
value: false,
|
||||||
observer: '_resetSelection'
|
observer: 'clearSelection'
|
||||||
},
|
},
|
||||||
selected: {
|
selected: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
@ -3975,7 +4014,7 @@ type: Boolean,
|
||||||
value: false
|
value: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_resetSelection: function () {
|
clearSelection: function () {
|
||||||
if (Array.isArray(this.selected)) {
|
if (Array.isArray(this.selected)) {
|
||||||
for (var i = 0; i < this.selected.length; i++) {
|
for (var i = 0; i < this.selected.length; i++) {
|
||||||
this.unlinkPaths('selected.' + i);
|
this.unlinkPaths('selected.' + i);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "webcomponentsjs",
|
"name": "webcomponentsjs",
|
||||||
"main": "webcomponents.js",
|
"main": "webcomponents.js",
|
||||||
"version": "0.7.10",
|
"version": "0.7.11",
|
||||||
"homepage": "http://webcomponents.org",
|
"homepage": "http://webcomponents.org",
|
||||||
"authors": [
|
"authors": [
|
||||||
"The Polymer Authors"
|
"The Polymer Authors"
|
||||||
|
@ -15,11 +15,11 @@
|
||||||
],
|
],
|
||||||
"license": "BSD",
|
"license": "BSD",
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"_release": "0.7.10",
|
"_release": "0.7.11",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v0.7.10",
|
"tag": "v0.7.11",
|
||||||
"commit": "de2ee76eb2cb5a48b10e37db9e7e4c6f7fea71ee"
|
"commit": "ce6321507de6161ec52b43f82a6c36eda614d750"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/Polymer/webcomponentsjs.git",
|
"_source": "git://github.com/Polymer/webcomponentsjs.git",
|
||||||
"_target": "^0.7.2",
|
"_target": "^0.7.2",
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Code distributed by Google as part of the polymer project is also
|
* Code distributed by Google as part of the polymer project is also
|
||||||
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||||
*/
|
*/
|
||||||
// @version 0.7.10
|
// @version 0.7.11
|
||||||
if (typeof WeakMap === "undefined") {
|
if (typeof WeakMap === "undefined") {
|
||||||
(function() {
|
(function() {
|
||||||
var defineProperty = Object.defineProperty;
|
var defineProperty = Object.defineProperty;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@
|
||||||
* Code distributed by Google as part of the polymer project is also
|
* Code distributed by Google as part of the polymer project is also
|
||||||
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||||
*/
|
*/
|
||||||
// @version 0.7.10
|
// @version 0.7.11
|
||||||
if (typeof WeakMap === "undefined") {
|
if (typeof WeakMap === "undefined") {
|
||||||
(function() {
|
(function() {
|
||||||
var defineProperty = Object.defineProperty;
|
var defineProperty = Object.defineProperty;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@
|
||||||
* Code distributed by Google as part of the polymer project is also
|
* Code distributed by Google as part of the polymer project is also
|
||||||
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||||
*/
|
*/
|
||||||
// @version 0.7.10
|
// @version 0.7.11
|
||||||
if (typeof WeakMap === "undefined") {
|
if (typeof WeakMap === "undefined") {
|
||||||
(function() {
|
(function() {
|
||||||
var defineProperty = Object.defineProperty;
|
var defineProperty = Object.defineProperty;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@
|
||||||
* Code distributed by Google as part of the polymer project is also
|
* Code distributed by Google as part of the polymer project is also
|
||||||
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||||
*/
|
*/
|
||||||
// @version 0.7.10
|
// @version 0.7.11
|
||||||
if (typeof WeakMap === "undefined") {
|
if (typeof WeakMap === "undefined") {
|
||||||
(function() {
|
(function() {
|
||||||
var defineProperty = Object.defineProperty;
|
var defineProperty = Object.defineProperty;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "webcomponentsjs",
|
"name": "webcomponentsjs",
|
||||||
"main": "webcomponents.js",
|
"main": "webcomponents.js",
|
||||||
"version": "0.7.10",
|
"version": "0.7.11",
|
||||||
"homepage": "http://webcomponents.org",
|
"homepage": "http://webcomponents.org",
|
||||||
"authors": [
|
"authors": [
|
||||||
"The Polymer Authors"
|
"The Polymer Authors"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "webcomponents.js",
|
"name": "webcomponents.js",
|
||||||
"version": "0.7.10",
|
"version": "0.7.11",
|
||||||
"description": "webcomponents.js",
|
"description": "webcomponents.js",
|
||||||
"main": "webcomponents.js",
|
"main": "webcomponents.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Code distributed by Google as part of the polymer project is also
|
* Code distributed by Google as part of the polymer project is also
|
||||||
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||||
*/
|
*/
|
||||||
// @version 0.7.10
|
// @version 0.7.11
|
||||||
window.WebComponents = window.WebComponents || {};
|
window.WebComponents = window.WebComponents || {};
|
||||||
|
|
||||||
(function(scope) {
|
(function(scope) {
|
||||||
|
@ -2292,7 +2292,7 @@ if (typeof HTMLTemplateElement === "undefined") {
|
||||||
HTMLTemplateElement.prototype = Object.create(HTMLElement.prototype);
|
HTMLTemplateElement.prototype = Object.create(HTMLElement.prototype);
|
||||||
HTMLTemplateElement.decorate = function(template) {
|
HTMLTemplateElement.decorate = function(template) {
|
||||||
if (!template.content) {
|
if (!template.content) {
|
||||||
template.content = template.ownerDocument.createDocumentFragment();
|
template.content = contentDoc.createDocumentFragment();
|
||||||
}
|
}
|
||||||
var child;
|
var child;
|
||||||
while (child = template.firstChild) {
|
while (child = template.firstChild) {
|
||||||
|
@ -2310,6 +2310,7 @@ if (typeof HTMLTemplateElement === "undefined") {
|
||||||
},
|
},
|
||||||
set: function(text) {
|
set: function(text) {
|
||||||
contentDoc.body.innerHTML = text;
|
contentDoc.body.innerHTML = text;
|
||||||
|
HTMLTemplateElement.bootstrap(contentDoc);
|
||||||
while (this.content.firstChild) {
|
while (this.content.firstChild) {
|
||||||
this.content.removeChild(this.content.firstChild);
|
this.content.removeChild(this.content.firstChild);
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@
|
||||||
* Code distributed by Google as part of the polymer project is also
|
* Code distributed by Google as part of the polymer project is also
|
||||||
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||||
*/
|
*/
|
||||||
// @version 0.7.10
|
// @version 0.7.11
|
||||||
window.WebComponents = window.WebComponents || {};
|
window.WebComponents = window.WebComponents || {};
|
||||||
|
|
||||||
(function(scope) {
|
(function(scope) {
|
||||||
|
@ -4694,7 +4694,7 @@ if (WebComponents.flags.shadow) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var selectorRe = /([^{]*)({[\s\S]*?})/gim, cssCommentRe = /\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim, cssCommentNextSelectorRe = /\/\*\s*@polyfill ([^*]*\*+([^\/*][^*]*\*+)*\/)([^{]*?){/gim, cssContentNextSelectorRe = /polyfill-next-selector[^}]*content\:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim, cssCommentRuleRe = /\/\*\s@polyfill-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim, cssContentRuleRe = /(polyfill-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim, cssCommentUnscopedRuleRe = /\/\*\s@polyfill-unscoped-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim, cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim, cssPseudoRe = /::(x-[^\s{,(]*)/gim, cssPartRe = /::part\(([^)]*)\)/gim, polyfillHost = "-shadowcsshost", polyfillHostContext = "-shadowcsscontext", parenSuffix = ")(?:\\((" + "(?:\\([^)(]*\\)|[^)(]*)+?" + ")\\))?([^,{]*)";
|
var selectorRe = /([^{]*)({[\s\S]*?})/gim, cssCommentRe = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim, cssCommentNextSelectorRe = /\/\*\s*@polyfill ([^*]*\*+([^/*][^*]*\*+)*\/)([^{]*?){/gim, cssContentNextSelectorRe = /polyfill-next-selector[^}]*content\:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim, cssCommentRuleRe = /\/\*\s@polyfill-rule([^*]*\*+([^/*][^*]*\*+)*)\//gim, cssContentRuleRe = /(polyfill-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim, cssCommentUnscopedRuleRe = /\/\*\s@polyfill-unscoped-rule([^*]*\*+([^/*][^*]*\*+)*)\//gim, cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim, cssPseudoRe = /::(x-[^\s{,(]*)/gim, cssPartRe = /::part\(([^)]*)\)/gim, polyfillHost = "-shadowcsshost", polyfillHostContext = "-shadowcsscontext", parenSuffix = ")(?:\\((" + "(?:\\([^)(]*\\)|[^)(]*)+?" + ")\\))?([^,{]*)";
|
||||||
var cssColonHostRe = new RegExp("(" + polyfillHost + parenSuffix, "gim"), cssColonHostContextRe = new RegExp("(" + polyfillHostContext + parenSuffix, "gim"), selectorReSuffix = "([>\\s~+[.,{:][\\s\\S]*)?$", colonHostRe = /\:host/gim, colonHostContextRe = /\:host-context/gim, polyfillHostNoCombinator = polyfillHost + "-no-combinator", polyfillHostRe = new RegExp(polyfillHost, "gim"), polyfillHostContextRe = new RegExp(polyfillHostContext, "gim"), shadowDOMSelectorsRe = [ />>>/g, /::shadow/g, /::content/g, /\/deep\//g, /\/shadow\//g, /\/shadow-deep\//g, /\^\^/g, /\^/g ];
|
var cssColonHostRe = new RegExp("(" + polyfillHost + parenSuffix, "gim"), cssColonHostContextRe = new RegExp("(" + polyfillHostContext + parenSuffix, "gim"), selectorReSuffix = "([>\\s~+[.,{:][\\s\\S]*)?$", colonHostRe = /\:host/gim, colonHostContextRe = /\:host-context/gim, polyfillHostNoCombinator = polyfillHost + "-no-combinator", polyfillHostRe = new RegExp(polyfillHost, "gim"), polyfillHostContextRe = new RegExp(polyfillHostContext, "gim"), shadowDOMSelectorsRe = [ />>>/g, /::shadow/g, /::content/g, /\/deep\//g, /\/shadow\//g, /\/shadow-deep\//g, /\^\^/g, /\^/g ];
|
||||||
function stylesToCssText(styles, preserveComments) {
|
function stylesToCssText(styles, preserveComments) {
|
||||||
var cssText = "";
|
var cssText = "";
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -939,8 +939,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
width: 24px;
|
width: 24px;
|
||||||
height: 19px;
|
height: 24px;
|
||||||
padding-top: 3px;
|
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: rgba(82, 181, 75, .8);
|
background: rgba(82, 181, 75, .8);
|
||||||
|
@ -971,11 +970,10 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pieIndicator .fa {
|
.pieIndicator iron-icon {
|
||||||
color: #fff;
|
|
||||||
z-index: 4;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
margin: 4px 0 0 6px;
|
z-index: 4;
|
||||||
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pie {
|
.pie {
|
||||||
|
@ -987,7 +985,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
-o-border-radius: 50px;
|
-o-border-radius: 50px;
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
clip: rect(0px, 12px, 24px, 0px);
|
clip: rect(0px, 12px, 24px, 0px);
|
||||||
background-color: rgba(10, 10, 10, .9);
|
background-color: rgba(10, 10, 10, 1);
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,11 @@
|
||||||
<div>
|
<div>
|
||||||
<paper-checkbox id="chkWifi">${OptionSyncOnlyOnWifi}</paper-checkbox>
|
<paper-checkbox id="chkWifi">${OptionSyncOnlyOnWifi}</paper-checkbox>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<div>
|
||||||
|
<paper-checkbox id="chkSyncLosslessAudio">${OptionSyncLosslessAudioOriginal}</paper-checkbox>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
|
@ -64,6 +64,14 @@
|
||||||
|
|
||||||
return appStorage.getItem('syncOnlyOnWifi') != 'false';
|
return appStorage.getItem('syncOnlyOnWifi') != 'false';
|
||||||
},
|
},
|
||||||
|
syncLosslessAudio: function (val) {
|
||||||
|
|
||||||
|
if (val != null) {
|
||||||
|
update('syncLosslessAudio', val.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
return appStorage.getItem('syncLosslessAudio') != 'false';
|
||||||
|
},
|
||||||
syncPath: function (val) {
|
syncPath: function (val) {
|
||||||
|
|
||||||
if (val != null) {
|
if (val != null) {
|
||||||
|
|
|
@ -2159,18 +2159,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
var degree = (item.SyncPercent / 100) * 360;
|
var degree = (item.SyncPercent / 100) * 360;
|
||||||
return '<div class="pieIndicator"><i class="fa fa-refresh"></i><div class="pieBackground"></div><div class="hold"><div class="pie" style="-webkit-transform: rotate(' + degree + 'deg);-moz-transform: rotate(' + degree + 'deg);-o-transform: rotate(' + degree + 'deg);transform: rotate(' + degree + 'deg);"></div></div></div>';
|
return '<div class="pieIndicator"><iron-icon icon="refresh"></iron-icon><div class="pieBackground"></div><div class="hold"><div class="pie" style="-webkit-transform: rotate(' + degree + 'deg);-moz-transform: rotate(' + degree + 'deg);-o-transform: rotate(' + degree + 'deg);transform: rotate(' + degree + 'deg);"></div></div></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.SyncStatus) {
|
if (item.SyncStatus) {
|
||||||
if (item.SyncStatus == 'Queued' || item.SyncStatus == 'Converting' || item.SyncStatus == 'ReadyToTransfer' || item.SyncStatus == 'Transferring') {
|
if (item.SyncStatus == 'Queued' || item.SyncStatus == 'Converting' || item.SyncStatus == 'ReadyToTransfer' || item.SyncStatus == 'Transferring') {
|
||||||
|
|
||||||
return '<div class="syncIndicator syncWorkingIndicator"><i class="fa fa-refresh"></i></div>';
|
return '<div class="syncIndicator syncWorkingIndicator"><iron-icon icon="refresh"></iron-icon></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.SyncStatus == 'Synced') {
|
if (item.SyncStatus == 'Synced') {
|
||||||
|
|
||||||
return '<div class="syncIndicator"><i class="fa fa-refresh"></i></div>';
|
return '<div class="syncIndicator"><iron-icon icon="refresh"></iron-icon></div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
page.querySelector('#txtSyncPath').value = AppSettings.syncPath();
|
page.querySelector('#txtSyncPath').value = AppSettings.syncPath();
|
||||||
page.querySelector('#chkWifi').checked = AppSettings.syncOnlyOnWifi();
|
page.querySelector('#chkWifi').checked = AppSettings.syncOnlyOnWifi();
|
||||||
|
page.querySelector('#chkSyncLosslessAudio').checked = AppSettings.syncLosslessAudio();
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
}
|
}
|
||||||
|
@ -12,6 +13,7 @@
|
||||||
|
|
||||||
AppSettings.syncPath(page.querySelector('#txtSyncPath').value);
|
AppSettings.syncPath(page.querySelector('#txtSyncPath').value);
|
||||||
AppSettings.syncOnlyOnWifi(page.querySelector('#chkWifi').checked);
|
AppSettings.syncOnlyOnWifi(page.querySelector('#chkWifi').checked);
|
||||||
|
AppSettings.syncLosslessAudio(page.querySelector('#chkSyncLosslessAudio').checked);
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
Dashboard.alert(Globalize.translate('SettingsSaved'));
|
Dashboard.alert(Globalize.translate('SettingsSaved'));
|
||||||
|
|
|
@ -1731,13 +1731,8 @@ var AppInfo = {};
|
||||||
AppInfo.supportsSyncPathSetting = isCordova && isAndroid;
|
AppInfo.supportsSyncPathSetting = isCordova && isAndroid;
|
||||||
AppInfo.supportsUserDisplayLanguageSetting = Dashboard.isConnectMode() && !isCordova;
|
AppInfo.supportsUserDisplayLanguageSetting = Dashboard.isConnectMode() && !isCordova;
|
||||||
|
|
||||||
if (isCordova && isAndroid) {
|
AppInfo.directPlayAudioContainers = [];
|
||||||
AppInfo.directPlayAudioContainers = "flac,aac,mp3,mpa,wav,wma,mp2,ogg,oga,webma,ape,opus".split(',');
|
AppInfo.directPlayVideoContainers = [];
|
||||||
AppInfo.directPlayVideoContainers = "m4v,3gp,ts,mpegts,mov,xvid,vob,mkv,wmv,asf,ogm,ogv,m2v,avi,mpg,mpeg,mp4,webm".split(',');
|
|
||||||
} else {
|
|
||||||
AppInfo.directPlayAudioContainers = [];
|
|
||||||
AppInfo.directPlayVideoContainers = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isCordova && isIOS) {
|
if (isCordova && isIOS) {
|
||||||
AppInfo.moreIcon = 'more-horiz';
|
AppInfo.moreIcon = 'more-horiz';
|
||||||
|
@ -2079,6 +2074,17 @@ var AppInfo = {};
|
||||||
|
|
||||||
require(deps, function () {
|
require(deps, function () {
|
||||||
|
|
||||||
|
if (Dashboard.isRunningInCordova() && $.browser.android) {
|
||||||
|
AppInfo.directPlayAudioContainers = "aac,mp3,mpa,wav,wma,mp2,ogg,oga,webma,ape,opus".split(',');
|
||||||
|
|
||||||
|
// TODO: This is going to exclude it from both playback and sync, so improve on this
|
||||||
|
if (AppSettings.syncLosslessAudio()) {
|
||||||
|
AppInfo.directPlayAudioContainers.push('flac');
|
||||||
|
}
|
||||||
|
|
||||||
|
AppInfo.directPlayVideoContainers = "m4v,3gp,ts,mpegts,mov,xvid,vob,mkv,wmv,asf,ogm,ogv,m2v,avi,mpg,mpeg,mp4,webm".split(',');
|
||||||
|
}
|
||||||
|
|
||||||
capabilities.DeviceProfile = MediaPlayer.getDeviceProfile(Math.max(screen.height, screen.width));
|
capabilities.DeviceProfile = MediaPlayer.getDeviceProfile(Math.max(screen.height, screen.width));
|
||||||
createConnectionManager(capabilities).done(function () { onConnectionManagerCreated(deferred); });
|
createConnectionManager(capabilities).done(function () { onConnectionManagerCreated(deferred); });
|
||||||
});
|
});
|
||||||
|
|
|
@ -1519,5 +1519,6 @@
|
||||||
"OptionMax": "Max",
|
"OptionMax": "Max",
|
||||||
"HeaderEmbyGuide": "Emby Guide",
|
"HeaderEmbyGuide": "Emby Guide",
|
||||||
"LabelSyncPath": "Sync path:",
|
"LabelSyncPath": "Sync path:",
|
||||||
"OptionSyncOnlyOnWifi": "Sync only on Wifi"
|
"OptionSyncOnlyOnWifi": "Sync only on Wifi",
|
||||||
|
"OptionSyncLosslessAudioOriginal": "Sync lossless audio at original quality (when supported)"
|
||||||
}
|
}
|
||||||
|
|
11
dashboard-ui/thirdparty/paper-button-style.css
vendored
11
dashboard-ui/thirdparty/paper-button-style.css
vendored
|
@ -408,3 +408,14 @@ paper-textarea.mono textarea {
|
||||||
margin: 12px auto;
|
margin: 12px auto;
|
||||||
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
paper-dropdown-menu {
|
||||||
|
text-align: left;
|
||||||
|
margin: auto;
|
||||||
|
width: 100%;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
paper-dropdown-menu paper-item {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
|
@ -271,19 +271,14 @@ return m;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
var cePolyfill = window.CustomElements && !CustomElements.useNative;
|
var cePolyfill = window.CustomElements && !CustomElements.useNative;
|
||||||
if (cePolyfill) {
|
|
||||||
var ready = CustomElements.ready;
|
|
||||||
CustomElements.ready = true;
|
|
||||||
}
|
|
||||||
document.registerElement('dom-module', DomModule);
|
document.registerElement('dom-module', DomModule);
|
||||||
if (cePolyfill) {
|
|
||||||
CustomElements.ready = ready;
|
|
||||||
}
|
|
||||||
function forceDocumentUpgrade() {
|
function forceDocumentUpgrade() {
|
||||||
if (cePolyfill) {
|
if (cePolyfill) {
|
||||||
var script = document._currentScript || document.currentScript;
|
var script = document._currentScript || document.currentScript;
|
||||||
if (script) {
|
var doc = script && script.ownerDocument;
|
||||||
CustomElements.upgradeAll(script.ownerDocument);
|
if (doc && !doc.__customElementsForceUpgraded) {
|
||||||
|
doc.__customElementsForceUpgraded = true;
|
||||||
|
CustomElements.upgradeAll(doc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -587,7 +582,7 @@ debouncer.stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Polymer.version = '1.0.9';
|
Polymer.version = '1.1.0';
|
||||||
Polymer.Base._addFeature({
|
Polymer.Base._addFeature({
|
||||||
_registerFeatures: function () {
|
_registerFeatures: function () {
|
||||||
this._prepIs();
|
this._prepIs();
|
||||||
|
@ -1057,11 +1052,14 @@ Polymer.dom.addDebouncer(host.debounce('_distribute', host._distributeContent));
|
||||||
},
|
},
|
||||||
appendChild: function (node) {
|
appendChild: function (node) {
|
||||||
var handled;
|
var handled;
|
||||||
|
this._ensureContentLogicalInfo(node);
|
||||||
this._removeNodeFromHost(node, true);
|
this._removeNodeFromHost(node, true);
|
||||||
if (this._nodeIsInLogicalTree(this.node)) {
|
if (this._nodeIsInLogicalTree(this.node)) {
|
||||||
this._addLogicalInfo(node, this.node);
|
this._addLogicalInfo(node, this.node);
|
||||||
this._addNodeToHost(node);
|
this._addNodeToHost(node);
|
||||||
handled = this._maybeDistribute(node, this.node);
|
handled = this._maybeDistribute(node, this.node);
|
||||||
|
} else {
|
||||||
|
this._addNodeToHost(node);
|
||||||
}
|
}
|
||||||
if (!handled && !this._tryRemoveUndistributedNode(node)) {
|
if (!handled && !this._tryRemoveUndistributedNode(node)) {
|
||||||
var container = this.node._isShadyRoot ? this.node.host : this.node;
|
var container = this.node._isShadyRoot ? this.node.host : this.node;
|
||||||
|
@ -1075,9 +1073,9 @@ if (!ref_node) {
|
||||||
return this.appendChild(node);
|
return this.appendChild(node);
|
||||||
}
|
}
|
||||||
var handled;
|
var handled;
|
||||||
|
this._ensureContentLogicalInfo(node);
|
||||||
this._removeNodeFromHost(node, true);
|
this._removeNodeFromHost(node, true);
|
||||||
if (this._nodeIsInLogicalTree(this.node)) {
|
if (this._nodeIsInLogicalTree(this.node)) {
|
||||||
saveLightChildrenIfNeeded(this.node);
|
|
||||||
var children = this.childNodes;
|
var children = this.childNodes;
|
||||||
var index = children.indexOf(ref_node);
|
var index = children.indexOf(ref_node);
|
||||||
if (index < 0) {
|
if (index < 0) {
|
||||||
|
@ -1086,6 +1084,8 @@ throw Error('The ref_node to be inserted before is not a child ' + 'of this node
|
||||||
this._addLogicalInfo(node, this.node, index);
|
this._addLogicalInfo(node, this.node, index);
|
||||||
this._addNodeToHost(node);
|
this._addNodeToHost(node);
|
||||||
handled = this._maybeDistribute(node, this.node);
|
handled = this._maybeDistribute(node, this.node);
|
||||||
|
} else {
|
||||||
|
this._addNodeToHost(node);
|
||||||
}
|
}
|
||||||
if (!handled && !this._tryRemoveUndistributedNode(node)) {
|
if (!handled && !this._tryRemoveUndistributedNode(node)) {
|
||||||
ref_node = ref_node.localName === CONTENT ? this._firstComposedNode(ref_node) : ref_node;
|
ref_node = ref_node.localName === CONTENT ? this._firstComposedNode(ref_node) : ref_node;
|
||||||
|
@ -1103,6 +1103,8 @@ var handled;
|
||||||
if (this._nodeIsInLogicalTree(this.node)) {
|
if (this._nodeIsInLogicalTree(this.node)) {
|
||||||
this._removeNodeFromHost(node);
|
this._removeNodeFromHost(node);
|
||||||
handled = this._maybeDistribute(node, this.node);
|
handled = this._maybeDistribute(node, this.node);
|
||||||
|
} else {
|
||||||
|
this._removeNodeFromHost(node);
|
||||||
}
|
}
|
||||||
if (!handled) {
|
if (!handled) {
|
||||||
var container = this.node._isShadyRoot ? this.node.host : this.node;
|
var container = this.node._isShadyRoot ? this.node.host : this.node;
|
||||||
|
@ -1171,10 +1173,27 @@ return true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_updateInsertionPoints: function (host) {
|
_updateInsertionPoints: function (host) {
|
||||||
host.shadyRoot._insertionPoints = factory(host.shadyRoot).querySelectorAll(CONTENT);
|
var i$ = host.shadyRoot._insertionPoints = factory(host.shadyRoot).querySelectorAll(CONTENT);
|
||||||
|
for (var i = 0, c; i < i$.length; i++) {
|
||||||
|
c = i$[i];
|
||||||
|
saveLightChildrenIfNeeded(c);
|
||||||
|
saveLightChildrenIfNeeded(factory(c).parentNode);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
_nodeIsInLogicalTree: function (node) {
|
_nodeIsInLogicalTree: function (node) {
|
||||||
return Boolean(node._lightParent !== undefined || node._isShadyRoot || this._ownerShadyRootForNode(node) || node.shadyRoot);
|
return Boolean(node._lightParent !== undefined || node._isShadyRoot || node.shadyRoot);
|
||||||
|
},
|
||||||
|
_ensureContentLogicalInfo: function (node) {
|
||||||
|
if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
||||||
|
saveLightChildrenIfNeeded(this.node);
|
||||||
|
var c$ = Array.prototype.slice.call(node.childNodes);
|
||||||
|
for (var i = 0, n; i < c$.length && (n = c$[i]); i++) {
|
||||||
|
this._ensureContentLogicalInfo(n);
|
||||||
|
}
|
||||||
|
} else if (node.localName === CONTENT) {
|
||||||
|
saveLightChildrenIfNeeded(this.node);
|
||||||
|
saveLightChildrenIfNeeded(node);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
_parentNeedsDistribution: function (parent) {
|
_parentNeedsDistribution: function (parent) {
|
||||||
return parent && parent.shadyRoot && hasInsertionPoint(parent.shadyRoot);
|
return parent && parent.shadyRoot && hasInsertionPoint(parent.shadyRoot);
|
||||||
|
@ -1228,14 +1247,12 @@ node = factory(node).parentNode;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_addNodeToHost: function (node) {
|
_addNodeToHost: function (node) {
|
||||||
var checkNode = node.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? node.firstChild : node;
|
var root = this.getOwnerRoot();
|
||||||
var root = this._ownerShadyRootForNode(checkNode);
|
|
||||||
if (root) {
|
if (root) {
|
||||||
root.host._elementAdd(node);
|
root.host._elementAdd(node);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_addLogicalInfo: function (node, container, index) {
|
_addLogicalInfo: function (node, container, index) {
|
||||||
saveLightChildrenIfNeeded(container);
|
|
||||||
var children = factory(container).childNodes;
|
var children = factory(container).childNodes;
|
||||||
index = index === undefined ? children.length : index;
|
index = index === undefined ? children.length : index;
|
||||||
if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
||||||
|
@ -1762,8 +1779,13 @@ this.shadyRoot = this.root;
|
||||||
this.shadyRoot._distributionClean = false;
|
this.shadyRoot._distributionClean = false;
|
||||||
this.shadyRoot._isShadyRoot = true;
|
this.shadyRoot._isShadyRoot = true;
|
||||||
this.shadyRoot._dirtyRoots = [];
|
this.shadyRoot._dirtyRoots = [];
|
||||||
this.shadyRoot._insertionPoints = !this._notes || this._notes._hasContent ? this.shadyRoot.querySelectorAll('content') : [];
|
var i$ = this.shadyRoot._insertionPoints = !this._notes || this._notes._hasContent ? this.shadyRoot.querySelectorAll('content') : [];
|
||||||
saveLightChildrenIfNeeded(this.shadyRoot);
|
saveLightChildrenIfNeeded(this.shadyRoot);
|
||||||
|
for (var i = 0, c; i < i$.length; i++) {
|
||||||
|
c = i$[i];
|
||||||
|
saveLightChildrenIfNeeded(c);
|
||||||
|
saveLightChildrenIfNeeded(c.parentNode);
|
||||||
|
}
|
||||||
this.shadyRoot.host = this;
|
this.shadyRoot.host = this;
|
||||||
},
|
},
|
||||||
get domHost() {
|
get domHost() {
|
||||||
|
@ -1998,14 +2020,12 @@ if (newChildParent !== parentNode) {
|
||||||
removeFromComposedParent(newChildParent, newChild);
|
removeFromComposedParent(newChildParent, newChild);
|
||||||
}
|
}
|
||||||
remove(newChild);
|
remove(newChild);
|
||||||
saveLightChildrenIfNeeded(parentNode);
|
|
||||||
nativeInsertBefore.call(parentNode, newChild, refChild || null);
|
nativeInsertBefore.call(parentNode, newChild, refChild || null);
|
||||||
newChild._composedParent = parentNode;
|
newChild._composedParent = parentNode;
|
||||||
}
|
}
|
||||||
function remove(node) {
|
function remove(node) {
|
||||||
var parentNode = getComposedParent(node);
|
var parentNode = getComposedParent(node);
|
||||||
if (parentNode) {
|
if (parentNode) {
|
||||||
saveLightChildrenIfNeeded(parentNode);
|
|
||||||
node._composedParent = null;
|
node._composedParent = null;
|
||||||
nativeRemoveChild.call(parentNode, node);
|
nativeRemoveChild.call(parentNode, node);
|
||||||
}
|
}
|
||||||
|
@ -2704,8 +2724,7 @@ prevent = dy > dx;
|
||||||
prevent = dx > dy;
|
prevent = dx > dy;
|
||||||
}
|
}
|
||||||
if (prevent) {
|
if (prevent) {
|
||||||
// This prevents horizontal scrolling in safari
|
ev.preventDefault();
|
||||||
//ev.preventDefault();
|
|
||||||
} else {
|
} else {
|
||||||
Gestures.prevent('track');
|
Gestures.prevent('track');
|
||||||
}
|
}
|
||||||
|
@ -4254,7 +4273,7 @@ MIXIN_RULE: 1000
|
||||||
OPEN_BRACE: '{',
|
OPEN_BRACE: '{',
|
||||||
CLOSE_BRACE: '}',
|
CLOSE_BRACE: '}',
|
||||||
_rx: {
|
_rx: {
|
||||||
comments: /\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim,
|
comments: /\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,
|
||||||
port: /@import[^;]*;/gim,
|
port: /@import[^;]*;/gim,
|
||||||
customProp: /(?:^|[\s;])--[^;{]*?:[^{};]*?(?:[;\n]|$)/gim,
|
customProp: /(?:^|[\s;])--[^;{]*?:[^{};]*?(?:[;\n]|$)/gim,
|
||||||
mixinProp: /(?:^|[\s;])--[^;{]*?:[^{;]*?{[^}]*?}(?:[;\n]|$)?/gim,
|
mixinProp: /(?:^|[\s;])--[^;{]*?:[^{;]*?{[^}]*?}(?:[;\n]|$)?/gim,
|
||||||
|
@ -4270,7 +4289,8 @@ return api;
|
||||||
}();
|
}();
|
||||||
Polymer.StyleUtil = function () {
|
Polymer.StyleUtil = function () {
|
||||||
return {
|
return {
|
||||||
MODULE_STYLES_SELECTOR: 'style, link[rel=import][type~=css]',
|
MODULE_STYLES_SELECTOR: 'style, link[rel=import][type~=css], template',
|
||||||
|
INCLUDE_ATTR: 'include',
|
||||||
toCssText: function (rules, callback, preserveProperties) {
|
toCssText: function (rules, callback, preserveProperties) {
|
||||||
if (typeof rules === 'string') {
|
if (typeof rules === 'string') {
|
||||||
rules = this.parser.parse(rules);
|
rules = this.parser.parse(rules);
|
||||||
|
@ -4325,27 +4345,52 @@ afterNode = n$[n$.length - 1];
|
||||||
target.insertBefore(style, afterNode && afterNode.nextSibling || target.firstChild);
|
target.insertBefore(style, afterNode && afterNode.nextSibling || target.firstChild);
|
||||||
return style;
|
return style;
|
||||||
},
|
},
|
||||||
|
cssFromModules: function (moduleIds) {
|
||||||
|
var modules = moduleIds.trim().split(' ');
|
||||||
|
var cssText = '';
|
||||||
|
for (var i = 0; i < modules.length; i++) {
|
||||||
|
cssText += this.cssFromModule(modules[i]);
|
||||||
|
}
|
||||||
|
return cssText;
|
||||||
|
},
|
||||||
cssFromModule: function (moduleId) {
|
cssFromModule: function (moduleId) {
|
||||||
var m = Polymer.DomModule.import(moduleId);
|
var m = Polymer.DomModule.import(moduleId);
|
||||||
if (m && !m._cssText) {
|
if (m && !m._cssText) {
|
||||||
|
m._cssText = this._cssFromElement(m);
|
||||||
|
}
|
||||||
|
return m && m._cssText || '';
|
||||||
|
},
|
||||||
|
_cssFromElement: function (element) {
|
||||||
var cssText = '';
|
var cssText = '';
|
||||||
var e$ = Array.prototype.slice.call(m.querySelectorAll(this.MODULE_STYLES_SELECTOR));
|
var content = element.content || element;
|
||||||
for (var i = 0, e; i < e$.length; i++) {
|
var sourceDoc = element.ownerDocument;
|
||||||
|
var e$ = Array.prototype.slice.call(content.querySelectorAll(this.MODULE_STYLES_SELECTOR));
|
||||||
|
for (var i = 0, e, resolveDoc, addModule; i < e$.length; i++) {
|
||||||
e = e$[i];
|
e = e$[i];
|
||||||
|
resolveDoc = sourceDoc;
|
||||||
|
addModule = null;
|
||||||
|
if (e.localName === 'template') {
|
||||||
|
cssText += this._cssFromElement(e);
|
||||||
|
} else {
|
||||||
if (e.localName === 'style') {
|
if (e.localName === 'style') {
|
||||||
|
addModule = e.getAttribute(this.INCLUDE_ATTR);
|
||||||
e = e.__appliedElement || e;
|
e = e.__appliedElement || e;
|
||||||
e.parentNode.removeChild(e);
|
e.parentNode.removeChild(e);
|
||||||
} else {
|
} else {
|
||||||
e = e.import && e.import.body;
|
e = e.import && e.import.body;
|
||||||
|
resolveDoc = e.ownerDocument;
|
||||||
}
|
}
|
||||||
if (e) {
|
if (e) {
|
||||||
cssText += Polymer.ResolveUrl.resolveCss(e.textContent, e.ownerDocument);
|
cssText += this.resolveCss(e.textContent, resolveDoc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m._cssText = cssText;
|
if (addModule) {
|
||||||
|
cssText += this.cssFromModules(addModule);
|
||||||
}
|
}
|
||||||
return m && m._cssText || '';
|
}
|
||||||
|
return cssText;
|
||||||
},
|
},
|
||||||
|
resolveCss: Polymer.ResolveUrl.resolveCss,
|
||||||
parser: Polymer.CssParse,
|
parser: Polymer.CssParse,
|
||||||
ruleTypes: Polymer.CssParse.types
|
ruleTypes: Polymer.CssParse.types
|
||||||
};
|
};
|
||||||
|
@ -5246,7 +5291,8 @@ var styleTransformer = Polymer.StyleTransformer;
|
||||||
Polymer({
|
Polymer({
|
||||||
is: 'custom-style',
|
is: 'custom-style',
|
||||||
extends: 'style',
|
extends: 'style',
|
||||||
created: function () {
|
properties: { include: String },
|
||||||
|
ready: function () {
|
||||||
this._tryApply();
|
this._tryApply();
|
||||||
},
|
},
|
||||||
attached: function () {
|
attached: function () {
|
||||||
|
@ -5258,7 +5304,7 @@ if (this.parentNode && this.parentNode.localName !== 'dom-module') {
|
||||||
this._appliesToDocument = true;
|
this._appliesToDocument = true;
|
||||||
var e = this.__appliedElement || this;
|
var e = this.__appliedElement || this;
|
||||||
styleDefaults.addStyle(e);
|
styleDefaults.addStyle(e);
|
||||||
if (e.textContent) {
|
if (e.textContent || this.include) {
|
||||||
this._apply();
|
this._apply();
|
||||||
} else {
|
} else {
|
||||||
var observer = new MutationObserver(function () {
|
var observer = new MutationObserver(function () {
|
||||||
|
@ -5272,6 +5318,9 @@ observer.observe(e, { childList: true });
|
||||||
},
|
},
|
||||||
_apply: function () {
|
_apply: function () {
|
||||||
var e = this.__appliedElement || this;
|
var e = this.__appliedElement || this;
|
||||||
|
if (this.include) {
|
||||||
|
e.textContent += styleUtil.cssFromModules(this.include);
|
||||||
|
}
|
||||||
this._computeStyleProperties();
|
this._computeStyleProperties();
|
||||||
var props = this._styleProperties;
|
var props = this._styleProperties;
|
||||||
var self = this;
|
var self = this;
|
||||||
|
@ -5609,29 +5658,36 @@ items.push(store[key]);
|
||||||
return items;
|
return items;
|
||||||
},
|
},
|
||||||
_applySplices: function (splices) {
|
_applySplices: function (splices) {
|
||||||
var keySplices = [];
|
var keyMap = {}, key, i;
|
||||||
for (var i = 0; i < splices.length; i++) {
|
splices.forEach(function (s) {
|
||||||
var j, o, key, s = splices[i];
|
s.addedKeys = [];
|
||||||
|
for (i = 0; i < s.removed.length; i++) {
|
||||||
|
key = this.getKey(s.removed[i]);
|
||||||
|
keyMap[key] = keyMap[key] ? null : -1;
|
||||||
|
}
|
||||||
|
for (i = 0; i < s.addedCount; i++) {
|
||||||
|
var item = this.userArray[s.index + i];
|
||||||
|
key = this.getKey(item);
|
||||||
|
key = key === undefined ? this.add(item) : key;
|
||||||
|
keyMap[key] = keyMap[key] ? null : 1;
|
||||||
|
s.addedKeys.push(key);
|
||||||
|
}
|
||||||
|
}, this);
|
||||||
var removed = [];
|
var removed = [];
|
||||||
for (j = 0; j < s.removed.length; j++) {
|
var added = [];
|
||||||
o = s.removed[j];
|
for (var key in keyMap) {
|
||||||
key = this.remove(o);
|
if (keyMap[key] < 0) {
|
||||||
|
this.removeKey(key);
|
||||||
removed.push(key);
|
removed.push(key);
|
||||||
}
|
}
|
||||||
var added = [];
|
if (keyMap[key] > 0) {
|
||||||
for (j = 0; j < s.addedCount; j++) {
|
|
||||||
o = this.userArray[s.index + j];
|
|
||||||
key = this.add(o);
|
|
||||||
added.push(key);
|
added.push(key);
|
||||||
}
|
}
|
||||||
keySplices.push({
|
|
||||||
index: s.index,
|
|
||||||
removed: removed,
|
|
||||||
removedItems: s.removed,
|
|
||||||
added: added
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
return keySplices;
|
return [{
|
||||||
|
removed: removed,
|
||||||
|
added: added
|
||||||
|
}];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Polymer.Collection.get = function (userArray) {
|
Polymer.Collection.get = function (userArray) {
|
||||||
|
@ -5726,11 +5782,13 @@ this.collection = null;
|
||||||
} else {
|
} else {
|
||||||
this._error(this._logf('dom-repeat', 'expected array for `items`,' + ' found', this.items));
|
this._error(this._logf('dom-repeat', 'expected array for `items`,' + ' found', this.items));
|
||||||
}
|
}
|
||||||
this._splices = [];
|
this._keySplices = [];
|
||||||
|
this._indexSplices = [];
|
||||||
this._needFullRefresh = true;
|
this._needFullRefresh = true;
|
||||||
this._debounceTemplate(this._render);
|
this._debounceTemplate(this._render);
|
||||||
} else if (change.path == 'items.splices') {
|
} else if (change.path == 'items.splices') {
|
||||||
this._splices = this._splices.concat(change.value.keySplices);
|
this._keySplices = this._keySplices.concat(change.value.keySplices);
|
||||||
|
this._indexSplices = this._indexSplices.concat(change.value.indexSplices);
|
||||||
this._debounceTemplate(this._render);
|
this._debounceTemplate(this._render);
|
||||||
} else {
|
} else {
|
||||||
var subpath = change.path.slice(6);
|
var subpath = change.path.slice(6);
|
||||||
|
@ -5767,16 +5825,17 @@ this._applyFullRefresh();
|
||||||
this._needFullRefresh = false;
|
this._needFullRefresh = false;
|
||||||
} else {
|
} else {
|
||||||
if (this._sortFn) {
|
if (this._sortFn) {
|
||||||
this._applySplicesUserSort(this._splices);
|
this._applySplicesUserSort(this._keySplices);
|
||||||
} else {
|
} else {
|
||||||
if (this._filterFn) {
|
if (this._filterFn) {
|
||||||
this._applyFullRefresh();
|
this._applyFullRefresh();
|
||||||
} else {
|
} else {
|
||||||
this._applySplicesArrayOrder(this._splices);
|
this._applySplicesArrayOrder(this._indexSplices);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this._splices = [];
|
this._keySplices = [];
|
||||||
|
this._indexSplices = [];
|
||||||
var keyToIdx = this._keyToInstIdx = {};
|
var keyToIdx = this._keyToInstIdx = {};
|
||||||
for (var i = 0; i < this._instances.length; i++) {
|
for (var i = 0; i < this._instances.length; i++) {
|
||||||
var inst = this._instances[i];
|
var inst = this._instances[i];
|
||||||
|
@ -5914,10 +5973,10 @@ pool.push(inst);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this._instances.splice(s.index, s.removed.length);
|
this._instances.splice(s.index, s.removed.length);
|
||||||
for (var i = 0; i < s.added.length; i++) {
|
for (var i = 0; i < s.addedKeys.length; i++) {
|
||||||
var inst = {
|
var inst = {
|
||||||
isPlaceholder: true,
|
isPlaceholder: true,
|
||||||
key: s.added[i]
|
key: s.addedKeys[i]
|
||||||
};
|
};
|
||||||
this._instances.splice(s.index + i, 0, inst);
|
this._instances.splice(s.index + i, 0, inst);
|
||||||
}
|
}
|
||||||
|
@ -6026,12 +6085,12 @@ is: 'array-selector',
|
||||||
properties: {
|
properties: {
|
||||||
items: {
|
items: {
|
||||||
type: Array,
|
type: Array,
|
||||||
observer: '_resetSelection'
|
observer: 'clearSelection'
|
||||||
},
|
},
|
||||||
multi: {
|
multi: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
value: false,
|
value: false,
|
||||||
observer: '_resetSelection'
|
observer: 'clearSelection'
|
||||||
},
|
},
|
||||||
selected: {
|
selected: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
@ -6042,7 +6101,7 @@ type: Boolean,
|
||||||
value: false
|
value: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_resetSelection: function () {
|
clearSelection: function () {
|
||||||
if (Array.isArray(this.selected)) {
|
if (Array.isArray(this.selected)) {
|
||||||
for (var i = 0; i < this.selected.length; i++) {
|
for (var i = 0; i < this.selected.length; i++) {
|
||||||
this.unlinkPaths('selected.' + i);
|
this.unlinkPaths('selected.' + i);
|
||||||
|
@ -9838,8 +9897,8 @@ context. You should place this element as a child of `<body>` whenever possible.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fired after the `iron-overlay` closes.
|
* Fired after the `iron-overlay` closes.
|
||||||
* @event iron-overlay-closed {{canceled: boolean}} detail -
|
* @event iron-overlay-closed
|
||||||
* canceled: True if the overlay was canceled.
|
* @param {{canceled: (boolean|undefined)}} set to the `closingReason` attribute
|
||||||
*/
|
*/
|
||||||
|
|
||||||
listeners: {
|
listeners: {
|
||||||
|
@ -9943,7 +10002,7 @@ context. You should place this element as a child of `<body>` whenever possible.
|
||||||
// overlay becomes visible here
|
// overlay becomes visible here
|
||||||
this.style.display = '';
|
this.style.display = '';
|
||||||
// force layout to ensure transitions will go
|
// force layout to ensure transitions will go
|
||||||
this.offsetWidth;
|
/** @suppress {suspiciousCode} */ this.offsetWidth;
|
||||||
if (this.opened) {
|
if (this.opened) {
|
||||||
this._renderOpened();
|
this._renderOpened();
|
||||||
} else {
|
} else {
|
||||||
|
@ -10067,7 +10126,7 @@ context. You should place this element as a child of `<body>` whenever possible.
|
||||||
this.style.display = 'none';
|
this.style.display = 'none';
|
||||||
this.style.transform = this.style.webkitTransform = '';
|
this.style.transform = this.style.webkitTransform = '';
|
||||||
// force layout to avoid application of transform
|
// force layout to avoid application of transform
|
||||||
this.offsetWidth;
|
/** @suppress {suspiciousCode} */ this.offsetWidth;
|
||||||
this.style.transition = this.style.webkitTransition = '';
|
this.style.transition = this.style.webkitTransition = '';
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue