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

update icons

This commit is contained in:
Luke Pulverenti 2015-06-20 20:49:42 -04:00
parent a12fb807ef
commit 0bc95efe7e
61 changed files with 2966 additions and 320 deletions

View file

@ -0,0 +1,40 @@
{
"name": "iron-media-query",
"version": "1.0.2",
"description": "Lets you bind to a CSS media query",
"authors": [
"The Polymer Authors"
],
"keywords": [
"web-components",
"polymer",
"media"
],
"private": true,
"repository": {
"type": "git",
"url": "git://github.com/PolymerElements/iron-media-query"
},
"license": "http://polymer.github.io/LICENSE.txt",
"homepage": "https://github.com/PolymerElements/iron-media-query",
"ignore": [],
"dependencies": {
"polymer": "Polymer/polymer#^1.0.0"
},
"devDependencies": {
"paper-styles": "polymerelements/paper-styles#^1.0.2",
"web-component-tester": "*",
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"_release": "1.0.2",
"_resolution": {
"type": "version",
"tag": "v1.0.2",
"commit": "34abf0a3b8bf9e9e478352dbb3d9e6a76bf3669a"
},
"_source": "git://github.com/PolymerElements/iron-media-query.git",
"_target": "^1.0.0",
"_originalSource": "PolymerElements/iron-media-query"
}

View file

@ -0,0 +1 @@
bower_components

View file

@ -0,0 +1,31 @@
{
"name": "iron-media-query",
"version": "1.0.2",
"description": "Lets you bind to a CSS media query",
"authors": [
"The Polymer Authors"
],
"keywords": [
"web-components",
"polymer",
"media"
],
"private": true,
"repository": {
"type": "git",
"url": "git://github.com/PolymerElements/iron-media-query"
},
"license": "http://polymer.github.io/LICENSE.txt",
"homepage": "https://github.com/PolymerElements/iron-media-query",
"ignore": [],
"dependencies": {
"polymer": "Polymer/polymer#^1.0.0"
},
"devDependencies": {
"paper-styles": "polymerelements/paper-styles#^1.0.2",
"web-component-tester": "*",
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}
}

View file

@ -0,0 +1,45 @@
<!doctype html>
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
<title>iron-media-query demo</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../../paper-styles/paper-styles.html">
<link rel="import" href="../../paper-styles/demo-pages.html">
<link rel="import" href="../iron-media-query.html">
</head>
<body>
<div class="vertical-section vertical-section-container centered">
<h1>&lt;iron-media-query&gt;</h1>
<template is="dom-bind">
<iron-media-query query="(min-width: 600px)" query-matches="{{queryMatches}}"></iron-media-query>
<template is="dom-if" if="{{queryMatches}}">
<p>The viewports width is greater than <code>600px</code></p>
</template>
<template is="dom-if" if="{{!queryMatches}}">
<p>The viewports width is less than <code>600px</code></p>
</template>
</template>
</div>
</body>
</html>

View file

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
<g id="background" display="none">
<rect display="inline" fill="#B0BEC5" width="225" height="126"/>
</g>
<g id="label">
</g>
<g id="art">
<path d="M173,99H91V41h82V99z M93,97h78V43H93V97z"/>
<path d="M77,89H51V42h26V89z M53,87h22V44H53V87z"/>
<rect x="52" y="56" width="24" height="2"/>
<rect x="92" y="58" width="80" height="2"/>
<path d="M65.3,42h-2c0-10,8.7-18.7,18.7-18.7v2C73,25.3,65.3,33,65.3,42z"/>
<path d="M105.3,42h-2c0-9-7.3-16.7-16.3-16.7v-2C97,23.3,105.3,32,105.3,42z"/>
<circle cx="84.3" cy="24.3" r="4"/>
<circle cx="69.3" cy="80.3" r="4"/>
<circle cx="160.3" cy="59.3" r="4"/>
<path d="M49,41v49c0,1.1,0.9,2,2,2h26c1.1,0,2-0.9,2-2V41c0-1.1-0.9-2-2-2H51C49.9,39,49,39.9,49,41z M76,88H52V43h24V88z"/>
<path d="M88.9,40.7v59c0,1.1,0.9,2,2,2h82c1.1,0,2-0.9,2-2v-59c0-1.1-0.9-2-2-2h-82C89.8,38.7,88.9,39.6,88.9,40.7z M172,98H93V42
h79V98z"/>
<g id="ic_x5F_add_x0D_">
</g>
</g>
<g id="Guides">
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -0,0 +1,29 @@
<!doctype html>
<!--
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
The complete set of authors may be found at http://polymer.github.io/AUTHORS
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
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
-->
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>iron-media-query</title>
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../iron-component-page/iron-component-page.html">
</head>
<body>
<iron-component-page></iron-component-page>
</body>
</html>

View file

@ -0,0 +1,77 @@
<!--
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<link rel="import" href="../polymer/polymer.html">
<!--
`iron-media-query` can be used to data bind to a CSS media query.
The `query` property is a bare CSS media query.
The `query-matches` property is a boolean representing whether the page matches that media query.
Example:
<iron-media-query query="(min-width: 600px)" query-matches="{{queryMatches}}"></iron-media-query>
@group Iron Elements
@demo demo/index.html
@hero hero.svg
@element iron-media-query
-->
<script>
Polymer({
is: 'iron-media-query',
properties: {
/**
* The Boolean return value of the media query.
*/
queryMatches: {
type: Boolean,
value: false,
readOnly: true,
notify: true
},
/**
* The CSS media query to evaluate.
*/
query: {
type: String,
observer: 'queryChanged'
}
},
created: function() {
this._mqHandler = this.queryHandler.bind(this);
},
queryChanged: function(query) {
if (this._mq) {
this._mq.removeListener(this._mqHandler);
}
if (query[0] !== '(') {
query = '(' + query + ')';
}
this._mq = window.matchMedia(query);
this._mq.addListener(this._mqHandler);
this.queryHandler(this._mq);
},
queryHandler: function(mq) {
this._setQueryMatches(mq.matches);
}
});
</script>

View file

@ -0,0 +1,71 @@
<!doctype html>
<!--
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
<title>iron-media-query-basic</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<script src="../../test-fixture/test-fixture-mocha.js"></script>
<link rel="import" href="../iron-media-query.html">
<link rel="import" href="../../test-fixture/test-fixture.html">
</head>
<body>
<test-fixture id="basic">
<template>
<iron-media-query></iron-media-query>
</template>
</test-fixture>
<script>
suite('basic', function() {
var mq;
suite('set query with different values', function() {
setup(function () {
mq = fixture('basic');
});
test('small min-width value', function() {
mq.query = '(min-width: 1px)';
assert.equal(mq.queryMatches, true);
});
test('large min-width value', function() {
mq.query = '(min-width: 10000px)';
assert.equal(mq.queryMatches, false);
});
test('small max-width value', function() {
mq.query = '(max-width: 1px)';
assert.equal(mq.queryMatches, false);
});
test('large max-width value', function() {
mq.query = '(max-width: 10000px)';
assert.equal(mq.queryMatches, true);
});
});
});
</script>
</body>
</html>

View file

@ -0,0 +1,30 @@
<!doctype html>
<!--
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
<meta charset="utf-8">
<title>Tests</title>
<script src="../../web-component-tester/browser.js"></script>
</head>
<body>
<script>
WCT.loadSuites([
'basic.html'
]);
</script>
</body>
</html>

View file

@ -0,0 +1,43 @@
{
"name": "paper-drawer-panel",
"version": "1.0.2",
"description": "A responsive drawer panel",
"authors": [
"The Polymer Authors"
],
"keywords": [
"web-components",
"polymer",
"drawer",
"responsive",
"layout"
],
"repository": {
"type": "git",
"url": "git://github.com/PolymerElements/paper-drawer-panel.git"
},
"license": "http://polymer.github.io/LICENSE.txt",
"homepage": "https://github.com/PolymerElements/paper-drawer-panel",
"dependencies": {
"polymer": "Polymer/polymer#^1.0.0",
"iron-selector": "PolymerElements/iron-selector#^1.0.0",
"iron-media-query": "PolymerElements/iron-media-query#^1.0.0"
},
"devDependencies": {
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
"paper-button": "PolymerElements/paper-button#^1.0.0",
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
"web-component-tester": "*",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"_release": "1.0.2",
"_resolution": {
"type": "version",
"tag": "v1.0.2",
"commit": "691739c877914f7231eaca16b724bdca295dfe8d"
},
"_source": "git://github.com/PolymerElements/paper-drawer-panel.git",
"_target": "~1.0.2",
"_originalSource": "PolymerElements/paper-drawer-panel",
"_direct": true
}

View file

@ -0,0 +1 @@
bower_components/

View file

@ -0,0 +1,33 @@
{
"name": "paper-drawer-panel",
"version": "1.0.2",
"description": "A responsive drawer panel",
"authors": [
"The Polymer Authors"
],
"keywords": [
"web-components",
"polymer",
"drawer",
"responsive",
"layout"
],
"repository": {
"type": "git",
"url": "git://github.com/PolymerElements/paper-drawer-panel.git"
},
"license": "http://polymer.github.io/LICENSE.txt",
"homepage": "https://github.com/PolymerElements/paper-drawer-panel",
"dependencies": {
"polymer": "Polymer/polymer#^1.0.0",
"iron-selector": "PolymerElements/iron-selector#^1.0.0",
"iron-media-query": "PolymerElements/iron-media-query#^1.0.0"
},
"devDependencies": {
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
"paper-button": "PolymerElements/paper-button#^1.0.0",
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
"web-component-tester": "*",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}
}

View file

@ -0,0 +1,85 @@
<!doctype html>
<!--
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
<title>paper-drawer-panel demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../../paper-styles/paper-styles.html">
<link rel="stylesheet" href="../../paper-styles/demo.css">
<link rel="import" href="../../paper-button/paper-button.html">
<link rel="import" href="../paper-drawer-panel.html">
<style is="custom-style">
#paperDrawerPanel [main] {
background-color: var(--google-grey-100);
}
#paperDrawerPanel [drawer] {
border-right: 1px solid var(--google-grey-300);
}
#paperDrawerPanel[right-drawer] [drawer] {
border-left: 1px solid var(--google-grey-300);
}
paper-button {
color: white;
margin: 10px;
background-color: var(--google-blue-700);
white-space: nowrap;
}
</style>
</head>
<body unresolved>
<paper-drawer-panel id="paperDrawerPanel">
<div drawer></div>
<div main>
<div>
<paper-button onclick="flipDrawer()" raised>flip drawer</paper-button>
</div>
<div>
<paper-button paper-drawer-toggle raised>toggle drawer</paper-button>
</div>
</div>
</paper-drawer-panel>
<script>
(function(global) {
'use strict';
var DRAWER_ATTR = 'right-drawer';
var pdp = document.getElementById('paperDrawerPanel');
global.flipDrawer = function() {
if (pdp.hasAttribute(DRAWER_ATTR)) {
pdp.removeAttribute(DRAWER_ATTR);
} else {
pdp.setAttribute(DRAWER_ATTR, '');
}
}
}(this));
</script>
</body>
</html>

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
<g id="background" display="none">
<rect display="inline" fill="#B0BEC5" width="225" height="126"/>
</g>
<g id="label">
</g>
<g id="art">
<path d="M175,102H61V24h114V102z M63,100h110V26H63V100z"/>
<path d="M91,102H61V24h30V102z M63,100h26V26H63V100z"/>
<circle cx="123" cy="63" r="4"/>
<rect x="90" y="62" width="33" height="2"/>
<g id="ic_x5F_add_x0D_">
</g>
</g>
<g id="Guides">
</g>
</svg>

After

Width:  |  Height:  |  Size: 828 B

View file

@ -0,0 +1,29 @@
<!doctype html>
<!--
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>paper-drawer-panel</title>
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../iron-component-page/iron-component-page.html">
</head>
<body>
<iron-component-page></iron-component-page>
</body>
</html>

View file

@ -0,0 +1,142 @@
/**
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
:host {
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
}
iron-selector > #drawer {
position: absolute;
top: 0;
left: 0;
height: 100%;
background-color: white;
will-change: transform;
box-sizing: border-box;
-moz-box-sizing: border-box;
@apply(--paper-drawer-panel-drawer-container);
}
.transition > #drawer {
transition: -webkit-transform ease-in-out 0.3s, width ease-in-out 0.3s;
transition: transform ease-in-out 0.3s, width ease-in-out 0.3s;
}
.left-drawer > #drawer {
@apply(--paper-drawer-panel-left-drawer-container);
}
.right-drawer > #drawer {
left: auto;
right: 0;
@apply(--paper-drawer-panel-right-drawer-container);
}
iron-selector > #main {
position: absolute;
top: 0;
right: 0;
bottom: 0;
@apply(--paper-drawer-panel-main-container);
}
.transition > #main {
transition: left ease-in-out 0.3s, padding ease-in-out 0.3s;
}
.right-drawer > #main {
left: 0;
}
.right-drawer.transition > #main {
transition: right ease-in-out 0.3s, padding ease-in-out 0.3s;
}
#main > ::content > [main] {
height: 100%;
}
#drawer > ::content > [drawer] {
height: 100%;
}
#scrim {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
visibility: hidden;
opacity: 0;
transition: opacity ease-in-out 0.38s, visibility ease-in-out 0.38s;
background-color: rgba(0, 0, 0, 0.3);
}
.narrow-layout > #drawer.iron-selected {
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
}
.right-drawer.narrow-layout > #drawer.iron-selected {
box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.15);
}
.narrow-layout > #drawer > ::content > [drawer] {
border: 0;
}
.left-drawer.narrow-layout > #drawer:not(.iron-selected) {
-webkit-transform: translateX(-100%);
transform: translateX(-100%);
}
.right-drawer.narrow-layout > #drawer:not(.iron-selected) {
left: auto;
-webkit-transform: translateX(100%);
transform: translateX(100%);
}
.narrow-layout > #main {
left: 0 !important;
padding: 0;
}
.right-drawer.narrow-layout > #main {
left: 0;
right: 0;
padding: 0;
}
.narrow-layout > #main:not(.iron-selected) > #scrim,
.dragging > #main > #scrim {
visibility: visible;
opacity: var(--paper-drawer-panel-scrim-opacity, 1);
}
.narrow-layout > #main > * {
margin: 0;
min-height: 100%;
left: 0;
right: 0;
box-sizing: border-box;
-moz-box-sizing: border-box;
}
iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] {
display: none;
}

View file

@ -0,0 +1,591 @@
<!--
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../iron-media-query/iron-media-query.html">
<link rel="import" href="../iron-selector/iron-selector.html">
<!--
`paper-drawer-panel` contains a drawer panel and a main panel. The drawer
and the main panel are side-by-side with drawer on the left. When the browser
window size is smaller than the `responsiveWidth`, `paper-drawer-panel`
changes to narrow layout. In narrow layout, the drawer will be stacked on top
of the main panel. The drawer will slide in/out to hide/reveal the main
panel.
Use the attribute `drawer` to indicate that the element is the drawer panel and
`main` to indicate that the element is the main panel.
Example:
<paper-drawer-panel>
<div drawer> Drawer panel... </div>
<div main> Main panel... </div>
</paper-drawer-panel>
The drawer and the main panels are not scrollable. You can set CSS overflow
property on the elements to make them scrollable or use `paper-header-panel`.
Example:
<paper-drawer-panel>
<paper-header-panel drawer>
<paper-toolbar></paper-toolbar>
<div> Drawer content... </div>
</paper-header-panel>
<paper-header-panel main>
<paper-toolbar></paper-toolbar>
<div> Main content... </div>
</paper-header-panel>
</paper-drawer-panel>
An element that should toggle the drawer will automatically do so if it's
given the `paper-drawer-toggle` attribute. Also this element will automatically
be hidden in wide layout.
Example:
<paper-drawer-panel>
<paper-header-panel drawer>
<paper-toolbar>
<div>Application</div>
</paper-toolbar>
<div> Drawer content... </div>
</paper-header-panel>
<paper-header-panel main>
<paper-toolbar>
<paper-icon-button icon="menu" paper-drawer-toggle></paper-icon-button>
<div>Title</div>
</paper-toolbar>
<div> Main content... </div>
</paper-header-panel>
</paper-drawer-panel>
To position the drawer to the right, add `right-drawer` attribute.
<paper-drawer-panel right-drawer>
<div drawer> Drawer panel... </div>
<div main> Main panel... </div>
</paper-drawer-panel>
Styling paper-drawer-panel:
To change the main container:
paper-drawer-panel {
--paper-drawer-panel-main-container: {
background-color: gray;
};
}
To change the drawer container when it's in the left side:
paper-drawer-panel {
--paper-drawer-panel-left-drawer-container: {
background-color: white;
};
}
To change the drawer container when it's in the right side:
paper-drawer-panel {
--paper-drawer-panel-right-drawer-container: {
background-color: white;
};
}
@group Paper elements
@element paper-drawer-panel
@demo demo/index.html
@hero hero.svg
-->
<dom-module id="paper-drawer-panel">
<link rel="import" type="css" href="paper-drawer-panel.css">
<template>
<iron-media-query
id="mq"
on-query-matches-changed="_onQueryMatchesChanged"
query="[[_computeMediaQuery(forceNarrow, responsiveWidth)]]">
</iron-media-query>
<iron-selector
attr-for-selected="id"
class$="[[_computeIronSelectorClass(narrow, transition, dragging, rightDrawer)]]"
activate-event=""
selected="[[selected]]">
<div id="main" style$="[[_computeMainStyle(narrow, rightDrawer, drawerWidth)]]">
<content select="[main]"></content>
<div id="scrim" on-tap="closeDrawer"></div>
</div>
<div id="drawer" style$="[[_computeDrawerStyle(drawerWidth)]]">
<content select="[drawer]"></content>
</div>
</iron-selector>
</template>
</dom-module>
<script>
(function() {
'use strict';
// this would be the only `paper-drawer-panel` in
// the whole app that can be in `dragging` state
var sharedPanel = null;
function classNames(obj) {
var classes = [];
for (var key in obj) {
if (obj.hasOwnProperty(key) && obj[key]) {
classes.push(key);
}
}
return classes.join(' ');
}
Polymer({
is: 'paper-drawer-panel',
/**
* Fired when the narrow layout changes.
*
* @event paper-responsive-change {{narrow: boolean}} detail -
* narrow: true if the panel is in narrow layout.
*/
/**
* Fired when the selected panel changes.
*
* Listening for this event is an alternative to observing changes in the `selected` attribute.
* This event is fired both when a panel is selected and deselected.
* The `isSelected` detail property contains the selection state.
*
* @event paper-select {{isSelected: boolean, item: Object}} detail -
* isSelected: True for selection and false for deselection.
* item: The panel that the event refers to.
*/
properties: {
/**
* The panel to be selected when `paper-drawer-panel` changes to narrow
* layout.
*/
defaultSelected: {
type: String,
value: 'main'
},
/**
* If true, swipe from the edge is disable.
*/
disableEdgeSwipe: {
type: Boolean,
value: false
},
/**
* If true, swipe to open/close the drawer is disabled.
*/
disableSwipe: {
type: Boolean,
value: false
},
/**
* Whether the user is dragging the drawer interactively.
*/
dragging: {
type: Boolean,
value: false,
readOnly: true,
notify: true
},
/**
* Width of the drawer panel.
*/
drawerWidth: {
type: String,
value: '256px'
},
/**
* How many pixels on the side of the screen are sensitive to edge
* swipes and peek.
*/
edgeSwipeSensitivity: {
type: Number,
value: 30
},
/**
* If true, ignore `responsiveWidth` setting and force the narrow layout.
*/
forceNarrow: {
type: Boolean,
value: false
},
/**
* Whether the browser has support for the transform CSS property.
*/
hasTransform: {
type: Boolean,
value: function() {
return 'transform' in this.style;
}
},
/**
* Whether the browser has support for the will-change CSS property.
*/
hasWillChange: {
type: Boolean,
value: function() {
return 'willChange' in this.style;
}
},
/**
* Returns true if the panel is in narrow layout. This is useful if you
* need to show/hide elements based on the layout.
*/
narrow: {
reflectToAttribute: true,
type: Boolean,
value: false,
readOnly: true,
notify: true
},
/**
* Whether the drawer is peeking out from the edge.
*/
peeking: {
type: Boolean,
value: false,
readOnly: true,
notify: true
},
/**
* Max-width when the panel changes to narrow layout.
*/
responsiveWidth: {
type: String,
value: '640px'
},
/**
* If true, position the drawer to the right.
*/
rightDrawer: {
type: Boolean,
value: false
},
/**
* The panel that is being selected. `drawer` for the drawer panel and
* `main` for the main panel.
*/
selected: {
reflectToAttribute: true,
notify: true,
type: String,
value: null
},
/**
* The attribute on elements that should toggle the drawer on tap, also elements will
* automatically be hidden in wide layout.
*/
drawerToggleAttribute: {
type: String,
value: 'paper-drawer-toggle'
},
/**
* Whether the transition is enabled.
*/
transition: {
type: Boolean,
value: false
},
},
listeners: {
tap: '_onTap',
track: '_onTrack',
down: '_downHandler',
up: '_upHandler'
},
observers: [
'_forceNarrowChanged(forceNarrow, defaultSelected)'
],
/**
* Toggles the panel open and closed.
*
* @method togglePanel
*/
togglePanel: function() {
if (this._isMainSelected()) {
this.openDrawer();
} else {
this.closeDrawer();
}
},
/**
* Opens the drawer.
*
* @method openDrawer
*/
openDrawer: function() {
this.selected = 'drawer';
},
/**
* Closes the drawer.
*
* @method closeDrawer
*/
closeDrawer: function() {
this.selected = 'main';
},
ready: function() {
// Avoid transition at the beginning e.g. page loads and enable
// transitions only after the element is rendered and ready.
this.transition = true;
},
_computeIronSelectorClass: function(narrow, transition, dragging, rightDrawer) {
return classNames({
dragging: dragging,
'narrow-layout': narrow,
'right-drawer': rightDrawer,
'left-drawer': !rightDrawer,
transition: transition
});
},
_computeDrawerStyle: function(drawerWidth) {
return 'width:' + drawerWidth + ';';
},
_computeMainStyle: function(narrow, rightDrawer, drawerWidth) {
var style = '';
style += 'left:' + ((narrow || rightDrawer) ? '0' : drawerWidth) + ';';
if (rightDrawer) {
style += 'right:' + (narrow ? '' : drawerWidth) + ';';
} else {
style += 'right:;';
}
return style;
},
_computeMediaQuery: function(forceNarrow, responsiveWidth) {
return forceNarrow ? '' : '(max-width: ' + responsiveWidth + ')';
},
_computeSwipeOverlayHidden: function(narrow, disableEdgeSwipe) {
return !narrow || disableEdgeSwipe;
},
_onTrack: function(e) {
if (sharedPanel && this !== sharedPanel) {
return;
}
switch (e.detail.state) {
case 'start':
this._trackStart(e);
break;
case 'track':
this._trackX(e);
break;
case 'end':
this._trackEnd(e);
break;
}
},
_responsiveChange: function(narrow) {
this._setNarrow(narrow);
if (this.narrow) {
this.selected = this.defaultSelected;
}
this.setScrollDirection(this._swipeAllowed() ? 'y' : 'all');
this.fire('paper-responsive-change', {narrow: this.narrow});
},
_onQueryMatchesChanged: function(e) {
this._responsiveChange(e.detail.value);
},
_forceNarrowChanged: function() {
// set the narrow mode only if we reached the `responsiveWidth`
this._responsiveChange(this.forceNarrow || this.$.mq.queryMatches);
},
_swipeAllowed: function() {
return this.narrow && !this.disableSwipe;
},
_isMainSelected: function() {
return this.selected === 'main';
},
_startEdgePeek: function() {
this.width = this.$.drawer.offsetWidth;
this._moveDrawer(this._translateXForDeltaX(this.rightDrawer ?
-this.edgeSwipeSensitivity : this.edgeSwipeSensitivity));
this._setPeeking(true);
},
_stopEdgePeek: function() {
if (this.peeking) {
this._setPeeking(false);
this._moveDrawer(null);
}
},
_downHandler: function(e) {
if (!this.dragging && this._isMainSelected() && this._isEdgeTouch(e) && !sharedPanel) {
this._startEdgePeek();
// grab this panel
sharedPanel = this;
}
},
_upHandler: function() {
this._stopEdgePeek();
// release the panel
sharedPanel = null;
},
_onTap: function(e) {
var targetElement = Polymer.dom(e).localTarget;
var isTargetToggleElement = targetElement &&
this.drawerToggleAttribute &&
targetElement.hasAttribute(this.drawerToggleAttribute);
if (isTargetToggleElement) {
this.togglePanel();
}
},
_isEdgeTouch: function(e) {
var x = e.detail.x;
return !this.disableEdgeSwipe && this._swipeAllowed() &&
(this.rightDrawer ?
x >= this.offsetWidth - this.edgeSwipeSensitivity :
x <= this.edgeSwipeSensitivity);
},
_trackStart: function(event) {
if (this._swipeAllowed()) {
sharedPanel = this;
this._setDragging(true);
if (this._isMainSelected()) {
this._setDragging(this.peeking || this._isEdgeTouch(event));
}
if (this.dragging) {
this.width = this.$.drawer.offsetWidth;
this.transition = false;
}
}
},
_translateXForDeltaX: function(deltaX) {
var isMain = this._isMainSelected();
if (this.rightDrawer) {
return Math.max(0, isMain ? this.width + deltaX : deltaX);
} else {
return Math.min(0, isMain ? deltaX - this.width : deltaX);
}
},
_trackX: function(e) {
if (this.dragging) {
var dx = e.detail.dx;
if (this.peeking) {
if (Math.abs(dx) <= this.edgeSwipeSensitivity) {
// Ignore trackx until we move past the edge peek.
return;
}
this._setPeeking(false);
}
this._moveDrawer(this._translateXForDeltaX(dx));
}
},
_trackEnd: function(e) {
if (this.dragging) {
var xDirection = e.detail.dx > 0;
this._setDragging(false);
this.transition = true;
sharedPanel = null;
this._moveDrawer(null);
if (this.rightDrawer) {
this[xDirection ? 'closeDrawer' : 'openDrawer']();
} else {
this[xDirection ? 'openDrawer' : 'closeDrawer']();
}
}
},
_transformForTranslateX: function(translateX) {
if (translateX === null) {
return '';
}
return this.hasWillChange ? 'translateX(' + translateX + 'px)' :
'translate3d(' + translateX + 'px, 0, 0)';
},
_moveDrawer: function(translateX) {
var s = this.$.drawer.style;
if (this.hasTransform) {
s.transform = this._transformForTranslateX(translateX);
} else {
s.webkitTransform = this._transformForTranslateX(translateX);
}
}
});
}());
</script>

View file

@ -25,14 +25,10 @@
}
.backdropContainer {
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
background-attachment: fixed;
}
.libraryPage .header {

View file

@ -244,9 +244,9 @@
border-bottom: 5px solid transparent;
}
.libraryViewNav a:not(.ui-btn-active):hover {
color: #2ad !important;
}
.libraryViewNav a:not(.ui-btn-active):hover {
color: #2ad !important;
}
@media all and (max-width: 500px) {
@ -287,4 +287,4 @@
.libraryDocument .dashboardMenuButton {
display: none !important;
}
}

View file

@ -288,11 +288,6 @@
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* Prevent white flickering */
html, body {
background-color: #1f1f1f;
}
/* For some reason jquery mobile 1.4.5 wants to horitontally pad mini form fields. */
.ui-mini {
margin-left: 0;
@ -307,12 +302,17 @@ html, body {
html {
-ms-touch-action: manipulation;
touch-action: manipulation;
/* Prevent white flickering */
background-color: #1f1f1f;
}
body {
overflow-y: scroll !important;
font-size: 13px;
font-family: Roboto, Arial, Helvetica, sans-serif;
-webkit-overflow-scrolling: touch;
/* Remove the white default from jqm */
background-color: transparent !important;
}
.bodyWithPopupOpen {

View file

@ -136,18 +136,18 @@
<p id="itemLinks"></p>
<div class="detailButtonsContainer desktopDetailButtons" style="text-align: left;">
<button class="btnPlay hide" type="button" data-icon="play" data-inline="true" data-mini="true">${ButtonPlay}</button>
<a class="btnSync hide" data-role="button" data-icon="refresh" data-inline="true" data-mini="true" href="#">${ButtonSync}</a>
<button class="btnMoreCommands hide jqmButtonNoText" type="button" data-icon="ellipsis-v" data-inline="true" data-mini="true" data-iconpos="notext">${ButtonMore}</button>
<paper-button raised class="secondary btnPlay hide"><iron-icon icon="play-arrow"></iron-icon><span>${ButtonPlay}</span></paper-button>
<paper-button raised class="submit btnSync hide"><iron-icon icon="refresh"></iron-icon><span>${ButtonSync}</span></paper-button>
<paper-button raised class="subdued btnMoreCommands hide notext"><iron-icon icon="more-vert"></iron-icon></paper-button>
</div>
</td>
</tr>
</table>
</div>
<div class="detailButtonsContainer mobileDetailButtons">
<button class="btnPlay hide" type="button" data-icon="play" data-inline="true" data-mini="true">${ButtonPlay}</button>
<a class="btnSync hide" data-role="button" data-icon="refresh" data-inline="true" data-mini="true" href="#">${ButtonSync}</a>
<button class="btnMoreCommands hide jqmButtonNoText" type="button" data-icon="ellipsis-v" data-inline="true" data-mini="true" data-iconpos="notext">${ButtonMore}</button>
<paper-button raised class="secondary btnPlay hide"><iron-icon icon="play-arrow"></iron-icon><span>${ButtonPlay}</span></paper-button>
<paper-button raised class="submit btnSync hide"><iron-icon icon="refresh"></iron-icon><span>${ButtonSync}</span></paper-button>
<paper-button raised class="subdued btnMoreCommands hide notext"><iron-icon icon="more-vert"></iron-icon></paper-button>
</div>
<p class="itemOverview mobileOverview smoothScrollY"></p>
<div data-role="content" style="padding-top: 0;">

View file

@ -4,7 +4,7 @@
<title>Emby</title>
</head>
<body>
<div id="liveTvChannelPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvcomponents,scripts/livetvchannel">
<div id="liveTvChannelPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvcomponents,scripts/livetvchannel,paperbuttonstyle">
<div class="libraryViewNav">
<a href="livetvsuggested.html"><i class="material-icons">info</i>${TabSuggestions}</a>
<a href="livetvguide.html"><i class="material-icons">grid_on</i>${TabGuide}</a>
@ -28,10 +28,10 @@
</table>
<div class="detailButtonsContainer">
<span id="playButtonContainer" style="display: none;">
<button id="btnPlay" type="button" data-icon="play" data-inline="true" data-mini="true">${ButtonPlay}</button>
<paper-button raised class="secondary btnPlay"><iron-icon icon="play-arrow"></iron-icon><span>${ButtonPlay}</span></paper-button>
</span>
<span id="editButtonContainer" style="display: none;">
<button id="btnEdit" type="button" data-icon="edit" data-inline="true" data-mini="true">${ButtonEdit}</button>
<paper-button raised class="subdued btnEdit"><iron-icon icon="mode-edit"></iron-icon><span>${ButtonEdit}</span></paper-button>
</span>
</div>
<div data-role="content">

View file

@ -39,13 +39,13 @@
</div>
<div class="detailButtonsContainer">
<span id="playButtonContainer" style="display: none;">
<button id="btnPlay" type="button" data-icon="play" data-inline="true" data-mini="true">${ButtonPlay}</button>
<paper-button raised class="secondary btnPlay"><iron-icon icon="play-arrow"></iron-icon><span>${ButtonPlay}</span></paper-button>
</span>
<span id="cancelRecordingButtonContainer" style="display: none;">
<button id="btnCancelRecording" type="button" data-icon="delete" data-inline="true" data-mini="true">${ButtonCancelRecording}</button>
<paper-button raised class="subdued btnCancelRecording"><iron-icon icon="delete"></iron-icon><span>${ButtonCancelRecording}</span></paper-button>
</span>
<span id="recordButtonContainer" style="display: none;">
<button id="btnRecord" type="button" data-icon="video" data-inline="true" data-mini="true">${ButtonRecord}</button>
<paper-button raised class="subdued btnRecord"><iron-icon icon="videocam"></iron-icon><span>${ButtonRecord}</span></paper-button>
</span>
</div>
<div data-role="content">

View file

@ -4,7 +4,7 @@
<title>Emby</title>
</head>
<body>
<div id="liveTvRecordingPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvcomponents,scripts/livetvrecording">
<div id="liveTvRecordingPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvcomponents,scripts/livetvrecording,paperbuttonstyle">
<div class="libraryViewNav">
<a href="livetvsuggested.html"><i class="material-icons">info</i>${TabSuggestions}</a>
<a href="livetvguide.html"><i class="material-icons">grid_on</i>${TabGuide}</a>
@ -39,11 +39,11 @@
</div>
<div class="detailButtonsContainer">
<span id="playButtonContainer" style="display: none;">
<button id="btnPlay" type="button" data-icon="play" data-inline="true" data-mini="true">${ButtonPlay}</button>
<paper-button raised class="secondary btnPlay"><iron-icon icon="play-arrow"></iron-icon><span>${ButtonPlay}</span></paper-button>
</span>
<a class="btnSync hide" data-role="button" data-icon="refresh" data-inline="true" data-mini="true" href="#">${ButtonSync}</a>
<paper-button raised class="submit btnSync"><iron-icon icon="refresh"></iron-icon><span>${ButtonSync}</span></paper-button>
<span id="deleteButtonContainer" style="display: none;">
<button id="btnDelete" type="button" data-icon="delete" data-inline="true" data-mini="true">${ButtonDelete}</button>
<paper-button raised class="subdued btnDelete"><iron-icon icon="delete"></iron-icon><span>${ButtonDelete}</span></paper-button>
</span>
</div>
<div data-role="content">

View file

@ -15,7 +15,11 @@
var style = "";
if (options.positionTo) {
var windowHeight = $(window).height();
// If the window height is under a certain amount, don't bother trying to position
// based on an element.
if (options.positionTo && windowHeight > 600) {
var pos = $(options.positionTo).offset();
@ -27,7 +31,7 @@
pos.left -= 24;
// Account for popup size - we can't predict this yet so just estimate
pos.top -= 100;
pos.top -= (55 * options.items.length) / 2;
pos.left -= 80;
// Account for scroll position
@ -53,7 +57,13 @@
html += '</h2>';
}
html += '<paper-dialog-scrollable>';
// There seems to be a bug with this in safari causing it to immediately roll up to 0 height
var isScrollable = !$.browser.safari;
if (isScrollable) {
html += '<paper-dialog-scrollable>';
}
for (var i = 0, length = options.items.length; i < length; i++) {
var option = options.items[i];
@ -67,7 +77,7 @@
html += '</paper-button>';
}
html += '</paper-dialog-scrollable>';
//html += '</paper-dialog-scrollable>';
if (options.showCancel) {
html += '<div class="buttons">';
@ -75,16 +85,18 @@
html += '</div>';
}
html += '</paper-dialog>';
if (isScrollable) {
html += '</paper-dialog>';
}
$(html).appendTo(document.body);
$(document.body).append(html);
setTimeout(function () {
var dlg = document.getElementById(id);
dlg.open();
// Has to be assigned a z-index after the call to .open()
$(dlg).css('z-index', '999999').on('iron-overlay-closed', onClosed);
$(dlg).on('iron-overlay-closed', onClosed);
$('.btnOption', dlg).on('click', function () {

View file

@ -368,7 +368,7 @@
$(ApiClient).on("websocketmessage.autoorganizelog", onWebSocketMessage);
}).on('pagehide', "#libraryFileOrganizerLogPage", function () {
}).on('pagebeforehide', "#libraryFileOrganizerLogPage", function () {
var page = this;

View file

@ -2,14 +2,14 @@
function getElement() {
var elem = $('.backdropContainer');
//var elem = $('.backdropContainer');
if (!elem.length) {
//if (!elem.length) {
elem = $('<div class="backdropContainer"></div>').prependTo(document.body);
}
// elem = $('<div class="backdropContainer"></div>').prependTo(document.body);
//}
return elem;
return $(document.documentElement).addClass('backdropContainer');
}
function getRandom(min, max) {
@ -112,7 +112,7 @@
function clearBackdrop() {
$('.backdropContainer').css('backgroundImage', '');
$('.backdropContainer').css('backgroundImage', '').removeClass('backdropContainer');
}
function isEnabledByDefault() {
@ -122,12 +122,6 @@
return false;
}
// It flickers too much in IE
if ($.browser.msie) {
return false;
}
if ($.browser.android && AppInfo.isNativeApp) {
return screen.availWidth >= 1200;
}

View file

@ -1009,7 +1009,7 @@
}
};
$(document).on('pageshowready', "#dashboardPage", DashboardPage.onPageShow).on('pagehide', "#dashboardPage", DashboardPage.onPageHide);
$(document).on('pageshowready', "#dashboardPage", DashboardPage.onPageShow).on('pagebeforehide', "#dashboardPage", DashboardPage.onPageHide);
(function ($, document, window) {

View file

@ -289,7 +289,7 @@
$("#txtLookupName").focus().select();
});
}).on('pagehide', "#editCollectionTitlesPage", function () {
}).on('pagebeforehide', "#editCollectionTitlesPage", function () {
var page = this;

View file

@ -596,7 +596,7 @@
return false;
});
}).on('pagehide', "#editItemImagesPage", function () {
}).on('pagebeforehide', "#editItemImagesPage", function () {
var page = this;

View file

@ -1462,7 +1462,7 @@
}
});
}).on('pagehide', "#editItemMetadataPage", function () {
}).on('pagebeforehide', "#editItemMetadataPage", function () {
var page = this;
$(LibraryBrowser).off('itemdeleting.editor');

View file

@ -343,7 +343,7 @@
$(ApiClient).on("websocketmessage", onWebSocketMessageReceived);
}).on('pagehide', "#editItemSubtitlesPage", function () {
}).on('pagebeforehide', "#editItemSubtitlesPage", function () {
var page = this;

View file

@ -23,9 +23,16 @@
var latestMediElem = $('.section0', page);
Sections.loadRecentlyAdded(latestMediElem, user, context);
Sections.loadLatestLiveTvRecordings($(".section1", page), userId);
Sections.loadLatestChannelItems($(".section2", page), userId);
Dashboard.showLoadingMsg();
var promises = [];
promises.push(Sections.loadRecentlyAdded(latestMediElem, user, context));
promises.push(Sections.loadLatestLiveTvRecordings($(".section1", page), userId));
promises.push(Sections.loadLatestChannelItems($(".section2", page), userId));
$.when(promises).done(function() {
Dashboard.hideLoadingMsg();
});
}
$(document).on('pagebeforeshowready', "#homeLatestPage", function () {

View file

@ -77,9 +77,9 @@
Dashboard.getCurrentUser().done(function (user) {
if (MediaController.canPlay(item)) {
$('.btnPlay', page).show();
$('.btnPlay', page).visible(true);
} else {
$('.btnPlay', page).hide();
$('.btnPlay', page).visible(false);
}
if (SyncManager.isAvailable(item, user)) {
@ -93,9 +93,9 @@
$('#itemImage', page).html(LibraryBrowser.getDetailImageHtml(item, editImagesHref, true));
if (LibraryBrowser.getMoreCommands(item, user).length) {
$('.btnMoreCommands', page).show();
$('.btnMoreCommands', page).visible(true);
} else {
$('.btnMoreCommands', page).show();
$('.btnMoreCommands', page).visible(false);
}
});
@ -593,7 +593,7 @@
reload(page);
}).on('pagehide', "#itemByNameDetailPage", function () {
}).on('pagebeforehide', "#itemByNameDetailPage", function () {
currentItem = null;
});

View file

@ -1664,7 +1664,7 @@
}
});
}).on('pagehide', "#itemDetailPage", function () {
}).on('pagebeforehide', "#itemDetailPage", function () {
$(LibraryBrowser).off('itemdeleting.detailpage');

View file

@ -270,7 +270,7 @@
updateFilterControls(page);
}).on('pagehide', "#itemListPage", function () {
}).on('pagebeforehide', "#itemListPage", function () {
currentItem = null;

View file

@ -185,169 +185,6 @@
return false;
}
function onAddToCollectionButtonClick() {
var id = this.getAttribute('data-itemid');
closeContextMenu();
BoxSetEditor.showPanel([id]);
return false;
}
function onAddToPlaylistButtonClick() {
var id = this.getAttribute('data-itemid');
closeContextMenu();
PlaylistManager.showPanel([id]);
return false;
}
function onShuffleButtonClick() {
var id = this.getAttribute('data-itemid');
MediaController.shuffle(id);
closeContextMenu();
return false;
}
function onInstantMixButtonClick() {
var id = this.getAttribute('data-itemid');
MediaController.instantMix(id);
closeContextMenu();
return false;
}
function onQueueButtonClick() {
var id = this.getAttribute('data-itemid');
MediaController.queue(id);
closeContextMenu();
return false;
}
function onPlayButtonClick() {
var id = this.getAttribute('data-itemid');
MediaController.play(id);
closeContextMenu();
return false;
}
function onDeleteButtonClick() {
var id = this.getAttribute('data-itemid');
closeContextMenu();
LibraryBrowser.deleteItem(id);
return false;
}
function onSyncButtonClick() {
var id = this.getAttribute('data-itemid');
closeContextMenu();
SyncManager.showMenu({
items: [
{
Id: id
}]
});
return false;
}
function onExternalPlayerButtonClick() {
closeContextMenu();
var id = this.getAttribute('data-itemid');
LibraryBrowser.playInExternalPlayer(id);
return false;
}
function onPlayAllFromHereButtonClick() {
var index = this.getAttribute('data-index');
var page = $(this).parents('.page');
var itemsContainer = $('.hasContextMenu', page).parents('.itemsContainer');
closeContextMenu();
itemsContainer.trigger('playallfromhere', [index]);
return false;
}
function onQueueAllFromHereButtonClick() {
var index = this.getAttribute('data-index');
var page = $(this).parents('.page');
var itemsContainer = $('.hasContextMenu', page).parents('.itemsContainer');
closeContextMenu();
itemsContainer.trigger('queueallfromhere', [index]);
return false;
}
function onRemoveFromPlaylistButtonClick() {
var playlistItemId = this.getAttribute('data-playlistitemid');
var page = $(this).parents('.page');
var itemsContainer = $('.hasContextMenu', page).parents('.itemsContainer');
itemsContainer.trigger('removefromplaylist', [playlistItemId]);
closeContextMenu();
return false;
}
function onResumeButtonClick() {
var id = this.getAttribute('data-itemid');
MediaController.play({
ids: [id],
startPositionTicks: parseInt(this.getAttribute('data-ticks'))
});
closeContextMenu();
return false;
}
function onCardTapHold(e) {
showContextMenu(this, {});
@ -379,116 +216,256 @@
var albumid = card.getAttribute('data-albumid');
var artistid = card.getAttribute('data-artistid');
$(card).addClass('hasContextMenu');
Dashboard.getCurrentUser().done(function (user) {
var html = '<div data-role="popup" class="tapHoldMenu" data-theme="a">';
html += '<ul data-role="listview" style="min-width: 180px;">';
var href = card.getAttribute('data-href') || card.href || $('a', card).attr('href');
var items = [];
if (commands.indexOf('addtocollection') != -1) {
html += '<li data-icon="false"><a href="#" class="btnAddToCollection" data-itemid="' + itemId + '">' + Globalize.translate('ButtonAddToCollection') + '</a></li>';
items.push({
name: Globalize.translate('ButtonAddToCollection'),
id: 'addtocollection',
ironIcon: 'add'
});
}
if (commands.indexOf('playlist') != -1) {
html += '<li data-icon="false"><a href="#" class="btnAddToPlaylist" data-itemid="' + itemId + '">' + Globalize.translate('ButtonAddToPlaylist') + '</a></li>';
items.push({
name: Globalize.translate('ButtonAddToPlaylist'),
id: 'playlist',
ironIcon: 'playlist-add'
});
}
if (commands.indexOf('delete') != -1) {
html += '<li data-icon="false"><a href="#" class="btnDelete" data-itemId="' + itemId + '">' + Globalize.translate('ButtonDelete') + '</a></li>';
items.push({
name: Globalize.translate('ButtonDelete'),
id: 'delete',
ironIcon: 'delete'
});
}
if (user.Policy.IsAdministrator && commands.indexOf('edit') != -1) {
html += '<li data-icon="false"><a href="edititemmetadata.html?id=' + itemId + '">' + Globalize.translate('ButtonEdit') + '</a></li>';
items.push({
name: Globalize.translate('ButtonEdit'),
id: 'edit',
ironIcon: 'mode-edit'
});
}
if (commands.indexOf('instantmix') != -1) {
html += '<li data-icon="false"><a href="#" class="btnInstantMix" data-itemid="' + itemId + '">' + Globalize.translate('ButtonInstantMix') + '</a></li>';
items.push({
name: Globalize.translate('ButtonInstantMix'),
id: 'instantmix',
ironIcon: 'shuffle'
});
}
html += '<li data-icon="false"><a href="' + href + '">' + Globalize.translate('ButtonOpen') + '</a></li>';
//html += '<li><a href="' + href + '" target="_blank">' + Globalize.translate('ButtonOpenInNewTab') + '</a></li>';
items.push({
name: Globalize.translate('ButtonOpen'),
id: 'open',
ironIcon: 'folder-open'
});
if (options.showPlayOptions !== false) {
if (MediaController.canPlayByAttributes(itemType, mediaType, playAccess, locationType)) {
html += '<li data-icon="false"><a href="#" class="btnPlay" data-itemid="' + itemId + '">' + Globalize.translate('ButtonPlay') + '</a></li>';
items.push({
name: Globalize.translate('ButtonPlay'),
id: 'play',
ironIcon: 'play-arrow'
});
if (commands.indexOf('playfromhere') != -1) {
html += '<li data-icon="false"><a href="#" class="btnPlayAllFromHere" data-index="' + index + '">' + Globalize.translate('ButtonPlayAllFromHere') + '</a></li>';
items.push({
name: Globalize.translate('ButtonPlayAllFromHere'),
id: 'playallfromhere',
ironIcon: 'play-arrow'
});
}
}
if (mediaType == 'Video' && AppSettings.enableExternalPlayers()) {
html += '<li data-icon="false"><a href="#" class="btnExternalPlayer" data-itemid="' + itemId + '">' + Globalize.translate('ButtonPlayExternalPlayer') + '</a></li>';
items.push({
name: Globalize.translate('ButtonPlayExternalPlayer'),
id: 'externalplayer',
ironIcon: 'airplay'
});
}
if (playbackPositionTicks && mediaType != "Audio") {
html += '<li data-icon="false"><a href="#" class="btnResume" data-ticks="' + playbackPositionTicks + '" data-itemid="' + itemId + '">' + Globalize.translate('ButtonResume') + '</a></li>';
items.push({
name: Globalize.translate('ButtonResume'),
id: 'resume',
ironIcon: 'play-arrow'
});
}
if (commands.indexOf('trailer') != -1) {
html += '<li data-icon="false"><a href="#" class="btnPlayTrailer" data-itemid="' + itemId + '">' + Globalize.translate('ButtonPlayTrailer') + '</a></li>';
items.push({
name: Globalize.translate('ButtonPlayTrailer'),
id: 'trailer',
ironIcon: 'play-arrow'
});
}
}
if (MediaController.canQueueMediaType(mediaType, itemType)) {
html += '<li data-icon="false"><a href="#" class="btnQueue" data-itemid="' + itemId + '">' + Globalize.translate('ButtonQueue') + '</a></li>';
items.push({
name: Globalize.translate('ButtonQueue'),
id: 'queue',
ironIcon: 'playlist-add'
});
if (commands.indexOf('queuefromhere') != -1) {
html += '<li data-icon="false"><a href="#" class="btnQueueAllFromHere" data-index="' + index + '">' + Globalize.translate('ButtonQueueAllFromHere') + '</a></li>';
items.push({
name: Globalize.translate('ButtonQueueAllFromHere'),
id: 'queueallfromhere',
ironIcon: 'playlist-add'
});
}
}
if (commands.indexOf('shuffle') != -1) {
html += '<li data-icon="false"><a href="#" class="btnShuffle" data-itemid="' + itemId + '">' + Globalize.translate('ButtonShuffle') + '</a></li>';
items.push({
name: Globalize.translate('ButtonShuffle'),
id: 'shuffle',
ironIcon: 'shuffle'
});
}
if (commands.indexOf('removefromplaylist') != -1) {
html += '<li data-icon="false"><a href="#" class="btnRemoveFromPlaylist" data-playlistitemid="' + playlistItemId + '">' + Globalize.translate('ButtonRemoveFromPlaylist') + '</a></li>';
items.push({
name: Globalize.translate('ButtonRemoveFromPlaylist'),
id: 'removefromplaylist',
ironIcon: 'remove'
});
}
if (commands.indexOf('sync') != -1) {
html += '<li data-icon="false"><a href="#" class="btnSync" data-itemId="' + itemId + '">' + Globalize.translate('ButtonSync') + '</a></li>';
items.push({
name: Globalize.translate('ButtonSync'),
id: 'sync',
ironIcon: 'refresh'
});
}
if (albumid) {
html += '<li data-icon="false"><a href="itemdetails.html?id=' + albumid + '">' + Globalize.translate('ButtonViewAlbum') + '</a></li>';
items.push({
name: Globalize.translate('ButtonViewAlbum'),
id: 'album',
ironIcon: 'album'
});
}
if (artistid) {
html += '<li data-icon="false"><a href="itembynamedetails.html?context=music&id=' + artistid + '">' + Globalize.translate('ButtonViewArtist') + '</a></li>';
items.push({
name: Globalize.translate('ButtonViewArtist'),
id: 'artist',
ironIcon: 'person'
});
}
html += '</ul>';
var href = card.getAttribute('data-href') || card.href || $('a', card).attr('href');
html += '</div>';
require(['actionsheet'], function () {
$($.mobile.activePage).append(html);
ActionSheetElement.show({
items: items,
positionTo: displayContextItem,
callback: function (id) {
var elem = $('.tapHoldMenu').popup({ positionTo: displayContextItem }).trigger('create').popup("open").on("popupafterclose", function () {
switch (id) {
case 'addtocollection':
BoxSetEditor.showPanel([itemId]);
break;
case 'playlist':
PlaylistManager.showPanel([itemId]);
break;
case 'delete':
LibraryBrowser.deleteItem(itemId);
break;
case 'download':
{
var downloadHref = ApiClient.getUrl("Items/" + itemId + "/Download", {
api_key: ApiClient.accessToken()
});
window.location.href = downloadHref;
break;
}
case 'edit':
Dashboard.navigate('edititemmetadata.html?id=' + itemId);
break;
case 'refresh':
ApiClient.refreshItem(itemId, {
Recursive: true,
ImageRefreshMode: 'FullRefresh',
MetadataRefreshMode: 'FullRefresh',
ReplaceAllImages: false,
ReplaceAllMetadata: true
});
break;
case 'instantmix':
MediaController.instantMix(itemId);
break;
case 'shuffle':
MediaController.shuffle(itemId);
break;
case 'open':
Dashboard.navigate(href);
break;
case 'album':
Dashboard.navigate('itemdetails.html?id=' + albumid);
break;
case 'artist':
Dashboard.navigate('tembynamedetails.html?context=music&id=' + artistid);
break;
case 'play':
MediaController.MediaController(itemId);
break;
case 'playallfromhere':
$(card).parents('.itemsContainer').trigger('playallfromhere', [index]);
break;
case 'queue':
MediaController.queue(itemId);
break;
case 'trailer':
ApiClient.getLocalTrailers(Dashboard.getCurrentUserId(), itemId).done(function (trailers) {
MediaController.play({ items: trailers });
});
break;
case 'resume':
MediaController.play({
ids: [itemId],
startPositionTicks: playbackPositionTicks
});
break;
case 'queueallfromhere':
$(card).parents('.itemsContainer').trigger('queueallfromhere', [index]);
break;
case 'sync':
SyncManager.showMenu({
items: [
{
Id: itemId
}]
});
break;
case 'externalplayer':
LibraryBrowser.playInExternalPlayer(itemId);
break;
case 'removefromplaylist':
$(card).parents('.itemsContainer').trigger('removefromplaylist', [playlistItemId]);
break;
default:
break;
}
}
});
$(this).off("popupafterclose").remove();
$(card).removeClass('hasContextMenu');
});
$('.btnPlay', elem).on('click', onPlayButtonClick);
$('.btnResume', elem).on('click', onResumeButtonClick);
$('.btnQueue', elem).on('click', onQueueButtonClick);
$('.btnInstantMix', elem).on('click', onInstantMixButtonClick);
$('.btnShuffle', elem).on('click', onShuffleButtonClick);
$('.btnPlayTrailer', elem).on('click', onTrailerButtonClick);
$('.btnAddToPlaylist', elem).on('click', onAddToPlaylistButtonClick);
$('.btnRemoveFromPlaylist', elem).on('click', onRemoveFromPlaylistButtonClick);
$('.btnPlayAllFromHere', elem).on('click', onPlayAllFromHereButtonClick);
$('.btnQueueAllFromHere', elem).on('click', onQueueAllFromHereButtonClick);
$('.btnExternalPlayer', elem).on('click', onExternalPlayerButtonClick);
$('.btnDelete', elem).on('click', onDeleteButtonClick);
$('.btnSync', elem).on('click', onSyncButtonClick);
$('.btnAddToCollection', elem).on('click', onAddToCollectionButtonClick);
});
}
@ -506,8 +483,6 @@
var itemId = card.getAttribute('data-itemid');
var context = card.getAttribute('data-context');
$(card).addClass('hasContextMenu');
var userId = Dashboard.getCurrentUserId();
var options = {
@ -816,10 +791,6 @@
elem = $('a', elem)[0];
if ($(elem).hasClass('hasContextMenu')) {
return;
}
if ($('.itemSelectionPanel:visible', elem).length) {
return;
}

View file

@ -675,7 +675,7 @@
onPageShowDocumentReady(page);
}).on('pagehide', ".page", function () {
}).on('pagebeforehide', ".page", function () {
if (addNextToBackStack) {
var text = $('.libraryMenuButtonText').text() || document.title;
@ -685,8 +685,6 @@
addNextToBackStack = true;
}).on('pagebeforehide', ".page", function () {
$('.headroomEnabled').addClass('headroomDisabled');
});

View file

@ -129,7 +129,7 @@
});
}).on('pagehide', "#libraryPathMappingPage", function () {
}).on('pagebeforehide', "#libraryPathMappingPage", function () {
currentConfig = null;

View file

@ -166,12 +166,12 @@
var page = this;
$('#btnPlay', page).on('click', function () {
$('.btnPlay', page).on('click', function () {
var userdata = currentItem.UserData || {};
LibraryBrowser.showPlayMenu(null, currentItem.Id, currentItem.Type, false, currentItem.MediaType, userdata.PlaybackPositionTicks);
});
$('#btnEdit', page).on('click', function () {
$('.btnEdit', page).on('click', function () {
Dashboard.navigate("edititemmetadata.html?channelid=" + currentItem.Id);
});
@ -182,7 +182,7 @@
reload(page);
}).on('pagehide', "#liveTvChannelPage", function () {
}).on('pagebeforehide', "#liveTvChannelPage", function () {
currentItem = null;
programs = null;

View file

@ -175,7 +175,7 @@
reload(page);
}).on('pagehide', "#liveTvNewRecordingPage", function () {
}).on('pagebeforehide', "#liveTvNewRecordingPage", function () {
currentProgram = null;

View file

@ -98,7 +98,7 @@
var page = this;
$('#btnRecord', page).on('click', function() {
$('.btnRecord', page).on('click', function() {
var id = getParameterByName('id');
@ -106,7 +106,7 @@
});
$('#btnPlay', page).on('click', function () {
$('.btnPlay', page).on('click', function () {
ApiClient.getLiveTvChannel(currentItem.ChannelId, Dashboard.getCurrentUserId()).done(function (channel) {
@ -116,7 +116,7 @@
});
});
$('#btnCancelRecording', page).on('click', function () {
$('.btnCancelRecording', page).on('click', function () {
deleteTimer(page, currentItem.TimerId);
});
@ -127,7 +127,7 @@
reload(page);
}).on('pagehide', "#liveTvProgramPage", function () {
}).on('pagebeforehide', "#liveTvProgramPage", function () {
currentItem = null;
});

View file

@ -106,8 +106,8 @@
var page = this;
$('#btnDelete', page).on('click', deleteRecording);
$('#btnPlay', page).on('click', play);
$('.btnDelete', page).on('click', deleteRecording);
$('.btnPlay', page).on('click', play);
$('.btnSync', page).on('click', function () {
@ -122,7 +122,7 @@
reload(page);
}).on('pagehide', "#liveTvRecordingPage", function () {
}).on('pagebeforehide', "#liveTvRecordingPage", function () {
currentItem = null;
});

View file

@ -285,7 +285,7 @@
reload(page);
}).on('pagehide', "#liveTvSeriesTimerPage", function () {
}).on('pagebeforehide', "#liveTvSeriesTimerPage", function () {
currentItem = null;
});

View file

@ -190,7 +190,7 @@
taskKey: 'RefreshGuide'
});
}).on('pagehide', "#liveTvStatusPage", function () {
}).on('pagebeforehide', "#liveTvStatusPage", function () {
var page = this;

View file

@ -121,7 +121,7 @@
reload(page);
}).on('pagehide', "#liveTvTimerPage", function () {
}).on('pagebeforehide', "#liveTvTimerPage", function () {
currentItem = null;
});

View file

@ -383,7 +383,7 @@ var WizardLibraryPage = {
taskKey: 'RefreshLibrary'
});
}).on('pagehide', "#mediaLibraryPage", function () {
}).on('pagebeforehide', "#mediaLibraryPage", function () {
var page = this;

View file

@ -236,8 +236,7 @@
ApiClient.updateUserConfiguration(user.Id, user.Configuration).done(function () {
Dashboard.alert(Globalize.translate('SettingsSaved'));
loadForm(page, user, false);
loadForm(page, user);
});
}

View file

@ -29,8 +29,8 @@
html += '<div class="nowPlayingText"></div>';
// The onclicks are needed due to the return false above
html += '<a class="mediaButton remoteControlButton imageButton" href="nowplaying.html" onclick="Dashboard.navigate(this.href);return false;" data-transition="slideup" title="' + Globalize.translate('ButtonRemoteControl') + '"><i class="fa fa-tablet"></i></a>';
html += '<a class="mediaButton playlistButton imageButton" href="nowplaying.html?tab=Playlist" onclick="Dashboard.navigate(this.href);return false;" data-transition="slideup" title="' + Globalize.translate('ButtonPlaylist') + '"><i class="fa fa-list"></i></a>';
html += '<a class="mediaButton remoteControlButton imageButton" href="nowplaying.html" onclick="Dashboard.navigate(this.href, false, \'slideup\');return false;" data-transition="slideup" title="' + Globalize.translate('ButtonRemoteControl') + '"><i class="fa fa-tablet"></i></a>';
html += '<a class="mediaButton playlistButton imageButton" href="nowplaying.html?tab=Playlist" onclick="Dashboard.navigate(this.href, false, \'slideup\');return false;" data-transition="slideup" title="' + Globalize.translate('ButtonPlaylist') + '"><i class="fa fa-list"></i></a>';
html += '<button class="mediaButton previousTrackButton imageButton" title="' + Globalize.translate('ButtonPreviousTrack') + '" type="button" data-role="none"><i class="fa fa-step-backward"></i></button>';

View file

@ -749,7 +749,7 @@
showIntro();
loadPlaylist(page);
}).on('pagehide', "#nowPlayingPage", function () {
}).on('pagebeforehide', "#nowPlayingPage", function () {
releaseCurrentPlayer();

View file

@ -215,7 +215,7 @@
$(ApiClient).on("websocketmessage", onWebSocketMessage).on("websocketopen", onWebSocketConnectionOpen);
}).on('pagehide', "#scheduledTasksPage", function () {
}).on('pagebeforehide', "#scheduledTasksPage", function () {
var page = this;

View file

@ -239,7 +239,7 @@
});
}
$(document).on('pagehide', ".libraryPage", function () {
$(document).on('pagebeforehide', ".libraryPage", function () {
$('#txtSearch', this).val('');
$('#searchHints', this).empty();

View file

@ -1661,7 +1661,7 @@ var AppInfo = {};
if (isCordova) {
AppInfo.enableBottomTabs = true;
AppInfo.cardMargin = 'mediumCardMargin';
AppInfo.enableSectionTransitions = true;
//AppInfo.enableSectionTransitions = true;
} else {
if (isMobile) {

View file

@ -314,7 +314,7 @@
startListening(page);
$(ApiClient).on("websocketmessage.syncactivity", onWebSocketMessage);
}).on('pagehide', ".syncActivityPage", function () {
}).on('pagebeforehide', ".syncActivityPage", function () {
var page = this;

View file

@ -395,7 +395,7 @@
startListening(page);
$(ApiClient).on("websocketmessage.syncJobPage", onWebSocketMessage);
}).on('pagehide', ".syncJobPage", function () {
}).on('pagebeforehide', ".syncJobPage", function () {
var page = this;

View file

@ -38,6 +38,7 @@ See [iron-iconset](#iron-iconset) and [iron-iconset-svg](#iron-iconset-svg) for
<defs>
<g id="add"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" /></g>
<g id="airplay"><defs><path id="a" d="M0 0h24v24H0V0z" /></defs><defs><path id="c" d="M0 0h24v24H0V0z" /></defs><clipPath id="b"><use xlink:href="#a" overflow="visible" /></clipPath><clipPath id="d" clip-path="url(#b)"><use xlink:href="#c" overflow="visible" /></clipPath><path d="M6 22h12l-6-6zM21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h4v-2H3V5h18v12h-4v2h4c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" clip-path="url(#d)" /></g>
<g id="album"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 14.5c-2.49 0-4.5-2.01-4.5-4.5S9.51 7.5 12 7.5s4.5 2.01 4.5 4.5-2.01 4.5-4.5 4.5zm0-5.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1z" /></g>
<g id="check"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" /></g>
<g id="close"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" /></g>
<g id="add"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" /></g>
@ -49,17 +50,20 @@ See [iron-iconset](#iron-iconset) and [iron-iconset-svg](#iron-iconset-svg) for
<g id="lock"><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z" /></g>
<g id="settings"><path d="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z" /></g>
<g id="refresh"><path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z" /></g>
<g id="person"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" /></g>
<g id="play-arrow"><path d="M8 5v14l11-7z" /></g>
<g id="folder-open"><path d="M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z" /></g>
<g id="mode-edit"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z" /></g>
<g id="more-vert"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" /></g>
<g id="playlist-add"><path d="M14 10H2v2h12v-2zm0-4H2v2h12V6zm4 8v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zM2 16h8v-2H2v2z" /></g>
<g id="remove"><path d="M19 13H5v-2h14v2z" /></g>
<g id="cast"><path d="M21 3H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0-4v2c4.97 0 9 4.03 9 9h2c0-6.08-4.93-11-11-11z" /></g>
<g id="cast-connected"><path d="M1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm18-7H5v1.63c3.96 1.28 7.09 4.41 8.37 8.37H19V7zM1 10v2c4.97 0 9 4.03 9 9h2c0-6.08-4.93-11-11-11zm20-7H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" /></g>
<g id="today"><path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z" /></g>
<g id="shuffle"><path d="M10.59 9.17L5.41 4 4 5.41l5.17 5.17 1.42-1.41zM14.5 4l2.04 2.04L4 18.59 5.41 20 17.96 7.46 20 9.5V4h-5.5zm.33 9.41l-1.41 1.41 3.13 3.13L14.5 20H20v-5.5l-2.04 2.04-3.13-3.13z" /></g>
<g id="tablet-android"><path d="M18 0H6C4.34 0 3 1.34 3 3v18c0 1.66 1.34 3 3 3h12c1.66 0 3-1.34 3-3V3c0-1.66-1.34-3-3-3zm-4 22h-4v-1h4v1zm5.25-3H4.75V3h14.5v16z" /></g>
<g id="view-comfy"><path d="M3 9h4V5H3v4zm0 5h4v-4H3v4zm5 0h4v-4H8v4zm5 0h4v-4h-4v4zM8 9h4V5H8v4zm5-4v4h4V5h-4zm5 9h4v-4h-4v4zM3 19h4v-4H3v4zm5 0h4v-4H8v4zm5 0h4v-4h-4v4zm5 0h4v-4h-4v4zm0-14v4h4V5h-4z" /></g>
<g id="videocam"><path d="M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4z" /></g>
</defs>
</svg>
</iron-iconset-svg>

View file

@ -20,7 +20,7 @@
// Need to fix those before this can be set to 0
if (window.AppInfo && AppInfo.isNativeApp && $.browser.safari) {
return 8000;
return 7500;
}
var screens = $.browser.mobile ? 2.5 : 1;
@ -102,7 +102,7 @@
function setImageIntoElement(elem, url) {
if (elem.tagName === "DIV") {
if (elem.tagName !== "IMG") {
elem.style.backgroundImage = "url('" + url + "')";

View file

@ -4903,6 +4903,112 @@ $.fn.grid = function( options ) {
$.mobile.pageContainer.toggleClass( "ui-mobile-viewport-transitioning viewport-" + this.name );
},
slide: function (Velocity) {
var trans = this;
if (trans.reverse) {
$(trans.$from).show().css('left', '0').css('right', '0');
Velocity.animate($(trans.$from)[0], { "left": "100%", "right": "-100%" },
{
easing: "ease-in-out",
duration: 800,
begin: function (elements, complete, remaining, start, tweenValue) {
$(trans.$to).show().css('left', '-100%').css('right', '100%');
Velocity.animate($(trans.$to)[0], { "left": "0", "right": "0" },
{
complete: function () {
$(trans.$from).hide();
trans.toggleViewportClass();
trans.deferred.resolve(trans.name, trans.reverse, trans.$to, trans.$from, true);
},
easing: "ease-in-out",
duration: 800
});
}
});
} else {
Velocity.animate($(trans.$from)[0], {
"left": "-100%",
"right": "100%"
},
{
easing: "ease-in-out",
duration: 800,
begin: function (elements, complete, remaining, start, tweenValue) {
$(trans.$to).show().css('left', '100%');
Velocity.animate($(trans.$to)[0], { "left": "0px" },
{
complete: function () {
$(trans.$from).hide();
trans.toggleViewportClass();
trans.deferred.resolve(trans.name, trans.reverse, trans.$to, trans.$from, true);
},
easing: "ease-in-out",
duration: 800
});
}
});
}
},
slideUp: function (Velocity) {
var trans = this;
if (trans.reverse) {
$(trans.$to).show();
Velocity.animate($(trans.$from)[0], { "top": "100%", bottom: '-100%' },
{
complete: function () {
$(trans.$from).hide();
trans.toggleViewportClass();
trans.deferred.resolve(trans.name, trans.reverse, trans.$to, trans.$from, true);
},
easing: "ease-in-out",
duration: 800
});
} else {
$(trans.$to).show().css('top', '100%').css('bottom', '-100%');
Velocity.animate($(trans.$to)[0], { "top": "0px", bottom: 0 },
{
complete: function () {
$(trans.$from).hide();
trans.toggleViewportClass();
trans.deferred.resolve(trans.name, trans.reverse, trans.$to, trans.$from, true);
},
easing: "ease-in-out",
duration: 800
});
}
},
transition: function() {
// NOTE many of these could be calculated/recorded in the constructor, it's my
// opinion that binding them as late as possible has value with regards to
@ -4924,11 +5030,25 @@ $.fn.grid = function( options ) {
this.toggleViewportClass();
if ( this.$from && !none ) {
this.startOut( screenHeight, reverseClass, none );
} else {
this.doneOut( screenHeight, reverseClass, none, true );
}
if (none) {
if (this.$from && !none) {
this.startOut(screenHeight, reverseClass, none);
} else {
this.doneOut(screenHeight, reverseClass, none, true);
}
} else {
var trans = this;
require(["jquery", "velocity"], function (d, Velocity) {
if (trans.name == 'slideup') {
trans.slideUp(Velocity);
} else {
trans.slide(Velocity);
}
});
}
return this.deferred.promise();
}

File diff suppressed because one or more lines are too long

View file

@ -8,4 +8,5 @@
<link rel="import" href="bower_components/neon-animation/animations/fade-out-animation.html">
<link rel="import" href="bower_components/neon-animation/animations/fade-in-animation.html">
<link rel="import" href="bower_components/paper-icon-button/paper-icon-button.html">
<link rel="import" href="bower_components/paper-drawer-panel/paper-drawer-panel.html">
<link rel="import" href="thirdparty/emby-icons.html">

File diff suppressed because it is too large Load diff