update bravia profiles

This commit is contained in:
Luke Pulverenti 2015-06-19 14:34:21 -04:00
parent d80ee0d337
commit 4d603ad38c
15 changed files with 689 additions and 43 deletions

View File

@ -0,0 +1,44 @@
{
"name": "paper-icon-button",
"private": true,
"version": "1.0.2",
"license": "http://polymer.github.io/LICENSE.txt",
"description": "A material design icon button",
"main": "paper-icon-button.html",
"author": [
"The Polymer Authors"
],
"keywords": [
"web-components",
"polymer",
"button",
"icon",
"control"
],
"dependencies": {
"iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0",
"iron-icon": "polymerelements/iron-icon#^1.0.0",
"iron-icons": "polymerelements/iron-icons#^1.0.0",
"paper-behaviors": "polymerelements/paper-behaviors#^1.0.0",
"paper-ripple": "polymerelements/paper-ripple#^1.0.0",
"paper-styles": "polymerelements/paper-styles#^1.0.0",
"polymer": "Polymer/polymer#^1.0.0"
},
"devDependencies": {
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
"test-fixture": "polymerelements/test-fixture#^1.0.0",
"web-component-tester": "*",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"homepage": "https://github.com/PolymerElements/paper-icon-button",
"_release": "1.0.2",
"_resolution": {
"type": "version",
"tag": "v1.0.2",
"commit": "b22ade2080f2527760eae41e4700c52d4689a866"
},
"_source": "git://github.com/PolymerElements/paper-icon-button.git",
"_target": "~1.0.2",
"_originalSource": "PolymerElements/paper-icon-button",
"_direct": true
}

View File

@ -0,0 +1 @@
bower_components

View File

@ -0,0 +1,33 @@
{
"name": "paper-icon-button",
"private": true,
"version": "1.0.2",
"license": "http://polymer.github.io/LICENSE.txt",
"description": "A material design icon button",
"main": "paper-icon-button.html",
"author": [
"The Polymer Authors"
],
"keywords": [
"web-components",
"polymer",
"button",
"icon",
"control"
],
"dependencies": {
"iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0",
"iron-icon": "polymerelements/iron-icon#^1.0.0",
"iron-icons": "polymerelements/iron-icons#^1.0.0",
"paper-behaviors": "polymerelements/paper-behaviors#^1.0.0",
"paper-ripple": "polymerelements/paper-ripple#^1.0.0",
"paper-styles": "polymerelements/paper-styles#^1.0.0",
"polymer": "Polymer/polymer#^1.0.0"
},
"devDependencies": {
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
"test-fixture": "polymerelements/test-fixture#^1.0.0",
"web-component-tester": "*",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}
}

View File

@ -0,0 +1,154 @@
<!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
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>
<title>paper-icon-button</title>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../../iron-icons/iron-icons.html">
<link rel="import" href="../../paper-styles/paper-styles.html">
<link rel="import" href="../../paper-styles/demo-pages.html">
<link rel="import" href="../paper-icon-button.html">
<style is="custom-style">
.horizontal-section {
min-width: 100px;
}
paper-icon-button {
margin-left: 30px;
display: block;
width: 24px;
text-align: center;
}
paper-icon-button.blue {
color: var(--paper-light-blue-500);
}
paper-icon-button.red {
color: var(--paper-red-500);
}
paper-icon-button.orange {
color: var(--paper-orange-500);
}
paper-icon-button.green {
color: var(--paper-green-500);
}
paper-icon-button.blue:hover {
background: var(--paper-light-blue-50);
border-radius: 50%;
}
paper-icon-button.red:hover {
background: var(--paper-red-50);
border-radius: 50%;
}
paper-icon-button.orange:hover {
background: var(--paper-orange-50);
border-radius: 50%;
}
paper-icon-button.green:hover {
background: var(--paper-green-50);
border-radius: 50%;
}
paper-icon-button.huge {
margin-left: 0px;
width: 100px;
--paper-icon-button-ink-color: var(--paper-indigo-500);
}
paper-icon-button.huge::shadow #icon {
width: 100px;
height: 100px;
}
paper-icon-button.huge #icon {
width: 100px;
height: 100px;
}
</style>
</head>
<body onclick="clickAction(event);">
<div class="horizontal center-justified layout">
<div>
<h4>Enabled</h4>
<div class="horizontal-section">
<paper-icon-button icon="menu" alt="menu" title="menu"></paper-icon-button>
<paper-icon-button icon="favorite" alt="heart" title="heart"></paper-icon-button>
<paper-icon-button icon="arrow-back" alt="arrow-back" title="arrow-back"></paper-icon-button>
<paper-icon-button icon="arrow-forward" alt="arrow-forward" title="arrow-forward"></paper-icon-button>
<paper-icon-button icon="clear" alt="clear" title="clear"></paper-icon-button>
<paper-icon-button icon="polymer" alt="polymer" title="polymer"></paper-icon-button>
<paper-icon-button src="https://assets-cdn.github.com/images/modules/logos_page/Octocat.png" alt="octocat" title="octocat"></paper-icon-button>
</div>
</div>
<div>
<h4>Disabled</h4>
<div class="horizontal-section">
<paper-icon-button icon="menu" alt="menu" disabled></paper-icon-button>
<paper-icon-button icon="favorite" alt="heart" disabled></paper-icon-button>
<paper-icon-button icon="arrow-back" alt="arrow-back" disabled></paper-icon-button>
<paper-icon-button icon="arrow-forward" alt="arrow-forward" disabled></paper-icon-button>
<paper-icon-button icon="clear" alt="clear" disabled></paper-icon-button>
<paper-icon-button icon="polymer" alt="polymer" disabled></paper-icon-button>
<paper-icon-button src="https://assets-cdn.github.com/images/modules/logos_page/Octocat.png" alt="octocat" disabled></paper-icon-button>
</div>
</div>
<div>
<h4>Color</h4>
<div class="horizontal-section">
<paper-icon-button icon="menu" alt="menu" class="blue"></paper-icon-button>
<paper-icon-button icon="favorite" alt="heart" class="red"></paper-icon-button>
<paper-icon-button icon="arrow-back" alt="arrow-back" class="orange"></paper-icon-button>
<paper-icon-button icon="arrow-forward" alt="arrow-forward" class="green"></paper-icon-button>
<paper-icon-button icon="clear" alt="clear" class="blue"></paper-icon-button>
<paper-icon-button icon="polymer" alt="polymer" class="red"></paper-icon-button>
<paper-icon-button class="blue" src="https://assets-cdn.github.com/images/modules/logos_page/Octocat.png" alt="octocat"></paper-icon-button>
</div>
</div>
<div>
<h4>Size</h4>
<div class="horizontal-section">
<paper-icon-button icon="favorite" alt="heart" class="huge"></paper-icon-button>
<br><br><br>
<paper-icon-button icon="polymer" alt="polymer" class="huge"></paper-icon-button>
</div>
</div>
</div>
<script>
function clickAction(e) {
var t = e.target;
if (t.localName === 'paper-icon-button') {
if (t.hasAttribute('disabled')) {
console.error('should not be able to click disabled button', t);
} else {
console.log('click', t);
}
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,23 @@
<!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
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>
<script src="../webcomponentsjs/webcomponents.js"></script>
<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,156 @@
<!--
@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
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
-->
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../iron-icon/iron-icon.html">
<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
<link rel="import" href="../paper-styles/default-theme.html">
<link rel="import" href="../paper-behaviors/paper-button-behavior.html">
<link rel="import" href="../paper-behaviors/paper-inky-focus-behavior.html">
<link rel="import" href="../paper-ripple/paper-ripple.html">
<!--
Material Design: <a href="http://www.google.com/design/spec/components/buttons.html">Buttons</a>
`paper-icon-button` is a button with an image placed at the center. When the user touches
the button, a ripple effect emanates from the center of the button.
`paper-icon-button` includes a default icon set. Use `icon` to specify which icon
from the icon set to use.
<paper-icon-button icon="menu"></paper-icon-button>
See [`iron-iconset`](#iron-iconset) for more information about
how to use a custom icon set.
Example:
<link href="path/to/iron-icons/iron-icons.html" rel="import">
<paper-icon-button icon="favorite"></paper-icon-button>
<paper-icon-button src="star.png"></paper-icon-button>
###Styling
Style the button with CSS as you would a normal DOM element. If you are using the icons
provided by `iron-icons`, they will inherit the foreground color of the button.
/* make a red "favorite" button */
<paper-icon-button icon="favorite" style="color: red;"></paper-icon-button>
By default, the ripple is the same color as the foreground at 25% opacity. You may
customize the color using this selector:
/* make #my-button use a blue ripple instead of foreground color */
#my-button::shadow #ripple {
color: blue;
}
The opacity of the ripple is not customizable via CSS.
The following custom properties and mixins are available for styling:
Custom property | Description | Default
----------------|-------------|----------
`--paper-icon-button-disabled-text` | The color of the disabled button | `--primary-text-color`
`--paper-icon-button-ink-color` | Selected/focus ripple color | `--default-primary-color`
`--paper-icon-button` | Mixin for a button | `{}`
`--paper-icon-button-disabled` | Mixin for a disabled button | `{}`
@group Paper Elements
@element paper-icon-button
@demo demo/index.html
-->
<dom-module id="paper-icon-button">
<style>
:host {
display: inline-block;
position: relative;
padding: 8px;
outline: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor: pointer;
z-index: 0;
@apply(--paper-icon-button);
}
:host #ink {
color: var(--paper-icon-button-ink-color, --primary-text-color);
opacity: 0.6;
}
:host([disabled]) {
color: var(--paper-icon-button-disabled-text, --disabled-text-color);
pointer-events: none;
cursor: auto;
@apply(--paper-icon-button-disabled);
}
</style>
<template>
<paper-ripple id="ink" class="circle" center></paper-ripple>
<iron-icon id="icon" src="[[src]]" icon="[[icon]]" alt$="[[alt]]"></iron-icon>
</template>
</dom-module>
<script>
Polymer({
is: 'paper-icon-button',
hostAttributes: {
role: 'button',
tabindex: '0'
},
behaviors: [
Polymer.PaperInkyFocusBehavior
],
properties: {
/**
* The URL of an image for the icon. If the src property is specified,
* the icon property should not be.
*/
src: {
type: String
},
/**
* Specifies the icon name or index in the set of icons available in
* the icon's icon set. If the icon property is specified,
* the src property should not be.
*/
icon: {
type: String
},
/**
* Specifies the alternate text for the button, for accessibility.
*/
alt: {
type: String,
observer: "_altChanged"
}
},
_altChanged: function(newValue, oldValue) {
var label = this.getAttribute('aria-label');
// Don't stomp over a user-set aria-label.
if (!label || oldValue == label) {
this.setAttribute('aria-label', newValue);
}
}
});
</script>

View File

@ -0,0 +1,94 @@
<!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">
<title>paper-icon-button a11y tests</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-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-icons/iron-icons.html">
<link rel="import" href="../../test-fixture/test-fixture.html">
<link rel="import" href="../paper-icon-button.html">
</head>
<body>
<test-fixture id="A11yIconButtons">
<template>
<paper-icon-button id="iconButton1" icon="add"></paper-icon-button>
<paper-icon-button id="iconButton2" icon="add" disabled></paper-icon-button>
<paper-icon-button id="iconButton3" icon="add" aria-label="custom"></paper-icon-button>
<paper-icon-button id="iconButton4" icon="add" alt="alt text"></paper-icon-button>
<paper-icon-button id="iconButton5" icon="add" aria-label="custom" alt="alt text" ></paper-icon-button>
</template>
</test-fixture>
<script>
var b1;
var b2;
var b3;
var b4;
var b5;
setup(function() {
var iconButtons = fixture('A11yIconButtons');
b1 = iconButtons[0];
b2 = iconButtons[1];
b3 = iconButtons[2];
b4 = iconButtons[3];
b5 = iconButtons[4];
});
test('aria role is a button', function() {
assert.strictEqual(b1.getAttribute('role'), 'button');
});
test('aria-disabled is set', function() {
assert.strictEqual(b2.getAttribute('aria-disabled'), 'true');
b2.removeAttribute('disabled');
assert.strictEqual(b2.getAttribute('aria-disabled'), 'false');
});
test('user-defined aria-label is preserved', function() {
assert.strictEqual(b3.getAttribute('aria-label'), 'custom');
b3.icon = 'arrow-forward';
assert.strictEqual(b3.getAttribute('aria-label'), 'custom');
});
test('alt attribute is used for the aria-label', function() {
assert.strictEqual(b4.getAttribute('aria-label'), 'alt text');
b4.icon = 'arrow-forward';
assert.strictEqual(b4.getAttribute('aria-label'), 'alt text');
});
test('aria-label wins over alt attribute', function() {
assert.strictEqual(b5.getAttribute('aria-label'), 'custom');
b5.icon = 'arrow-forward';
b5.alt = 'other alt'
assert.strictEqual(b5.getAttribute('aria-label'), 'custom');
});
test('alt attribute can be updated', function() {
assert.strictEqual(b4.getAttribute('aria-label'), 'alt text');
b4.alt = 'alt again';
assert.strictEqual(b4.getAttribute('aria-label'), 'alt again');
});
</script>
</body>
</html>

View File

@ -0,0 +1,77 @@
<!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">
<title>paper-icon-button basic tests</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-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-icons/iron-icons.html">
<link rel="import" href="../paper-icon-button.html">
</head>
<body>
<test-fixture id="TrivialIconButton">
<template>
<div style="line-height:30px;">
<paper-icon-button id="fab1" icon="add"></paper-icon-button>
</div>
</template>
</test-fixture>
<test-fixture id="SrcIconButton">
<template>
<paper-icon-button src="add.png"></paper-icon-button>
</template>
</test-fixture>
<script>
var b1;
var b2;
function centerOf(element) {
var rect = element.getBoundingClientRect();
return {left: rect.left + rect.width / 2, top: rect.top + rect.height / 2};
}
function approxEqual(p1, p2) {
return Math.abs(p1.left - p2.left) <= 2 && Math.abs(p1.top-p2.top) <= 2;
}
setup(function() {
b1 = fixture('TrivialIconButton').querySelector('#fab1');
b2 = fixture('SrcIconButton');
});
test('applies an icon specified by the `icon` attribute', function() {
assert.strictEqual(!!b1.$.icon.src, false);
assert.ok(Polymer.dom(b1.$.icon.root).querySelector('svg'));
});
test('applies an icon specified by the `src` attribute', function() {
assert.strictEqual(!!b2.$.icon.src, true);
assert.ok(b2.$.icon.src);
});
test('renders correctly independent of line height', function() {
assert.ok(approxEqual(centerOf(b1.$.icon), centerOf(b1)));
});
</script>
</body>
</html>

View File

@ -0,0 +1,26 @@
<!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>paper-icon-button tests</title>
<script src="../../web-component-tester/browser.js"></script>
</head>
<body>
<script>
WCT.loadSuites([
'basic.html',
'a11y.html'
]);
</script>
</body>
</html>

View File

@ -423,7 +423,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
}
.lnkNextItem {
right: 0;
right: 10px;
}
.detailImageContainer {

View File

@ -151,8 +151,8 @@
</div>
</div>
<a href="#" id="lnkPreviousItem" class="lnkPreviousItem lnkSibling hide" data-role="button" title="${ButtonPrevious}" data-icon="carat-l" data-mini="true" data-inline="true" data-iconpos="notext">${ButtonPrevious}</a>
<a href="#" id="lnkNextItem" class="lnkNextItem lnkSibling hide" data-role="button" title="${ButtonNext}" data-icon="carat-r" data-mini="true" data-inline="true" data-iconpos="notext">${ButtonNext}</a>
<a href="#" id="lnkPreviousItem" class="lnkPreviousItem lnkSibling hide clearLink"><paper-button raised class="subdued notext"><iron-icon icon="arrow-back"></iron-icon></paper-button></a>
<a href="#" id="lnkNextItem" class="lnkNextItem lnkSibling hide clearLink"><paper-button raised class="subdued notext"><iron-icon icon="arrow-forward"></iron-icon></paper-button></a>
</div>
<div data-role="content">
<div class="detailPageContent">
@ -260,10 +260,11 @@
</div>
</div>
</div>
<div id="scenesCollapsible" style="display: none;" class="detailSection">
<div class="detailSectionHeader">
${HeaderScenes}
<a class="detailSectionHeaderButton chapterSettingsButton" href="metadataadvanced.html" data-role="button" data-icon="gear" data-iconpos="notext" data-inline="true" title="${ButtonSettings}" style="display:none;">${ButtonSettings}</a>
<a class="detailSectionHeaderButton chapterSettingsButton clearLink" style="margin-top:-3px;display:inline-block;" href="metadataadvanced.html" title="${ButtonSettings}" style="display:none;"><paper-icon-button icon="settings"></paper-icon-button></a>
</div>
<div id="scenesContent" class="detailSectionContent smallItemsContainer"></div>
</div>

View File

@ -13,7 +13,7 @@
var id = 'dlg' + new Date().getTime();
var html = '';
html += '<paper-dialog id="' + id + '" entry-animation="scale-up-animation" exit-animation="fade-out-animation">';
html += '<paper-dialog id="' + id + '" entry-animation="scale-up-animation" exit-animation="fade-out-animation" with-backdrop>';
if (options.title) {
html += '<h2>';
@ -26,7 +26,10 @@
var option = options.items[i];
html += '<paper-button class="block blue ripple btnOption" data-id="' + option.id + '" style="margin:0;">' + option.name + '</paper-button>';
html += '<paper-button class="block blue ripple btnOption" data-id="' + option.id + '" style="margin:0;">';
//html += '<iron-icon icon="close"></iron-icon>';
html += '<span>' + option.name + '</span>';
html += '</paper-button>';
}
html += '</paper-dialog-scrollable>';

View File

@ -373,66 +373,95 @@
showMoreCommands: function (positionTo, itemId, commands) {
$('.playFlyout').popup("close").remove();
var html = '<div data-role="popup" class="playFlyout" data-history="false" data-theme="a">';
html += '<ul data-role="listview" style="min-width: 160px;">';
var items = [];
if (commands.indexOf('addtocollection') != -1) {
html += '<li data-icon="false"><a href="#" onclick="$(\'.playFlyout\').popup(\'close\');BoxSetEditor.showPanel([\'' + itemId + '\']);">' + Globalize.translate('ButtonAddToCollection') + '</a></li>';
items.push({
name: Globalize.translate('ButtonAddToCollection'),
id: 'addtocollection'
});
}
if (commands.indexOf('playlist') != -1) {
html += '<li data-icon="false"><a href="#" onclick="$(\'.playFlyout\').popup(\'close\');PlaylistManager.showPanel([\'' + itemId + '\']);">' + Globalize.translate('ButtonAddToPlaylist') + '</a></li>';
items.push({
name: Globalize.translate('ButtonAddToPlaylist'),
id: 'playlist'
});
}
if (commands.indexOf('delete') != -1) {
html += '<li data-icon="false"><a class="btnMoreMenuDelete" href="#" onclick="$(\'.playFlyout\').popup(\'close\');LibraryBrowser.deleteItem([\'' + itemId + '\']);">' + Globalize.translate('ButtonDelete') + '</a></li>';
items.push({
name: Globalize.translate('ButtonDelete'),
id: 'delete'
});
}
if (commands.indexOf('download') != -1) {
var downloadHref = ApiClient.getUrl("Items/" + itemId + "/Download", {
api_key: ApiClient.accessToken()
items.push({
name: Globalize.translate('ButtonDownload'),
id: 'download'
});
html += '<li data-icon="false"><a class="btnMoreMenuDownload" data-ajax="false" href="' + downloadHref + '" onclick="$(\'.playFlyout\').popup(\'close\');">' + Globalize.translate('ButtonDownload') + '</a></li>';
}
if (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'
});
}
if (commands.indexOf('refresh') != -1) {
html += '<li data-icon="false"><a class="btnMoreMenuRefresh" href="#">' + Globalize.translate('ButtonRefresh') + '</a></li>';
items.push({
name: Globalize.translate('ButtonRefresh'),
id: 'refresh'
});
}
html += '</ul>';
require(['actionsheet'], function () {
html += '</div>';
ActionSheetElement.show({
items: items,
callback: function (id) {
$($.mobile.activePage).append(html);
switch (id) {
var elem = $('.playFlyout').popup({ positionTo: positionTo || "window" }).trigger('create').popup("open").on("popupafterclose", function () {
case 'addtocollection':
BoxSetEditor.showPanel(itemId);
break;
case 'icon':
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;
$(this).off("popupafterclose").remove();
});
$('.btnMoreMenuRefresh', elem).on('click', function () {
$('.playFlyout').popup('close');
ApiClient.refreshItem(itemId, {
Recursive: true,
ImageRefreshMode: 'FullRefresh',
MetadataRefreshMode: 'FullRefresh',
ReplaceAllImages: false,
ReplaceAllMetadata: true
}).done(function () {
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;
default:
break;
}
}
});
});
},

View File

@ -966,13 +966,13 @@
}
if (browser.ipad || browser.iphone) {
if (userAgent.toLowerCase().indexOf('CPU OS 9') != -1) {
if (userAgent.toLowerCase().indexOf('cpu os 9') != -1) {
browser.iOSVersion = 9;
}
else if (userAgent.toLowerCase().indexOf('CPU OS 8') != -1) {
else if (userAgent.toLowerCase().indexOf('cpu os 8') != -1) {
browser.iOSVersion = 8;
}
else if (userAgent.toLowerCase().indexOf('CPU OS 7') != -1) {
else if (userAgent.toLowerCase().indexOf('cpu os 7') != -1) {
browser.iOSVersion = 7;
}
}

View File

@ -137,6 +137,7 @@ paper-button .fa {
text-decoration: none;
font-weight: inherit !important;
vertical-align: middle;
color: inherit !important;
}
paper-button.mini {
@ -183,3 +184,7 @@ paper-button.notext {
.bottomFab {
bottom: 30px;
}
iron-overlay-backdrop {
z-index: 999998 !important;
}