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

update jqm

This commit is contained in:
Luke Pulverenti 2015-09-05 12:58:27 -04:00
parent 6b21f2fbd0
commit 8996ae4eab
39 changed files with 1162 additions and 686 deletions

View file

@ -0,0 +1 @@
bower_components

View file

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

View file

@ -0,0 +1,74 @@
<!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-collapse 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="../iron-collapse.html">
<link rel="stylesheet" href="../../paper-styles/demo.css">
<style>
.heading {
padding: 10px 15px;
margin-top: 20px;
background-color: #f3f3f3;
border: 1px solid #dedede;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
font-size: 18px;
cursor: pointer;
-webkit-tap-highlight-color: rgba(0,0,0,0);
width: 100%;
text-align: left;
}
.content {
padding: 15px;
border: 1px solid #dedede;
border-top: none;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
}
</style>
</head>
<body unresolved>
<button class="heading" onclick="document.querySelector('#collapse1').toggle();">Collapse #1</button>
<iron-collapse id="collapse1">
<div class="content">
<div>Lorem ipsum dolor sit amet, per in nusquam nominavi periculis, sit elit oportere ea, id minim maiestatis incorrupte duo. Dolorum verterem ad ius, his et nullam verterem. Eu alia debet usu, an doming tritani est. Vix ad ponderum petentium suavitate, eum eu tempor populo, graece sententiae constituam vim ex. Cu torquatos reprimique neglegentur nec, voluptua periculis has ut, at eos discere deleniti sensibus. Lorem ipsum dolor sit amet, per in nusquam nominavi periculis, sit elit oportere ea, id minim maiestatis incorrupte duo. Dolorum verterem ad ius, his et nullam verterem. Eu alia debet usu, an doming tritani est. Vix ad ponderum petentium suavitate, eum eu tempor populo, graece sententiae constituam vim ex. Cu torquatos reprimique neglegentur nec, voluptua periculis has ut, at eos discere deleniti sensibus.</div>
</div>
</iron-collapse>
<button class="heading" onclick="document.querySelector('#collapse2').toggle();">Collapse #2</button>
<iron-collapse id="collapse2">
<div class="content">
<div>Pro saepe pertinax ei, ad pri animal labores suscipiantur. Modus commodo minimum eum te, vero utinam assueverit per eu, zril oportere suscipiantur pri te. Partem percipitur deterruisset ad sea, at eam suas luptatum dissentiunt. No error alienum pro, erant senserit ex mei, pri semper alterum no. Ut habemus menandri vulputate mea. Feugiat verterem ut sed. Dolores maiestatis id per. Pro saepe pertinax ei, ad pri animal labores suscipiantur. Modus commodo minimum eum te, vero utinam assueverit per eu, zril oportere suscipiantur pri te. Partem percipitur deterruisset ad sea, at eam suas luptatum dissentiunt. No error alienum pro, erant senserit ex mei, pri semper alterum no. Ut habemus menandri vulputate mea. Feugiat verterem ut sed. Dolores maiestatis id per.</div>
<button class="heading" onclick="document.querySelector('#collapse3').toggle();">Collapse #3</button>
<iron-collapse id="collapse3">
<div class="content">
<div>Iisque perfecto dissentiet cum et, sit ut quot mandamus, ut vim tibique splendide instructior. Id nam odio natum malorum, tibique copiosae expetenda mel ea. Mea melius malorum ut. Ut nec tollit vocent timeam. Facer nonumy numquam id his, munere salutatus consequuntur eum et, eum cotidieque definitionem signiferumque id. Ei oblique graecis patrioque vis, et probatus dignissim inciderint vel. Sed id paulo erroribus, autem semper accusamus in mel. Iisque perfecto dissentiet cum et, sit ut quot mandamus, ut vim tibique splendide instructior. Id nam odio natum malorum, tibique copiosae expetenda mel ea. Mea melius malorum ut. Ut nec tollit vocent timeam. Facer nonumy numquam id his, munere salutatus consequuntur eum et, eum cotidieque definitionem signiferumque id. Ei oblique graecis patrioque vis, et probatus dignissim inciderint vel. Sed id paulo erroribus, autem semper accusamus in mel.</div>
</div>
</iron-collapse>
</div>
</iron-collapse>
</body>
</html>

View file

@ -0,0 +1,23 @@
<?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"/>
<path display="inline" fill="none" d="M167.5,51.7c3.7-0.8,6.9,2.4,6.1,6.1c-0.4,1.9-1.9,3.4-3.8,3.8c-3.7,0.8-6.9-2.4-6.1-6.1
C164.2,53.6,165.7,52.1,167.5,51.7z"/>
</g>
<g id="label">
</g>
<g id="art">
<path d="M151,102H73V52h78V102z M75,100h74V54H75V100z"/>
<path d="M151,38H73V24h78V38z M75,36h74V26H75V36z"/>
<circle cx="171" cy="51" r="4"/>
<path d="M151,72v-2c10.5,0,19-8.5,19-19s-8.5-19-19-19v-2c11.6,0,21,9.4,21,21S162.6,72,151,72z"/>
<g id="ic_x5F_add_x0D_">
</g>
</g>
<g id="Guides">
</g>
</svg>

After

Width:  |  Height:  |  Size: 1 KiB

View file

@ -0,0 +1,31 @@
<!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>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>iron-collapse</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,200 @@
<!--
@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
-->
<link rel="import" href="../polymer/polymer.html">
<!--
`iron-collapse` creates a collapsible block of content. By default, the content
will be collapsed. Use `opened` or `toggle()` to show/hide the content.
<button on-click="toggle">toggle collapse</button>
<iron-collapse id="collapse">
<div>Content goes here...</div>
</iron-collapse>
...
toggle: function() {
this.$.collapse.toggle();
}
`iron-collapse` adjusts the height/width of the collapsible element to show/hide
the content. So avoid putting padding/margin/border on the collapsible directly,
and instead put a div inside and style that.
<style>
.collapse-content {
padding: 15px;
border: 1px solid #dedede;
}
</style>
<iron-collapse>
<div class="collapse-content">
<div>Content goes here...</div>
</div>
</iron-collapse>
@group Iron Elements
@hero hero.svg
@demo demo/index.html
@element iron-collapse
-->
<dom-module id="iron-collapse">
<style>
:host {
display: block;
transition-duration: 300ms;
}
:host(.iron-collapse-closed) {
display: none;
}
:host(:not(.iron-collapse-opened)) {
overflow: hidden;
}
</style>
<template>
<content></content>
</template>
</dom-module>
<script>
Polymer({
is: 'iron-collapse',
properties: {
/**
* If true, the orientation is horizontal; otherwise is vertical.
*
* @attribute horizontal
*/
horizontal: {
type: Boolean,
value: false,
observer: '_horizontalChanged'
},
/**
* Set opened to true to show the collapse element and to false to hide it.
*
* @attribute opened
*/
opened: {
type: Boolean,
value: false,
notify: true,
observer: '_openedChanged'
}
},
hostAttributes: {
role: 'group',
'aria-expanded': 'false'
},
listeners: {
transitionend: '_transitionEnd'
},
ready: function() {
// Avoid transition at the beginning e.g. page loads and enable
// transitions only after the element is rendered and ready.
this._enableTransition = true;
},
/**
* Toggle the opened state.
*
* @method toggle
*/
toggle: function() {
this.opened = !this.opened;
},
show: function() {
this.opened = true;
},
hide: function() {
this.opened = false;
},
updateSize: function(size, animated) {
this.enableTransition(animated);
var s = this.style;
var nochange = s[this.dimension] === size;
s[this.dimension] = size;
if (animated && nochange) {
this._transitionEnd();
}
},
enableTransition: function(enabled) {
this.style.transitionDuration = (enabled && this._enableTransition) ? '' : '0s';
},
_horizontalChanged: function() {
this.dimension = this.horizontal ? 'width' : 'height';
this.style.transitionProperty = this.dimension;
},
_openedChanged: function() {
if (this.opened) {
this.toggleClass('iron-collapse-closed', false);
this.updateSize('auto', false);
var s = this._calcSize();
this.updateSize('0px', false);
// force layout to ensure transition will go
/** @suppress {suspiciousCode} */ this.offsetHeight;
this.updateSize(s, true);
}
else {
this.toggleClass('iron-collapse-opened', false);
this.updateSize(this._calcSize(), false);
// force layout to ensure transition will go
/** @suppress {suspiciousCode} */ this.offsetHeight;
this.updateSize('0px', true);
}
this.setAttribute('aria-expanded', this.opened ? 'true' : 'false');
},
_transitionEnd: function() {
if (this.opened) {
this.updateSize('auto', false);
}
this.toggleClass('iron-collapse-closed', !this.opened);
this.toggleClass('iron-collapse-opened', this.opened);
this.enableTransition(false);
},
_calcSize: function() {
return this.getBoundingClientRect()[this.dimension] + 'px';
},
});
</script>

View file

@ -0,0 +1,93 @@
<!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-collapse-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="../../test-fixture/test-fixture.html">
<link rel="import" href="../iron-collapse.html">
</head>
<body>
<test-fixture id="test">
<template>
<iron-collapse id="collapse" opened>
<div>
Forma temperiemque cornua sidera dissociata cornua recessit innabilis ligavit: solidumque coeptis nullus caelum sponte phoebe di regat mentisque tanta austro capacius amphitrite sui quin postquam semina fossae liquidum umor galeae coeptis caligine liberioris quin liquidum matutinis invasit posset: flexi glomeravit radiis certis invasit oppida postquam onerosior inclusum dominari opifex terris pace finxit quam aquae nunc sine altae auroram quam habentem homo totidemque scythiam in pondus ensis tegit caecoque poena lapidosos humanas coeperunt poena aetas totidem nec natura aethera locavit caelumque distinxit animalibus phoebe cingebant moderantum porrexerat terrae possedit sua sole diu summaque obliquis melioris orbem
</div>
</iron-collapse>
</template>
</test-fixture>
<script>
suite('basic', function() {
var collapse;
var delay = 500;
var collapseHeight;
setup(function () {
collapse = fixture('test');
});
test('opened attribute', function() {
assert.equal(collapse.opened, true);
});
test('horizontal attribute', function() {
assert.equal(collapse.horizontal, false);
});
test('default opened height', function(done) {
setTimeout(function() {
// store height
collapseHeight = getComputedStyle(collapse).height;
// verify height not 0px
assert.notEqual(collapseHeight, '0px');
done();
}, delay);
});
test('set opened to false', function(done) {
collapse.opened = false;
setTimeout(function() {
var h = getComputedStyle(collapse).height;
// verify height is 0px
assert.equal(h, '0px');
done();
}, delay);
});
test('set opened to true', function(done) {
collapse.opened = true;
setTimeout(function() {
var h = getComputedStyle(collapse).height;
// verify height
assert.equal(h, collapseHeight);
done();
}, delay);
});
});
</script>
</body>
</html>

View file

@ -0,0 +1,91 @@
<!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-collapse-horizontal</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="../../test-fixture/test-fixture.html">
<link rel="import" href="../iron-collapse.html">
</head>
<body>
<test-fixture id="test">
<template>
<iron-collapse id="collapse" opened horizontal>
<div>
Forma temperiemque cornua sidera dissociata cornua recessit innabilis ligavit: solidumque coeptis nullus caelum sponte phoebe di regat mentisque tanta austro capacius amphitrite sui quin postquam semina fossae liquidum umor galeae coeptis caligine liberioris quin liquidum matutinis invasit posset: flexi glomeravit radiis certis invasit oppida postquam onerosior inclusum dominari opifex terris pace finxit quam aquae nunc sine altae auroram quam habentem homo totidemque scythiam in pondus ensis tegit caecoque poena lapidosos humanas coeperunt poena aetas totidem nec natura aethera locavit caelumque distinxit animalibus phoebe cingebant moderantum porrexerat terrae possedit sua sole diu summaque obliquis melioris orbem
</div>
</iron-collapse>
</template>
</test-fixture>
<script>
suite('horizontal', function() {
var collapse;
var delay = 500;
var collapseHeight;
setup(function () {
collapse = fixture('test');
});
test('opened attribute', function() {
assert.equal(collapse.opened, true);
});
test('horizontal attribute', function() {
assert.equal(collapse.horizontal, true);
});
test('default opened width', function(done) {
setTimeout(function() {
// store actual width
width = getComputedStyle(collapse).width;
// verify width not 0px
assert.notEqual(width, '0px');
done();
}, delay);
});
test('set opened to false', function(done) {
collapse.opened = false;
setTimeout(function() {
var h = getComputedStyle(collapse).width;
// verify width is 0px
assert.equal(h, '0px');
done();
}, delay);
});
test('set opened to true', function(done) {
collapse.opened = true;
setTimeout(function() {
var h = getComputedStyle(collapse).width;
// verify width
assert.equal(h, width);
done();
}, delay);
});
});
</script>
</body>
</html>

View file

@ -0,0 +1,31 @@
<!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',
'horizontal.html'
]);
</script>
</body>
</html>