mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update search
This commit is contained in:
parent
8dd2c5d717
commit
cc428aac1d
34 changed files with 814 additions and 549 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iron-menu-behavior",
|
"name": "iron-menu-behavior",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"description": "Provides accessible menu behavior",
|
"description": "Provides accessible menu behavior",
|
||||||
"authors": "The Polymer Authors",
|
"authors": "The Polymer Authors",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
@ -30,11 +30,11 @@
|
||||||
"web-component-tester": "*",
|
"web-component-tester": "*",
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"_release": "1.0.3",
|
"_release": "1.0.4",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.3",
|
"tag": "v1.0.4",
|
||||||
"commit": "04cc87b1f6551383b1896f13df24ff1d01a9796f"
|
"commit": "4ea050f534e5c418f901d432116762d0c7cb65dd"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/polymerelements/iron-menu-behavior.git",
|
"_source": "git://github.com/polymerelements/iron-menu-behavior.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iron-menu-behavior",
|
"name": "iron-menu-behavior",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"description": "Provides accessible menu behavior",
|
"description": "Provides accessible menu behavior",
|
||||||
"authors": "The Polymer Authors",
|
"authors": "The Polymer Authors",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|
|
@ -31,17 +31,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
simple-menu li {
|
simple-menu a {
|
||||||
display: block;
|
display: block;
|
||||||
padding: 15px 20px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
simple-menubar li {
|
simple-menubar a,
|
||||||
|
simple-menu a {
|
||||||
padding: 15px 20px;
|
padding: 15px 20px;
|
||||||
|
color: var(--primary-text-color);
|
||||||
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
simple-menu li[disabled],
|
simple-menu a[disabled],
|
||||||
simple-menubar li[disabled] {
|
simple-menubar a[disabled] {
|
||||||
color: var(--google-grey-300);
|
color: var(--google-grey-300);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,17 +57,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body unresolved>
|
||||||
|
|
||||||
<div class="horizontal center-justified layout">
|
<div class="horizontal center-justified layout">
|
||||||
<div>
|
<div>
|
||||||
<h3>Simple menu</h3>
|
<h3>Simple menu</h3>
|
||||||
<div class="horizontal-section">
|
<div class="horizontal-section">
|
||||||
<simple-menu>
|
<simple-menu>
|
||||||
<li>item 0</li>
|
<a href="javascript:void(0)">Item 0</a>
|
||||||
<li>item 1</li>
|
<a href="javascript:void(0)">Item 1</a>
|
||||||
<li disabled>item 2</li>
|
<a href="javascript:void(0)" disabled>Item 2</a>
|
||||||
<li>item 3</li>
|
<a href="javascript:void(0)">Item 3</a>
|
||||||
</simple-menu>
|
</simple-menu>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -74,10 +76,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
<h3>Multi-select menu</h3>
|
<h3>Multi-select menu</h3>
|
||||||
<div class="horizontal-section">
|
<div class="horizontal-section">
|
||||||
<simple-menu multi>
|
<simple-menu multi>
|
||||||
<li>item 0</li>
|
<a href="javascript:void(0)">Item 0</a>
|
||||||
<li>item 1</li>
|
<a href="javascript:void(0)">Item 1</a>
|
||||||
<li>item 2</li>
|
<a href="javascript:void(0)">Item 2</a>
|
||||||
<li>item 3</li>
|
<a href="javascript:void(0)">Item 3</a>
|
||||||
</simple-menu>
|
</simple-menu>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -87,10 +89,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
<h3>Simple menubar</h3>
|
<h3>Simple menubar</h3>
|
||||||
<div class="horizontal-section">
|
<div class="horizontal-section">
|
||||||
<simple-menubar>
|
<simple-menubar>
|
||||||
<li>item 0</li>
|
<a href="javascript:void(0)">Item 0</a>
|
||||||
<li>item 1</li>
|
<a href="javascript:void(0)">Item 1</a>
|
||||||
<li disabled>item 2</li>
|
<a href="javascript:void(0)" disabled>Item 2</a>
|
||||||
<li>item 3</li>
|
<a href="javascript:void(0)">Item 3</a>
|
||||||
</simple-menubar>
|
</simple-menubar>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -98,10 +100,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
<h3>Multi-select menubar</h3>
|
<h3>Multi-select menubar</h3>
|
||||||
<div class="horizontal-section">
|
<div class="horizontal-section">
|
||||||
<simple-menubar multi>
|
<simple-menubar multi>
|
||||||
<li>item 0</li>
|
<a href="javascript:void(0)">Item 0</a>
|
||||||
<li>item 1</li>
|
<a href="javascript:void(0)">Item 1</a>
|
||||||
<li>item 2</li>
|
<a href="javascript:void(0)">Item 2</a>
|
||||||
<li>item 3</li>
|
<a href="javascript:void(0)">Item 3</a>
|
||||||
</simple-menubar>
|
</simple-menubar>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -55,59 +55,27 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
|
|
||||||
listeners: {
|
listeners: {
|
||||||
'focus': '_onFocus',
|
'focus': '_onFocus',
|
||||||
'keydown': '_onKeydown'
|
'keydown': '_onKeydown',
|
||||||
|
'iron-items-changed': '_onIronItemsChanged'
|
||||||
},
|
},
|
||||||
|
|
||||||
keyBindings: {
|
keyBindings: {
|
||||||
'up': '_onUpKey',
|
'up': '_onUpKey',
|
||||||
'down': '_onDownKey',
|
'down': '_onDownKey',
|
||||||
'esc': '_onEscKey',
|
'esc': '_onEscKey',
|
||||||
'enter': '_onEnterKey',
|
|
||||||
'shift+tab:keydown': '_onShiftTabDown'
|
'shift+tab:keydown': '_onShiftTabDown'
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateMultiselectable: function(multi) {
|
attached: function() {
|
||||||
if (multi) {
|
this._resetTabindices();
|
||||||
this.setAttribute('aria-multiselectable', 'true');
|
|
||||||
} else {
|
|
||||||
this.removeAttribute('aria-multiselectable');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_onShiftTabDown: function() {
|
|
||||||
var oldTabIndex;
|
|
||||||
|
|
||||||
Polymer.IronMenuBehaviorImpl._shiftTabPressed = true;
|
|
||||||
|
|
||||||
oldTabIndex = this.getAttribute('tabindex');
|
|
||||||
|
|
||||||
this.setAttribute('tabindex', '-1');
|
|
||||||
|
|
||||||
this.async(function() {
|
|
||||||
this.setAttribute('tabindex', oldTabIndex);
|
|
||||||
Polymer.IronMenuBehaviorImpl._shiftTabPressed = false;
|
|
||||||
// Note: polymer/polymer#1305
|
|
||||||
}, 1);
|
|
||||||
},
|
|
||||||
|
|
||||||
_applySelection: function(item, isSelected) {
|
|
||||||
if (isSelected) {
|
|
||||||
item.setAttribute('aria-selected', 'true');
|
|
||||||
} else {
|
|
||||||
item.removeAttribute('aria-selected');
|
|
||||||
}
|
|
||||||
|
|
||||||
Polymer.IronSelectableBehavior._applySelection.apply(this, arguments);
|
|
||||||
},
|
|
||||||
|
|
||||||
_focusedItemChanged: function(focusedItem, old) {
|
|
||||||
old && old.setAttribute('tabindex', '-1');
|
|
||||||
if (focusedItem) {
|
|
||||||
focusedItem.setAttribute('tabindex', '0');
|
|
||||||
focusedItem.focus();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Selects the given value. If the `multi` property is true, then the selected state of the
|
||||||
|
* `value` will be toggled; otherwise the `value` will be selected.
|
||||||
|
*
|
||||||
|
* @param {string} value the value to select.
|
||||||
|
*/
|
||||||
select: function(value) {
|
select: function(value) {
|
||||||
if (this._defaultFocusAsync) {
|
if (this._defaultFocusAsync) {
|
||||||
this.cancelAsync(this._defaultFocusAsync);
|
this.cancelAsync(this._defaultFocusAsync);
|
||||||
|
@ -119,6 +87,152 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
Polymer.IronMultiSelectableBehaviorImpl.select.apply(this, arguments);
|
Polymer.IronMultiSelectableBehaviorImpl.select.apply(this, arguments);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets all tabindex attributes to the appropriate value based on the
|
||||||
|
* current selection state. The appropriate value is `0` (focusable) for
|
||||||
|
* the default selected item, and `-1` (not keyboard focusable) for all
|
||||||
|
* other items.
|
||||||
|
*/
|
||||||
|
_resetTabindices: function() {
|
||||||
|
var selectedItem = this.multi ? (this.selectedItems && this.selectedItems[0]) : this.selectedItem;
|
||||||
|
|
||||||
|
this.items.forEach(function(item) {
|
||||||
|
item.setAttribute('tabindex', item === selectedItem ? '0' : '-1');
|
||||||
|
}, this);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets appropriate ARIA based on whether or not the menu is meant to be
|
||||||
|
* multi-selectable.
|
||||||
|
*
|
||||||
|
* @param {boolean} multi True if the menu should be multi-selectable.
|
||||||
|
*/
|
||||||
|
_updateMultiselectable: function(multi) {
|
||||||
|
if (multi) {
|
||||||
|
this.setAttribute('aria-multiselectable', 'true');
|
||||||
|
} else {
|
||||||
|
this.removeAttribute('aria-multiselectable');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Given a KeyboardEvent, this method will focus the appropriate item in the
|
||||||
|
* menu (if there is a relevant item, and it is possible to focus it).
|
||||||
|
*
|
||||||
|
* @param {KeyboardEvent} event A KeyboardEvent.
|
||||||
|
*/
|
||||||
|
_focusWithKeyboardEvent: function(event) {
|
||||||
|
for (var i = 0, item; item = this.items[i]; i++) {
|
||||||
|
var attr = this.attrForItemTitle || 'textContent';
|
||||||
|
var title = item[attr] || item.getAttribute(attr);
|
||||||
|
if (title && title.trim().charAt(0).toLowerCase() === String.fromCharCode(event.keyCode).toLowerCase()) {
|
||||||
|
this._setFocusedItem(item);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Focuses the previous item (relative to the currently focused item) in the
|
||||||
|
* menu.
|
||||||
|
*/
|
||||||
|
_focusPrevious: function() {
|
||||||
|
var length = this.items.length;
|
||||||
|
var index = (Number(this.indexOf(this.focusedItem)) - 1 + length) % length;
|
||||||
|
this._setFocusedItem(this.items[index]);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Focuses the next item (relative to the currently focused item) in the
|
||||||
|
* menu.
|
||||||
|
*/
|
||||||
|
_focusNext: function() {
|
||||||
|
var index = (Number(this.indexOf(this.focusedItem)) + 1) % this.items.length;
|
||||||
|
this._setFocusedItem(this.items[index]);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mutates items in the menu based on provided selection details, so that
|
||||||
|
* all items correctly reflect selection state.
|
||||||
|
*
|
||||||
|
* @param {Element} item An item in the menu.
|
||||||
|
* @param {boolean} isSelected True if the item should be shown in a
|
||||||
|
* selected state, otherwise false.
|
||||||
|
*/
|
||||||
|
_applySelection: function(item, isSelected) {
|
||||||
|
if (isSelected) {
|
||||||
|
item.setAttribute('aria-selected', 'true');
|
||||||
|
} else {
|
||||||
|
item.removeAttribute('aria-selected');
|
||||||
|
}
|
||||||
|
|
||||||
|
Polymer.IronSelectableBehavior._applySelection.apply(this, arguments);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Discretely updates tabindex values among menu items as the focused item
|
||||||
|
* changes.
|
||||||
|
*
|
||||||
|
* @param {Element} focusedItem The element that is currently focused.
|
||||||
|
* @param {?Element} old The last element that was considered focused, if
|
||||||
|
* applicable.
|
||||||
|
*/
|
||||||
|
_focusedItemChanged: function(focusedItem, old) {
|
||||||
|
old && old.setAttribute('tabindex', '-1');
|
||||||
|
if (focusedItem) {
|
||||||
|
focusedItem.setAttribute('tabindex', '0');
|
||||||
|
focusedItem.focus();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A handler that responds to mutation changes related to the list of items
|
||||||
|
* in the menu.
|
||||||
|
*
|
||||||
|
* @param {CustomEvent} event An event containing mutation records as its
|
||||||
|
* detail.
|
||||||
|
*/
|
||||||
|
_onIronItemsChanged: function(event) {
|
||||||
|
var mutations = event.detail;
|
||||||
|
var mutation;
|
||||||
|
var index;
|
||||||
|
|
||||||
|
for (index = 0; index < mutations.length; ++index) {
|
||||||
|
mutation = mutations[index];
|
||||||
|
|
||||||
|
if (mutation.addedNodes.length) {
|
||||||
|
this._resetTabindices();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler that is called when a shift+tab keypress is detected by the menu.
|
||||||
|
*
|
||||||
|
* @param {CustomEvent} event A key combination event.
|
||||||
|
*/
|
||||||
|
_onShiftTabDown: function(event) {
|
||||||
|
var oldTabIndex;
|
||||||
|
|
||||||
|
Polymer.IronMenuBehaviorImpl._shiftTabPressed = true;
|
||||||
|
|
||||||
|
oldTabIndex = this.getAttribute('tabindex');
|
||||||
|
|
||||||
|
this.setAttribute('tabindex', '-1');
|
||||||
|
|
||||||
|
this.async(function() {
|
||||||
|
this.setAttribute('tabindex', oldTabIndex);
|
||||||
|
Polymer.IronMenuBehaviorImpl._shiftTabPressed = false;
|
||||||
|
// NOTE(cdata): polymer/polymer#1305
|
||||||
|
}, 1);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler that is called when the menu receives focus.
|
||||||
|
*
|
||||||
|
* @param {FocusEvent} event A focus event.
|
||||||
|
*/
|
||||||
_onFocus: function(event) {
|
_onFocus: function(event) {
|
||||||
if (Polymer.IronMenuBehaviorImpl._shiftTabPressed) {
|
if (Polymer.IronMenuBehaviorImpl._shiftTabPressed) {
|
||||||
return;
|
return;
|
||||||
|
@ -140,62 +254,48 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
}, 100);
|
}, 100);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onUpKey: function() {
|
/**
|
||||||
|
* Handler that is called when the up key is pressed.
|
||||||
|
*
|
||||||
|
* @param {CustomEvent} event A key combination event.
|
||||||
|
*/
|
||||||
|
_onUpKey: function(event) {
|
||||||
// up and down arrows moves the focus
|
// up and down arrows moves the focus
|
||||||
this._focusPrevious();
|
this._focusPrevious();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDownKey: function() {
|
/**
|
||||||
|
* Handler that is called when the down key is pressed.
|
||||||
|
*
|
||||||
|
* @param {CustomEvent} event A key combination event.
|
||||||
|
*/
|
||||||
|
_onDownKey: function(event) {
|
||||||
this._focusNext();
|
this._focusNext();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onEscKey: function() {
|
/**
|
||||||
|
* Handler that is called when the esc key is pressed.
|
||||||
|
*
|
||||||
|
* @param {CustomEvent} event A key combination event.
|
||||||
|
*/
|
||||||
|
_onEscKey: function(event) {
|
||||||
// esc blurs the control
|
// esc blurs the control
|
||||||
this.focusedItem.blur();
|
this.focusedItem.blur();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onEnterKey: function(event) {
|
/**
|
||||||
// enter activates the item unless it is disabled
|
* Handler that is called when a keydown event is detected.
|
||||||
this._activateFocused(event.detail.keyboardEvent);
|
*
|
||||||
},
|
* @param {KeyboardEvent} event A keyboard event.
|
||||||
|
*/
|
||||||
_onKeydown: function(event) {
|
_onKeydown: function(event) {
|
||||||
if (this.keyboardEventMatchesKeys(event, 'up down esc enter')) {
|
if (this.keyboardEventMatchesKeys(event, 'up down esc')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// all other keys focus the menu item starting with that character
|
// all other keys focus the menu item starting with that character
|
||||||
this._focusWithKeyboardEvent(event);
|
this._focusWithKeyboardEvent(event);
|
||||||
},
|
|
||||||
|
|
||||||
_focusWithKeyboardEvent: function(event) {
|
|
||||||
for (var i = 0, item; item = this.items[i]; i++) {
|
|
||||||
var attr = this.attrForItemTitle || 'textContent';
|
|
||||||
var title = item[attr] || item.getAttribute(attr);
|
|
||||||
if (title && title.trim().charAt(0).toLowerCase() === String.fromCharCode(event.keyCode).toLowerCase()) {
|
|
||||||
this._setFocusedItem(item);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_activateFocused: function(event) {
|
|
||||||
if (!this.focusedItem.hasAttribute('disabled')) {
|
|
||||||
this._activateHandler(event);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_focusPrevious: function() {
|
|
||||||
var length = this.items.length;
|
|
||||||
var index = (Number(this.indexOf(this.focusedItem)) - 1 + length) % length;
|
|
||||||
this._setFocusedItem(this.items[index]);
|
|
||||||
},
|
|
||||||
|
|
||||||
_focusNext: function() {
|
|
||||||
var index = (Number(this.indexOf(this.focusedItem)) + 1) % this.items.length;
|
|
||||||
this._setFocusedItem(this.items[index]);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Polymer.IronMenuBehaviorImpl._shiftTabPressed = false;
|
Polymer.IronMenuBehaviorImpl._shiftTabPressed = false;
|
||||||
|
|
|
@ -30,11 +30,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
},
|
},
|
||||||
|
|
||||||
_onUpKey: function(event) {
|
_onUpKey: function(event) {
|
||||||
this._activateFocused(event.detail.keyboardEvent);
|
this.focusedItem.click();
|
||||||
|
event.detail.keyboardEvent.preventDefault();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDownKey: function(event) {
|
_onDownKey: function(event) {
|
||||||
this._activateFocused(event.detail.keyboardEvent);
|
this.focusedItem.click();
|
||||||
|
event.detail.keyboardEvent.preventDefault();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onLeftKey: function() {
|
_onLeftKey: function() {
|
||||||
|
@ -46,7 +48,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
},
|
},
|
||||||
|
|
||||||
_onKeydown: function(event) {
|
_onKeydown: function(event) {
|
||||||
if (this.keyboardEventMatchesKeys(event, 'up down left right esc enter')) {
|
if (this.keyboardEventMatchesKeys(event, 'up down left right esc')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,14 +34,14 @@
|
||||||
"web-component-tester": "*",
|
"web-component-tester": "*",
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/PolymerElements/iron-overlay-behavior",
|
"homepage": "https://github.com/polymerelements/iron-overlay-behavior",
|
||||||
"_release": "1.0.6",
|
"_release": "1.0.6",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.6",
|
"tag": "v1.0.6",
|
||||||
"commit": "9c77f077f4181b6f03cc986d0f3c224094edbc2d"
|
"commit": "9c77f077f4181b6f03cc986d0f3c224094edbc2d"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/iron-overlay-behavior.git",
|
"_source": "git://github.com/polymerelements/iron-overlay-behavior.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "PolymerElements/iron-overlay-behavior"
|
"_originalSource": "polymerelements/iron-overlay-behavior"
|
||||||
}
|
}
|
|
@ -54,7 +54,7 @@
|
||||||
"tag": "v1.0.6",
|
"tag": "v1.0.6",
|
||||||
"commit": "ec51bf68f05c40373536cc726ca674e4549b7db2"
|
"commit": "ec51bf68f05c40373536cc726ca674e4549b7db2"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/neon-animation.git",
|
"_source": "git://github.com/polymerelements/neon-animation.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "PolymerElements/neon-animation"
|
"_originalSource": "polymerelements/neon-animation"
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "paper-item",
|
"name": "paper-item",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"description": "A material-design styled list item",
|
"description": "A material-design styled list item",
|
||||||
"authors": [
|
"authors": [
|
||||||
"The Polymer Authors"
|
"The Polymer Authors"
|
||||||
|
@ -24,27 +24,28 @@
|
||||||
"homepage": "https://github.com/PolymerElements/paper-item",
|
"homepage": "https://github.com/PolymerElements/paper-item",
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"polymer": "Polymer/polymer#^1.1.0",
|
||||||
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
|
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
|
||||||
"polymer": "Polymer/polymer#^1.0.0"
|
"iron-behaviors": "polymerelements/iron-behaviors#^1.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||||
"iron-icon": "PolymerElements/iron-icon#^1.0.0",
|
"iron-icon": "PolymerElements/iron-icon#^1.0.0",
|
||||||
"iron-icons": "PolymerElements/iron-icons#^1.0.0",
|
"iron-icons": "PolymerElements/iron-icons#^1.0.0",
|
||||||
"paper-checkbox": "PolymerElements/paper-checkbox#^1.0.0",
|
"paper-checkbox": "PolymerElements/paper-checkbox#^1.0.0",
|
||||||
|
"paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",
|
||||||
"paper-toggle-button": "PolymerElements/paper-toggle-button#^1.0.0",
|
"paper-toggle-button": "PolymerElements/paper-toggle-button#^1.0.0",
|
||||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
|
||||||
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||||
"web-component-tester": "*",
|
"web-component-tester": "Polymer/web-component-tester#^3.3.0",
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"_release": "1.0.2",
|
"_release": "1.0.3",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.2",
|
"tag": "v1.0.3",
|
||||||
"commit": "209d000bd2e99d9b31cfc996bbc5b0fc554be21d"
|
"commit": "52ca8cf95ed34f265a6208def81dae9189330ad6"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/paper-item.git",
|
"_source": "git://github.com/PolymerElements/paper-item.git",
|
||||||
"_target": "~1.0.2",
|
"_target": "~1.0.2",
|
||||||
"_originalSource": "PolymerElements/paper-item",
|
"_originalSource": "PolymerElements/paper-item"
|
||||||
"_direct": true
|
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "paper-item",
|
"name": "paper-item",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"description": "A material-design styled list item",
|
"description": "A material-design styled list item",
|
||||||
"authors": [
|
"authors": [
|
||||||
"The Polymer Authors"
|
"The Polymer Authors"
|
||||||
|
@ -24,17 +24,19 @@
|
||||||
"homepage": "https://github.com/PolymerElements/paper-item",
|
"homepage": "https://github.com/PolymerElements/paper-item",
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"polymer": "Polymer/polymer#^1.1.0",
|
||||||
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
|
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
|
||||||
"polymer": "Polymer/polymer#^1.0.0"
|
"iron-behaviors": "polymerelements/iron-behaviors#^1.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||||
"iron-icon": "PolymerElements/iron-icon#^1.0.0",
|
"iron-icon": "PolymerElements/iron-icon#^1.0.0",
|
||||||
"iron-icons": "PolymerElements/iron-icons#^1.0.0",
|
"iron-icons": "PolymerElements/iron-icons#^1.0.0",
|
||||||
"paper-checkbox": "PolymerElements/paper-checkbox#^1.0.0",
|
"paper-checkbox": "PolymerElements/paper-checkbox#^1.0.0",
|
||||||
|
"paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",
|
||||||
"paper-toggle-button": "PolymerElements/paper-toggle-button#^1.0.0",
|
"paper-toggle-button": "PolymerElements/paper-toggle-button#^1.0.0",
|
||||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
|
||||||
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||||
"web-component-tester": "*",
|
"web-component-tester": "Polymer/web-component-tester#^3.3.0",
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
<link rel="import" href="../../iron-icons/iron-icons.html">
|
<link rel="import" href="../../iron-icons/iron-icons.html">
|
||||||
<link rel="import" href="../../iron-icons/communication-icons.html">
|
<link rel="import" href="../../iron-icons/communication-icons.html">
|
||||||
<link rel="import" href="../../paper-checkbox/paper-checkbox.html">
|
<link rel="import" href="../../paper-checkbox/paper-checkbox.html">
|
||||||
|
<link rel="import" href="../../paper-icon-button/paper-icon-button.html">
|
||||||
<link rel="import" href="../../paper-toggle-button/paper-toggle-button.html">
|
<link rel="import" href="../../paper-toggle-button/paper-toggle-button.html">
|
||||||
<link rel="import" href="../paper-icon-item.html">
|
<link rel="import" href="../paper-icon-item.html">
|
||||||
<link rel="import" href="../paper-item.html">
|
<link rel="import" href="../paper-item.html">
|
||||||
|
@ -77,7 +78,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
<div class="layout wrap inline center-center">
|
<div class="layout wrap inline center-center">
|
||||||
<div>
|
<div>
|
||||||
<h4>Single line items</h4>
|
<h4>Single line items</h4>
|
||||||
<div class="list short">
|
<div class="list short" role="list">
|
||||||
<paper-item>Inbox</paper-item>
|
<paper-item>Inbox</paper-item>
|
||||||
<paper-item>Starred</paper-item>
|
<paper-item>Starred</paper-item>
|
||||||
<paper-item>Sent mail</paper-item>
|
<paper-item>Sent mail</paper-item>
|
||||||
|
@ -87,7 +88,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h4>Icon with text</h4>
|
<h4>Icon with text</h4>
|
||||||
<div class="list short">
|
<div class="list short" role="list">
|
||||||
<paper-icon-item>
|
<paper-icon-item>
|
||||||
<iron-icon icon="inbox" item-icon></iron-icon> Inbox
|
<iron-icon icon="inbox" item-icon></iron-icon> Inbox
|
||||||
</paper-icon-item>
|
</paper-icon-item>
|
||||||
|
@ -105,7 +106,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h4>Avatar with text</h4>
|
<h4>Avatar with text</h4>
|
||||||
<div class="list short">
|
<div class="list short" role="list">
|
||||||
<paper-icon-item>
|
<paper-icon-item>
|
||||||
<div class="avatar blue" item-icon></div> Alphonso Engelking
|
<div class="avatar blue" item-icon></div> Alphonso Engelking
|
||||||
</paper-icon-item>
|
</paper-icon-item>
|
||||||
|
@ -123,7 +124,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h4>Avatar with text and icon</h4>
|
<h4>Avatar with text and icon</h4>
|
||||||
<div class="list short">
|
<div class="list short" role="list">
|
||||||
<paper-icon-item>
|
<paper-icon-item>
|
||||||
<div class="avatar red" item-icon></div>
|
<div class="avatar red" item-icon></div>
|
||||||
<div class="flex">Alphonso</div>
|
<div class="flex">Alphonso</div>
|
||||||
|
@ -149,7 +150,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h4>Avatar with text and control</h4>
|
<h4>Avatar with text and control</h4>
|
||||||
<div class="list short">
|
<div class="list short" role="list">
|
||||||
<paper-icon-item>
|
<paper-icon-item>
|
||||||
<div class="avatar orange" item-icon></div>
|
<div class="avatar orange" item-icon></div>
|
||||||
<div class="flex">Alphonso</div>
|
<div class="flex">Alphonso</div>
|
||||||
|
@ -175,7 +176,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h4>Control with text and icon</h4>
|
<h4>Control with text and icon</h4>
|
||||||
<div class="list short">
|
<div class="list short" role="list">
|
||||||
<paper-icon-item>
|
<paper-icon-item>
|
||||||
<paper-checkbox item-icon></paper-checkbox>
|
<paper-checkbox item-icon></paper-checkbox>
|
||||||
<div class="flex">Alphonso</div>
|
<div class="flex">Alphonso</div>
|
||||||
|
@ -201,7 +202,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h4>Two-line items</h4>
|
<h4>Two-line items</h4>
|
||||||
<div class="list">
|
<div class="list" role="list">
|
||||||
<paper-item>
|
<paper-item>
|
||||||
<paper-item-body two-line class="layout vertical">
|
<paper-item-body two-line class="layout vertical">
|
||||||
<div>Profile Photo</div>
|
<div>Profile Photo</div>
|
||||||
|
@ -225,7 +226,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h4>Icon with two-line text</h4>
|
<h4>Icon with two-line text</h4>
|
||||||
<div class="list">
|
<div class="list" role="list">
|
||||||
<paper-icon-item>
|
<paper-icon-item>
|
||||||
<div class="avatar green" item-icon></div>
|
<div class="avatar green" item-icon></div>
|
||||||
<paper-item-body two-line>
|
<paper-item-body two-line>
|
||||||
|
@ -253,14 +254,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h4>Avatar with text and icon</h4>
|
<h4>Avatar with text and icon</h4>
|
||||||
<div class="list">
|
<div class="list" role="list">
|
||||||
<paper-icon-item>
|
<paper-icon-item>
|
||||||
<div class="avatar blue" item-icon></div>
|
<div class="avatar blue" item-icon></div>
|
||||||
<paper-item-body two-line>
|
<paper-item-body two-line>
|
||||||
<div>Photos</div>
|
<div>Photos</div>
|
||||||
<div secondary>Jan 9, 2014</div>
|
<div secondary>Jan 9, 2014</div>
|
||||||
</paper-item-body>
|
</paper-item-body>
|
||||||
<iron-icon icon="star"></iron-icon>
|
<paper-icon-button icon="star" alt="favourite this!"></paper-icon-button>
|
||||||
</paper-icon-item>
|
</paper-icon-item>
|
||||||
<paper-icon-item>
|
<paper-icon-item>
|
||||||
<div class="avatar red" item-icon></div>
|
<div class="avatar red" item-icon></div>
|
||||||
|
@ -268,7 +269,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
<div>Recipes</div>
|
<div>Recipes</div>
|
||||||
<div secondary>Jan 17, 2014</div>
|
<div secondary>Jan 17, 2014</div>
|
||||||
</paper-item-body>
|
</paper-item-body>
|
||||||
<iron-icon icon="star"></iron-icon>
|
<paper-icon-button icon="star" alt="favourite this!"></paper-icon-button>
|
||||||
</paper-icon-item>
|
</paper-icon-item>
|
||||||
<paper-icon-item>
|
<paper-icon-item>
|
||||||
<div class="avatar orange" item-icon></div>
|
<div class="avatar orange" item-icon></div>
|
||||||
|
@ -276,7 +277,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
<div>Work</div>
|
<div>Work</div>
|
||||||
<div secondary>Jan 28, 2014</div>
|
<div secondary>Jan 28, 2014</div>
|
||||||
</paper-item-body>
|
</paper-item-body>
|
||||||
<iron-icon icon="star"></iron-icon>
|
<paper-icon-button icon="star" alt="favourite this!"></paper-icon-button>
|
||||||
</paper-icon-item>
|
</paper-icon-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -9,7 +9,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<link rel="import" href="../polymer/polymer.html">
|
<link rel="import" href="../polymer/polymer.html">
|
||||||
|
<link rel="import" href="../iron-behaviors/iron-control-state.html">
|
||||||
|
<link rel="import" href="../iron-behaviors/iron-button-state.html">
|
||||||
<link rel="import" href="../paper-styles/paper-styles.html">
|
<link rel="import" href="../paper-styles/paper-styles.html">
|
||||||
|
<link rel="import" href="paper-item-shared-styles.html">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
`<paper-icon-item>` is a convenience element to make an item with icon. It is a non interactive list
|
`<paper-icon-item>` is a convenience element to make an item with icon. It is a non interactive list
|
||||||
|
@ -38,11 +41,9 @@ Custom property | Description | Default
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<dom-module id="paper-icon-item">
|
<dom-module id="paper-icon-item">
|
||||||
|
<template>
|
||||||
<link rel="import" type="css" href="paper-item-shared.css">
|
<style include="paper-item-shared-styles"></style>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
:host {
|
:host {
|
||||||
@apply(--layout-horizontal);
|
@apply(--layout-horizontal);
|
||||||
@apply(--layout-center);
|
@apply(--layout-center);
|
||||||
|
@ -55,32 +56,27 @@ Custom property | Description | Default
|
||||||
.content-icon {
|
.content-icon {
|
||||||
width: var(--paper-item-icon-width, 56px);
|
width: var(--paper-item-icon-width, 56px);
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<template>
|
|
||||||
<div id="contentIcon" class="content-icon layout horizontal center">
|
<div id="contentIcon" class="content-icon layout horizontal center">
|
||||||
<content select="[item-icon]"></content>
|
<content select="[item-icon]"></content>
|
||||||
</div>
|
</div>
|
||||||
<content></content>
|
<content></content>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</dom-module>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
(function() {
|
|
||||||
|
|
||||||
Polymer({
|
Polymer({
|
||||||
|
|
||||||
is: 'paper-icon-item',
|
is: 'paper-icon-item',
|
||||||
|
|
||||||
hostAttributes: {
|
hostAttributes: {
|
||||||
'role': 'listitem'
|
'role': 'listitem',
|
||||||
}
|
'tabindex': '0'
|
||||||
|
},
|
||||||
|
|
||||||
|
behaviors: [
|
||||||
|
Polymer.IronControlState,
|
||||||
|
Polymer.IronButtonState
|
||||||
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
})();
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
</dom-module>
|
||||||
|
|
|
@ -38,9 +38,8 @@ Custom property | Description | Default
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<dom-module id="paper-item-body">
|
<dom-module id="paper-item-body">
|
||||||
|
<template>
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
:host {
|
:host {
|
||||||
overflow: hidden; /* needed for text-overflow: ellipsis to work on ff */
|
overflow: hidden; /* needed for text-overflow: ellipsis to work on ff */
|
||||||
@apply(--layout-vertical);
|
@apply(--layout-vertical);
|
||||||
|
@ -68,26 +67,14 @@ Custom property | Description | Default
|
||||||
|
|
||||||
@apply(--paper-item-body-secondary);
|
@apply(--paper-item-body-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<template>
|
|
||||||
<content></content>
|
<content></content>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</dom-module>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
(function() {
|
|
||||||
|
|
||||||
Polymer({
|
Polymer({
|
||||||
|
|
||||||
is: 'paper-item-body'
|
is: 'paper-item-body'
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
})();
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
</dom-module>
|
||||||
|
|
25
dashboard-ui/bower_components/paper-item/paper-item-shared-styles.html
vendored
Normal file
25
dashboard-ui/bower_components/paper-item/paper-item-shared-styles.html
vendored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<!--
|
||||||
|
@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
|
||||||
|
-->
|
||||||
|
|
||||||
|
<dom-module id="paper-item-shared-styles">
|
||||||
|
<template>
|
||||||
|
<style>
|
||||||
|
:host {
|
||||||
|
display: block;
|
||||||
|
min-height: var(--paper-item-min-height, 48px);
|
||||||
|
padding: 0px 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:host > ::content > *:not(:first-child):not(:last-child) {
|
||||||
|
margin-right: 16px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</template>
|
||||||
|
</dom-module>
|
|
@ -1,19 +0,0 @@
|
||||||
/*
|
|
||||||
@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;
|
|
||||||
min-height: var(--paper-item-min-height, 48px);
|
|
||||||
padding: 0px 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:host > ::content > *:not(:first-child):not(:last-child) {
|
|
||||||
margin-right: 16px;
|
|
||||||
}
|
|
|
@ -9,8 +9,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<link rel="import" href="../polymer/polymer.html">
|
<link rel="import" href="../polymer/polymer.html">
|
||||||
<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
|
<link rel="import" href="../iron-behaviors/iron-control-state.html">
|
||||||
|
<link rel="import" href="../iron-behaviors/iron-button-state.html">
|
||||||
<link rel="import" href="../paper-styles/paper-styles.html">
|
<link rel="import" href="../paper-styles/paper-styles.html">
|
||||||
|
<link rel="import" href="paper-item-shared-styles.html">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
`<paper-item>` is a non-interactive list item. By default, it is a horizontal flexbox.
|
`<paper-item>` is a non-interactive list item. By default, it is a horizontal flexbox.
|
||||||
|
@ -55,11 +57,9 @@ This element has `role="listitem"` by default. Depending on usage, it may be mor
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<dom-module id="paper-item">
|
<dom-module id="paper-item">
|
||||||
|
<template>
|
||||||
<link rel="import" type="css" href="paper-item-shared.css">
|
<style include="paper-item-shared-styles"></style>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
:host {
|
:host {
|
||||||
@apply(--layout-horizontal);
|
@apply(--layout-horizontal);
|
||||||
@apply(--layout-center);
|
@apply(--layout-center);
|
||||||
|
@ -67,29 +67,24 @@ This element has `role="listitem"` by default. Depending on usage, it may be mor
|
||||||
|
|
||||||
@apply(--paper-item);
|
@apply(--paper-item);
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<template>
|
|
||||||
<content></content>
|
<content></content>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</dom-module>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
(function() {
|
|
||||||
|
|
||||||
Polymer({
|
Polymer({
|
||||||
|
|
||||||
is: 'paper-item',
|
is: 'paper-item',
|
||||||
|
|
||||||
hostAttributes: {
|
hostAttributes: {
|
||||||
role: 'listitem'
|
role: 'listitem',
|
||||||
}
|
tabindex: '0'
|
||||||
|
},
|
||||||
|
|
||||||
|
behaviors: [
|
||||||
|
Polymer.IronControlState,
|
||||||
|
Polymer.IronButtonState
|
||||||
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
})();
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
</dom-module>
|
||||||
|
|
|
@ -31,13 +31,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
|
|
||||||
<test-fixture id="item">
|
<test-fixture id="item">
|
||||||
<template>
|
<template>
|
||||||
|
<div role="list">
|
||||||
<paper-item>item</paper-item>
|
<paper-item>item</paper-item>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</test-fixture>
|
</test-fixture>
|
||||||
|
|
||||||
<test-fixture id="iconItem">
|
<test-fixture id="iconItem">
|
||||||
<template>
|
<template>
|
||||||
|
<div role="list">
|
||||||
<paper-icon-item>item</paper-icon-item>
|
<paper-icon-item>item</paper-icon-item>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</test-fixture>
|
</test-fixture>
|
||||||
|
|
||||||
|
@ -47,8 +51,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
var item, iconItem;
|
var item, iconItem;
|
||||||
|
|
||||||
setup(function() {
|
setup(function() {
|
||||||
item = fixture('item');
|
item = fixture('item').querySelector('paper-item');
|
||||||
iconItem = fixture('iconItem');
|
iconItem = fixture('iconItem').querySelector('paper-icon-item');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('item has role="listitem"', function() {
|
test('item has role="listitem"', function() {
|
||||||
|
@ -58,6 +62,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
test('icon item has role="listitem"', function() {
|
test('icon item has role="listitem"', function() {
|
||||||
assert.equal(iconItem.getAttribute('role'), 'listitem', 'has role="item"');
|
assert.equal(iconItem.getAttribute('role'), 'listitem', 'has role="item"');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
a11ySuite('item');
|
||||||
|
a11ySuite('iconItem');
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -30,14 +30,14 @@
|
||||||
"web-component-tester": "*",
|
"web-component-tester": "*",
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/PolymerElements/paper-ripple",
|
"homepage": "https://github.com/polymerelements/paper-ripple",
|
||||||
"_release": "1.0.2",
|
"_release": "1.0.2",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.2",
|
"tag": "v1.0.2",
|
||||||
"commit": "b546dbe6ad0b1f58cac80caec3136cf3232e12fc"
|
"commit": "b546dbe6ad0b1f58cac80caec3136cf3232e12fc"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/paper-ripple.git",
|
"_source": "git://github.com/polymerelements/paper-ripple.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "PolymerElements/paper-ripple"
|
"_originalSource": "polymerelements/paper-ripple"
|
||||||
}
|
}
|
31
dashboard-ui/cordova/ios/tabbar.js
vendored
31
dashboard-ui/cordova/ios/tabbar.js
vendored
|
@ -18,7 +18,7 @@
|
||||||
Dashboard.navigate('index.html');
|
Dashboard.navigate('index.html');
|
||||||
break;
|
break;
|
||||||
case 'Search':
|
case 'Search':
|
||||||
Dashboard.navigate('index.html');
|
Dashboard.navigate('search.html');
|
||||||
break;
|
break;
|
||||||
case 'NowPlaying':
|
case 'NowPlaying':
|
||||||
Dashboard.navigate('nowplaying.html');
|
Dashboard.navigate('nowplaying.html');
|
||||||
|
@ -69,19 +69,16 @@
|
||||||
|
|
||||||
var items = [
|
var items = [
|
||||||
{ name: 'Featured', label: Globalize.translate('ButtonForYou'), image: 'tabButton:Featured', options: {} },
|
{ name: 'Featured', label: Globalize.translate('ButtonForYou'), image: 'tabButton:Featured', options: {} },
|
||||||
{ name: 'Library', label: Globalize.translate('ButtonLibrary'), image: 'tabButton:History', options: {} },
|
{ name: 'Library', label: Globalize.translate('ButtonLibrary'), image: 'tabbar/tab-library.png', options: {} },
|
||||||
{ name: 'Search', label: Globalize.translate('ButtonSearch'), image: 'tabButton:Search', options: {} },
|
{ name: 'Search', label: Globalize.translate('ButtonSearch'), image: 'tabButton:Search', options: {} },
|
||||||
{ name: 'NowPlaying', label: Globalize.translate('ButtonNowPlaying'), image: 'tabButton:MostViewed', options: {} },
|
{ name: 'NowPlaying', label: Globalize.translate('ButtonNowPlaying'), image: 'tabbar/tab-nowplaying.png', options: {} },
|
||||||
{ name: 'Sync', label: Globalize.translate('ButtonSync'), image: 'tabButton:Downloads', options: {} },
|
{ name: 'Sync', label: Globalize.translate('ButtonSync'), image: 'tabbar/tab-sync.png', options: {} },
|
||||||
{ name: 'Settings', label: Globalize.translate('ButtonSettings'), image: 'tabButton:More', options: {} }
|
{ name: 'Settings', label: Globalize.translate('ButtonSettings'), image: 'tabbar/tab-settings.png', options: {} }
|
||||||
];
|
];
|
||||||
|
|
||||||
for (var i = 0; i < items.length; i++) {
|
for (var i = 0; i < items.length; i++) {
|
||||||
var item = items[i];
|
var item = items[i];
|
||||||
var options = item.options;
|
TabBar.createItem(item.name, item.label, item.image, onTabSelected, item.options);
|
||||||
// set the function to invoke when the item is selected
|
|
||||||
options.onSelect = onTabSelected;
|
|
||||||
TabBar.createItem(item.name, item.label, item.image, item.options);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
TabBar.showItems();
|
TabBar.showItems();
|
||||||
|
@ -116,6 +113,8 @@
|
||||||
|
|
||||||
Events.on(ConnectionManager, 'localusersignedin', showTabs);
|
Events.on(ConnectionManager, 'localusersignedin', showTabs);
|
||||||
Events.on(ConnectionManager, 'localusersignedout', hideTabs);
|
Events.on(ConnectionManager, 'localusersignedout', hideTabs);
|
||||||
|
Events.on(ConnectionManager, 'playbackstart', onPlaybackStop);
|
||||||
|
Events.on(ConnectionManager, 'playbackstop', onPlaybackStart);
|
||||||
});
|
});
|
||||||
|
|
||||||
pageClassOn('pageshowready', "page", function () {
|
pageClassOn('pageshowready', "page", function () {
|
||||||
|
@ -130,4 +129,18 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function onPlaybackStart(e, state, player) {
|
||||||
|
|
||||||
|
if (state.NowPlayingItem && state.NowPlayingItem.MediaType == 'Video' && player.isLocalPlayer) {
|
||||||
|
hideTabs();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function onPlaybackStop(e, state, player) {
|
||||||
|
|
||||||
|
if (state.NowPlayingItem && state.NowPlayingItem.MediaType == 'Video' && player.isLocalPlayer) {
|
||||||
|
showTabs();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
})();
|
})();
|
2
dashboard-ui/cordova/registrationservices.js
vendored
2
dashboard-ui/cordova/registrationservices.js
vendored
|
@ -100,7 +100,7 @@
|
||||||
|
|
||||||
HttpClient.send({
|
HttpClient.send({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "https://mb3admin.com/test/admin/service/appstore/addDeviceFeature",
|
url: "https://mb3admin.com/admin/service/appstore/addDeviceFeature",
|
||||||
data: {
|
data: {
|
||||||
deviceId: ConnectionManager.deviceId(),
|
deviceId: ConnectionManager.deviceId(),
|
||||||
feature: 'com.mb.android.unlock'
|
feature: 'com.mb.android.unlock'
|
||||||
|
|
|
@ -1493,10 +1493,6 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
background-position: center center;
|
background-position: center center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-body-b .listItem:hover {
|
|
||||||
background-color: rgba(51,51,51,.6) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.listViewUserDataButtons {
|
.listViewUserDataButtons {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
|
@ -382,7 +382,7 @@ h2 {
|
||||||
font-weight: 500 !important;
|
font-weight: 500 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 a {
|
a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
</style>
|
</style>
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="readOnlyContent" style="margin: 0 auto;">
|
<div class="readOnlyContent" style="margin: 0 auto;">
|
||||||
<h1>${HeaderSettings}</h1>
|
<h1 class="settingsMenuHeader">${HeaderSettings}</h1>
|
||||||
<div class="paperList">
|
<div class="paperList">
|
||||||
<a href="#" class="clearLink lnkDisplayPreferences">
|
<a href="#" class="clearLink lnkDisplayPreferences">
|
||||||
<paper-icon-item>
|
<paper-icon-item>
|
||||||
|
|
|
@ -22,9 +22,9 @@
|
||||||
<div class="ehsContent" style="clear:both;">
|
<div class="ehsContent" style="clear:both;">
|
||||||
<br />
|
<br />
|
||||||
<div class="localSyncStatus hide" style="text-align:right;margin:0 0 1em;">
|
<div class="localSyncStatus hide" style="text-align:right;margin:0 0 1em;">
|
||||||
<span style="vertical-align: middle;margin-right:.5em;" class="labelSyncStatus">${LabelSyncStatus}</span>
|
<span style="vertical-align: middle;margin-right:.5em;" class="labelSyncStatus"></span>
|
||||||
<paper-spinner class="syncSpinner" active style="vertical-align: middle;"></paper-spinner>
|
<paper-spinner class="syncSpinner" active style="vertical-align: middle;"></paper-spinner>
|
||||||
<paper-fab class="btnSyncNow bottomFab" icon="sync" style="position:fixed;right:20px;background-color:#2ad;z-index:10;"></paper-fab>
|
<paper-fab class="btnSyncNow mini accent" icon="sync"></paper-fab>
|
||||||
</div>
|
</div>
|
||||||
<div class="syncActivity">
|
<div class="syncActivity">
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
function hideStatusBar() {
|
function hideStatusBar() {
|
||||||
if (options.type == 'video' && window.StatusBar) {
|
if (options.type == 'video' && window.StatusBar) {
|
||||||
StatusBar.backgroundColorByName("black");
|
//StatusBar.backgroundColorByName("black");
|
||||||
//StatusBar.overlaysWebView(true);
|
//StatusBar.overlaysWebView(true);
|
||||||
StatusBar.hide();
|
StatusBar.hide();
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,15 +143,7 @@
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
configureSwipeTabs: function (ownerpage, tabs, pages) {
|
allowSwipe: function (target) {
|
||||||
|
|
||||||
if (LibraryBrowser.animatePaperTabs()) {
|
|
||||||
// Safari doesn't handle the horizontal swiping very well
|
|
||||||
pages.entryAnimation = 'slide-from-right-animation';
|
|
||||||
pages.exitAnimation = 'slide-left-animation';
|
|
||||||
}
|
|
||||||
|
|
||||||
var pageCount = pages.querySelectorAll('neon-animatable').length;
|
|
||||||
|
|
||||||
function allowSwipeOn(elem) {
|
function allowSwipeOn(elem) {
|
||||||
|
|
||||||
|
@ -166,11 +158,7 @@
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function allowSwipe(e) {
|
var parent = target;
|
||||||
|
|
||||||
var target = e.target;
|
|
||||||
|
|
||||||
var parent = target.parentNode;
|
|
||||||
while (parent != null) {
|
while (parent != null) {
|
||||||
if (!allowSwipeOn(parent)) {
|
if (!allowSwipeOn(parent)) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -179,15 +167,25 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
configureSwipeTabs: function (ownerpage, tabs, pages) {
|
||||||
|
|
||||||
|
if (LibraryBrowser.animatePaperTabs()) {
|
||||||
|
// Safari doesn't handle the horizontal swiping very well
|
||||||
|
pages.entryAnimation = 'slide-from-right-animation';
|
||||||
|
pages.exitAnimation = 'slide-left-animation';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var pageCount = pages.querySelectorAll('neon-animatable').length;
|
||||||
|
|
||||||
require(['hammer'], function (Hammer) {
|
require(['hammer'], function (Hammer) {
|
||||||
|
|
||||||
var hammertime = new Hammer(pages);
|
var hammertime = new Hammer(pages);
|
||||||
hammertime.get('swipe').set({ direction: Hammer.DIRECTION_HORIZONTAL });
|
hammertime.get('swipe').set({ direction: Hammer.DIRECTION_HORIZONTAL });
|
||||||
|
|
||||||
hammertime.on('swipeleft', function (e) {
|
hammertime.on('swipeleft', function (e) {
|
||||||
if (allowSwipe(e)) {
|
if (LibraryBrowser.allowSwipe(e.target)) {
|
||||||
var selected = parseInt(pages.selected || '0');
|
var selected = parseInt(pages.selected || '0');
|
||||||
if (selected < (pageCount - 1)) {
|
if (selected < (pageCount - 1)) {
|
||||||
if (LibraryBrowser.animatePaperTabs()) {
|
if (LibraryBrowser.animatePaperTabs()) {
|
||||||
|
@ -200,7 +198,7 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
hammertime.on('swiperight', function (e) {
|
hammertime.on('swiperight', function (e) {
|
||||||
if (allowSwipe(e)) {
|
if (LibraryBrowser.allowSwipe(e.target)) {
|
||||||
var selected = parseInt(pages.selected || '0');
|
var selected = parseInt(pages.selected || '0');
|
||||||
if (selected > 0) {
|
if (selected > 0) {
|
||||||
if (LibraryBrowser.animatePaperTabs()) {
|
if (LibraryBrowser.animatePaperTabs()) {
|
||||||
|
|
|
@ -955,8 +955,10 @@
|
||||||
this.on('click', onListViewPlayButtonClick);
|
this.on('click', onListViewPlayButtonClick);
|
||||||
|
|
||||||
if (AppInfo.isTouchPreferred) {
|
if (AppInfo.isTouchPreferred) {
|
||||||
this.off('contextmenu', disableEvent);
|
//this.off('contextmenu', disableEvent);
|
||||||
this.on('contextmenu', disableEvent);
|
//this.on('contextmenu', disableEvent);
|
||||||
|
this.off('contextmenu', onContextMenu);
|
||||||
|
this.on('contextmenu', onContextMenu);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.off('contextmenu', onContextMenu);
|
this.off('contextmenu', onContextMenu);
|
||||||
|
@ -973,7 +975,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i = 0, length = this.length; i < length; i++) {
|
for (var i = 0, length = this.length; i < length; i++) {
|
||||||
initTapHold(this[i]);
|
//initTapHold(this[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
@ -990,6 +992,10 @@
|
||||||
|
|
||||||
function initTapHold(element) {
|
function initTapHold(element) {
|
||||||
|
|
||||||
|
if (!LibraryBrowser.allowSwipe(element)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
require(['hammer'], function (Hammer) {
|
require(['hammer'], function (Hammer) {
|
||||||
|
|
||||||
var hammertime = new Hammer(element);
|
var hammertime = new Hammer(element);
|
||||||
|
|
|
@ -249,10 +249,15 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
Events.on(player, 'playbackstop', onPlaybackStop);
|
Events.on(player, 'playbackstop', onPlaybackStop);
|
||||||
|
Events.on(player, 'playbackstart', onPlaybackStart);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function onPlaybackStart(e, state) {
|
||||||
|
$(self).trigger('playbackstart', [state, this]);
|
||||||
|
}
|
||||||
|
|
||||||
function onPlaybackStop(e, state) {
|
function onPlaybackStop(e, state) {
|
||||||
$(self).trigger('playbackstop', [state]);
|
$(self).trigger('playbackstop', [state, this]);
|
||||||
}
|
}
|
||||||
|
|
||||||
self.getPlayerInfo = function () {
|
self.getPlayerInfo = function () {
|
||||||
|
|
|
@ -13,7 +13,12 @@
|
||||||
page.querySelector('.labelSyncStatus').innerHTML = Globalize.translate('LabelLocalSyncStatusValue', status);
|
page.querySelector('.labelSyncStatus').innerHTML = Globalize.translate('LabelLocalSyncStatusValue', status);
|
||||||
page.querySelector('.syncSpinner').active = status == "Active";
|
page.querySelector('.syncSpinner').active = status == "Active";
|
||||||
|
|
||||||
page.querySelector('.btnSyncNow').disabled = status == "Active";
|
if (status == "Active") {
|
||||||
|
page.querySelector('.btnSyncNow').classList.add('hide');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
page.querySelector('.btnSyncNow').classList.remove('hide');
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
page.querySelector('.localSyncStatus').classList.add('hide');
|
page.querySelector('.localSyncStatus').classList.add('hide');
|
||||||
|
|
41
dashboard-ui/scripts/searchpage.js
Normal file
41
dashboard-ui/scripts/searchpage.js
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
(function () {
|
||||||
|
|
||||||
|
function loadSuggestions(page) {
|
||||||
|
|
||||||
|
var options = {
|
||||||
|
|
||||||
|
SortBy: "IsFavoriteOrLike,Random",
|
||||||
|
IncludeItemTypes: "Movie,Series,MusicArtist",
|
||||||
|
Limit: 20,
|
||||||
|
Recursive: true,
|
||||||
|
ImageTypeLimit: 0,
|
||||||
|
EnableImages: false
|
||||||
|
};
|
||||||
|
|
||||||
|
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
||||||
|
|
||||||
|
var html = result.Items.map(function (i) {
|
||||||
|
|
||||||
|
var href = LibraryBrowser.getHref(i);
|
||||||
|
|
||||||
|
var itemHtml = '<a href="' + href + '" style="display:block;padding:.5em 0;">';
|
||||||
|
itemHtml += i.Name;
|
||||||
|
itemHtml += '</a>';
|
||||||
|
return itemHtml;
|
||||||
|
|
||||||
|
}).join('');
|
||||||
|
|
||||||
|
page.querySelector('.searchSuggestions').innerHTML = html;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
pageIdOn('pageshowready', "searchPage", function () {
|
||||||
|
|
||||||
|
var page = this;
|
||||||
|
loadSuggestions(page);
|
||||||
|
|
||||||
|
Search.showSearchPanel();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
})();
|
|
@ -1762,6 +1762,7 @@ var AppInfo = {};
|
||||||
AppInfo.enableMovieTrailersTab = true;
|
AppInfo.enableMovieTrailersTab = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AppInfo.enableAppLayouts = true;
|
||||||
if (isCordova) {
|
if (isCordova) {
|
||||||
AppInfo.enableAppLayouts = true;
|
AppInfo.enableAppLayouts = true;
|
||||||
AppInfo.hasKnownExternalPlayerSupport = true;
|
AppInfo.hasKnownExternalPlayerSupport = true;
|
||||||
|
|
20
dashboard-ui/search.html
Normal file
20
dashboard-ui/search.html
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Emby</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="searchPage" data-role="page" data-dom-cache="true" class="page homePage libraryPage allLibraryPage noSecondaryNavPage" data-title="${ButtonSearch}" data-require="scripts/searchpage">
|
||||||
|
|
||||||
|
<div data-role="content">
|
||||||
|
<div style="text-align:center;">
|
||||||
|
|
||||||
|
<h1>${TabSuggestions}</h1>
|
||||||
|
|
||||||
|
<div class="searchSuggestions">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -61,6 +61,15 @@ body {
|
||||||
flex-grow: 0 !important;
|
flex-grow: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ui-body-b .paperList {
|
||||||
|
background-color: transparent;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settingsMenuHeader {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
@media all and (max-width: 600px) {
|
@media all and (max-width: 600px) {
|
||||||
|
|
||||||
.libraryViewNav a {
|
.libraryViewNav a {
|
||||||
|
|
|
@ -321,6 +321,10 @@ paper-fab.square {
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
paper-fab.accent {
|
||||||
|
background-color: #52B54B;
|
||||||
|
}
|
||||||
|
|
||||||
paper-slider {
|
paper-slider {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,4 @@
|
||||||
<html><head><meta charset="UTF-8"><!--
|
<html><head><meta charset="UTF-8"><!--
|
||||||
@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
|
|
||||||
--><!--
|
|
||||||
@license
|
@license
|
||||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE
|
||||||
|
@ -11408,59 +11400,27 @@ The `aria-labelledby` attribute will be set to the header element, if one exists
|
||||||
|
|
||||||
listeners: {
|
listeners: {
|
||||||
'focus': '_onFocus',
|
'focus': '_onFocus',
|
||||||
'keydown': '_onKeydown'
|
'keydown': '_onKeydown',
|
||||||
|
'iron-items-changed': '_onIronItemsChanged'
|
||||||
},
|
},
|
||||||
|
|
||||||
keyBindings: {
|
keyBindings: {
|
||||||
'up': '_onUpKey',
|
'up': '_onUpKey',
|
||||||
'down': '_onDownKey',
|
'down': '_onDownKey',
|
||||||
'esc': '_onEscKey',
|
'esc': '_onEscKey',
|
||||||
'enter': '_onEnterKey',
|
|
||||||
'shift+tab:keydown': '_onShiftTabDown'
|
'shift+tab:keydown': '_onShiftTabDown'
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateMultiselectable: function(multi) {
|
attached: function() {
|
||||||
if (multi) {
|
this._resetTabindices();
|
||||||
this.setAttribute('aria-multiselectable', 'true');
|
|
||||||
} else {
|
|
||||||
this.removeAttribute('aria-multiselectable');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_onShiftTabDown: function() {
|
|
||||||
var oldTabIndex;
|
|
||||||
|
|
||||||
Polymer.IronMenuBehaviorImpl._shiftTabPressed = true;
|
|
||||||
|
|
||||||
oldTabIndex = this.getAttribute('tabindex');
|
|
||||||
|
|
||||||
this.setAttribute('tabindex', '-1');
|
|
||||||
|
|
||||||
this.async(function() {
|
|
||||||
this.setAttribute('tabindex', oldTabIndex);
|
|
||||||
Polymer.IronMenuBehaviorImpl._shiftTabPressed = false;
|
|
||||||
// Note: polymer/polymer#1305
|
|
||||||
}, 1);
|
|
||||||
},
|
|
||||||
|
|
||||||
_applySelection: function(item, isSelected) {
|
|
||||||
if (isSelected) {
|
|
||||||
item.setAttribute('aria-selected', 'true');
|
|
||||||
} else {
|
|
||||||
item.removeAttribute('aria-selected');
|
|
||||||
}
|
|
||||||
|
|
||||||
Polymer.IronSelectableBehavior._applySelection.apply(this, arguments);
|
|
||||||
},
|
|
||||||
|
|
||||||
_focusedItemChanged: function(focusedItem, old) {
|
|
||||||
old && old.setAttribute('tabindex', '-1');
|
|
||||||
if (focusedItem) {
|
|
||||||
focusedItem.setAttribute('tabindex', '0');
|
|
||||||
focusedItem.focus();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Selects the given value. If the `multi` property is true, then the selected state of the
|
||||||
|
* `value` will be toggled; otherwise the `value` will be selected.
|
||||||
|
*
|
||||||
|
* @param {string} value the value to select.
|
||||||
|
*/
|
||||||
select: function(value) {
|
select: function(value) {
|
||||||
if (this._defaultFocusAsync) {
|
if (this._defaultFocusAsync) {
|
||||||
this.cancelAsync(this._defaultFocusAsync);
|
this.cancelAsync(this._defaultFocusAsync);
|
||||||
|
@ -11472,6 +11432,152 @@ The `aria-labelledby` attribute will be set to the header element, if one exists
|
||||||
Polymer.IronMultiSelectableBehaviorImpl.select.apply(this, arguments);
|
Polymer.IronMultiSelectableBehaviorImpl.select.apply(this, arguments);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets all tabindex attributes to the appropriate value based on the
|
||||||
|
* current selection state. The appropriate value is `0` (focusable) for
|
||||||
|
* the default selected item, and `-1` (not keyboard focusable) for all
|
||||||
|
* other items.
|
||||||
|
*/
|
||||||
|
_resetTabindices: function() {
|
||||||
|
var selectedItem = this.multi ? (this.selectedItems && this.selectedItems[0]) : this.selectedItem;
|
||||||
|
|
||||||
|
this.items.forEach(function(item) {
|
||||||
|
item.setAttribute('tabindex', item === selectedItem ? '0' : '-1');
|
||||||
|
}, this);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets appropriate ARIA based on whether or not the menu is meant to be
|
||||||
|
* multi-selectable.
|
||||||
|
*
|
||||||
|
* @param {boolean} multi True if the menu should be multi-selectable.
|
||||||
|
*/
|
||||||
|
_updateMultiselectable: function(multi) {
|
||||||
|
if (multi) {
|
||||||
|
this.setAttribute('aria-multiselectable', 'true');
|
||||||
|
} else {
|
||||||
|
this.removeAttribute('aria-multiselectable');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Given a KeyboardEvent, this method will focus the appropriate item in the
|
||||||
|
* menu (if there is a relevant item, and it is possible to focus it).
|
||||||
|
*
|
||||||
|
* @param {KeyboardEvent} event A KeyboardEvent.
|
||||||
|
*/
|
||||||
|
_focusWithKeyboardEvent: function(event) {
|
||||||
|
for (var i = 0, item; item = this.items[i]; i++) {
|
||||||
|
var attr = this.attrForItemTitle || 'textContent';
|
||||||
|
var title = item[attr] || item.getAttribute(attr);
|
||||||
|
if (title && title.trim().charAt(0).toLowerCase() === String.fromCharCode(event.keyCode).toLowerCase()) {
|
||||||
|
this._setFocusedItem(item);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Focuses the previous item (relative to the currently focused item) in the
|
||||||
|
* menu.
|
||||||
|
*/
|
||||||
|
_focusPrevious: function() {
|
||||||
|
var length = this.items.length;
|
||||||
|
var index = (Number(this.indexOf(this.focusedItem)) - 1 + length) % length;
|
||||||
|
this._setFocusedItem(this.items[index]);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Focuses the next item (relative to the currently focused item) in the
|
||||||
|
* menu.
|
||||||
|
*/
|
||||||
|
_focusNext: function() {
|
||||||
|
var index = (Number(this.indexOf(this.focusedItem)) + 1) % this.items.length;
|
||||||
|
this._setFocusedItem(this.items[index]);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mutates items in the menu based on provided selection details, so that
|
||||||
|
* all items correctly reflect selection state.
|
||||||
|
*
|
||||||
|
* @param {Element} item An item in the menu.
|
||||||
|
* @param {boolean} isSelected True if the item should be shown in a
|
||||||
|
* selected state, otherwise false.
|
||||||
|
*/
|
||||||
|
_applySelection: function(item, isSelected) {
|
||||||
|
if (isSelected) {
|
||||||
|
item.setAttribute('aria-selected', 'true');
|
||||||
|
} else {
|
||||||
|
item.removeAttribute('aria-selected');
|
||||||
|
}
|
||||||
|
|
||||||
|
Polymer.IronSelectableBehavior._applySelection.apply(this, arguments);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Discretely updates tabindex values among menu items as the focused item
|
||||||
|
* changes.
|
||||||
|
*
|
||||||
|
* @param {Element} focusedItem The element that is currently focused.
|
||||||
|
* @param {?Element} old The last element that was considered focused, if
|
||||||
|
* applicable.
|
||||||
|
*/
|
||||||
|
_focusedItemChanged: function(focusedItem, old) {
|
||||||
|
old && old.setAttribute('tabindex', '-1');
|
||||||
|
if (focusedItem) {
|
||||||
|
focusedItem.setAttribute('tabindex', '0');
|
||||||
|
focusedItem.focus();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A handler that responds to mutation changes related to the list of items
|
||||||
|
* in the menu.
|
||||||
|
*
|
||||||
|
* @param {CustomEvent} event An event containing mutation records as its
|
||||||
|
* detail.
|
||||||
|
*/
|
||||||
|
_onIronItemsChanged: function(event) {
|
||||||
|
var mutations = event.detail;
|
||||||
|
var mutation;
|
||||||
|
var index;
|
||||||
|
|
||||||
|
for (index = 0; index < mutations.length; ++index) {
|
||||||
|
mutation = mutations[index];
|
||||||
|
|
||||||
|
if (mutation.addedNodes.length) {
|
||||||
|
this._resetTabindices();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler that is called when a shift+tab keypress is detected by the menu.
|
||||||
|
*
|
||||||
|
* @param {CustomEvent} event A key combination event.
|
||||||
|
*/
|
||||||
|
_onShiftTabDown: function(event) {
|
||||||
|
var oldTabIndex;
|
||||||
|
|
||||||
|
Polymer.IronMenuBehaviorImpl._shiftTabPressed = true;
|
||||||
|
|
||||||
|
oldTabIndex = this.getAttribute('tabindex');
|
||||||
|
|
||||||
|
this.setAttribute('tabindex', '-1');
|
||||||
|
|
||||||
|
this.async(function() {
|
||||||
|
this.setAttribute('tabindex', oldTabIndex);
|
||||||
|
Polymer.IronMenuBehaviorImpl._shiftTabPressed = false;
|
||||||
|
// NOTE(cdata): polymer/polymer#1305
|
||||||
|
}, 1);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler that is called when the menu receives focus.
|
||||||
|
*
|
||||||
|
* @param {FocusEvent} event A focus event.
|
||||||
|
*/
|
||||||
_onFocus: function(event) {
|
_onFocus: function(event) {
|
||||||
if (Polymer.IronMenuBehaviorImpl._shiftTabPressed) {
|
if (Polymer.IronMenuBehaviorImpl._shiftTabPressed) {
|
||||||
return;
|
return;
|
||||||
|
@ -11493,62 +11599,48 @@ The `aria-labelledby` attribute will be set to the header element, if one exists
|
||||||
}, 100);
|
}, 100);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onUpKey: function() {
|
/**
|
||||||
|
* Handler that is called when the up key is pressed.
|
||||||
|
*
|
||||||
|
* @param {CustomEvent} event A key combination event.
|
||||||
|
*/
|
||||||
|
_onUpKey: function(event) {
|
||||||
// up and down arrows moves the focus
|
// up and down arrows moves the focus
|
||||||
this._focusPrevious();
|
this._focusPrevious();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDownKey: function() {
|
/**
|
||||||
|
* Handler that is called when the down key is pressed.
|
||||||
|
*
|
||||||
|
* @param {CustomEvent} event A key combination event.
|
||||||
|
*/
|
||||||
|
_onDownKey: function(event) {
|
||||||
this._focusNext();
|
this._focusNext();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onEscKey: function() {
|
/**
|
||||||
|
* Handler that is called when the esc key is pressed.
|
||||||
|
*
|
||||||
|
* @param {CustomEvent} event A key combination event.
|
||||||
|
*/
|
||||||
|
_onEscKey: function(event) {
|
||||||
// esc blurs the control
|
// esc blurs the control
|
||||||
this.focusedItem.blur();
|
this.focusedItem.blur();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onEnterKey: function(event) {
|
/**
|
||||||
// enter activates the item unless it is disabled
|
* Handler that is called when a keydown event is detected.
|
||||||
this._activateFocused(event.detail.keyboardEvent);
|
*
|
||||||
},
|
* @param {KeyboardEvent} event A keyboard event.
|
||||||
|
*/
|
||||||
_onKeydown: function(event) {
|
_onKeydown: function(event) {
|
||||||
if (this.keyboardEventMatchesKeys(event, 'up down esc enter')) {
|
if (this.keyboardEventMatchesKeys(event, 'up down esc')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// all other keys focus the menu item starting with that character
|
// all other keys focus the menu item starting with that character
|
||||||
this._focusWithKeyboardEvent(event);
|
this._focusWithKeyboardEvent(event);
|
||||||
},
|
|
||||||
|
|
||||||
_focusWithKeyboardEvent: function(event) {
|
|
||||||
for (var i = 0, item; item = this.items[i]; i++) {
|
|
||||||
var attr = this.attrForItemTitle || 'textContent';
|
|
||||||
var title = item[attr] || item.getAttribute(attr);
|
|
||||||
if (title && title.trim().charAt(0).toLowerCase() === String.fromCharCode(event.keyCode).toLowerCase()) {
|
|
||||||
this._setFocusedItem(item);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_activateFocused: function(event) {
|
|
||||||
if (!this.focusedItem.hasAttribute('disabled')) {
|
|
||||||
this._activateHandler(event);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_focusPrevious: function() {
|
|
||||||
var length = this.items.length;
|
|
||||||
var index = (Number(this.indexOf(this.focusedItem)) - 1 + length) % length;
|
|
||||||
this._setFocusedItem(this.items[index]);
|
|
||||||
},
|
|
||||||
|
|
||||||
_focusNext: function() {
|
|
||||||
var index = (Number(this.indexOf(this.focusedItem)) + 1) % this.items.length;
|
|
||||||
this._setFocusedItem(this.items[index]);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Polymer.IronMenuBehaviorImpl._shiftTabPressed = false;
|
Polymer.IronMenuBehaviorImpl._shiftTabPressed = false;
|
||||||
|
@ -11580,11 +11672,13 @@ The `aria-labelledby` attribute will be set to the header element, if one exists
|
||||||
},
|
},
|
||||||
|
|
||||||
_onUpKey: function(event) {
|
_onUpKey: function(event) {
|
||||||
this._activateFocused(event.detail.keyboardEvent);
|
this.focusedItem.click();
|
||||||
|
event.detail.keyboardEvent.preventDefault();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDownKey: function(event) {
|
_onDownKey: function(event) {
|
||||||
this._activateFocused(event.detail.keyboardEvent);
|
this.focusedItem.click();
|
||||||
|
event.detail.keyboardEvent.preventDefault();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onLeftKey: function() {
|
_onLeftKey: function() {
|
||||||
|
@ -11596,7 +11690,7 @@ The `aria-labelledby` attribute will be set to the header element, if one exists
|
||||||
},
|
},
|
||||||
|
|
||||||
_onKeydown: function(event) {
|
_onKeydown: function(event) {
|
||||||
if (this.keyboardEventMatchesKeys(event, 'up down left right esc enter')) {
|
if (this.keyboardEventMatchesKeys(event, 'up down left right esc')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18799,19 +18893,9 @@ paper-ripple {
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</dom-module>
|
</dom-module>
|
||||||
<dom-module id="paper-icon-item" assetpath="bower_components/paper-item/">
|
<dom-module id="paper-item-shared-styles" assetpath="bower_components/paper-item/">
|
||||||
|
<template>
|
||||||
<style>
|
<style>
|
||||||
/*
|
|
||||||
@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 {
|
:host {
|
||||||
display: block;
|
display: block;
|
||||||
min-height: var(--paper-item-min-height, 48px);
|
min-height: var(--paper-item-min-height, 48px);
|
||||||
|
@ -18821,11 +18905,13 @@ paper-ripple {
|
||||||
:host > ::content > *:not(:first-child):not(:last-child) {
|
:host > ::content > *:not(:first-child):not(:last-child) {
|
||||||
margin-right: 16px;
|
margin-right: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
</template>
|
||||||
|
</dom-module>
|
||||||
|
<dom-module id="paper-icon-item" assetpath="bower_components/paper-item/">
|
||||||
|
<template>
|
||||||
|
<style include="paper-item-shared-styles"></style>
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
:host {
|
:host {
|
||||||
@apply(--layout-horizontal);
|
@apply(--layout-horizontal);
|
||||||
@apply(--layout-center);
|
@apply(--layout-center);
|
||||||
|
@ -18838,39 +18924,33 @@ paper-ripple {
|
||||||
.content-icon {
|
.content-icon {
|
||||||
width: var(--paper-item-icon-width, 56px);
|
width: var(--paper-item-icon-width, 56px);
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<template>
|
|
||||||
<div id="contentIcon" class="content-icon layout horizontal center">
|
<div id="contentIcon" class="content-icon layout horizontal center">
|
||||||
<content select="[item-icon]"></content>
|
<content select="[item-icon]"></content>
|
||||||
</div>
|
</div>
|
||||||
<content></content>
|
<content></content>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</dom-module>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
(function() {
|
|
||||||
|
|
||||||
Polymer({
|
Polymer({
|
||||||
|
|
||||||
is: 'paper-icon-item',
|
is: 'paper-icon-item',
|
||||||
|
|
||||||
hostAttributes: {
|
hostAttributes: {
|
||||||
'role': 'listitem'
|
'role': 'listitem',
|
||||||
}
|
'tabindex': '0'
|
||||||
|
},
|
||||||
|
|
||||||
|
behaviors: [
|
||||||
|
Polymer.IronControlState,
|
||||||
|
Polymer.IronButtonState
|
||||||
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
})();
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
</dom-module>
|
||||||
<dom-module id="paper-item-body" assetpath="bower_components/paper-item/">
|
<dom-module id="paper-item-body" assetpath="bower_components/paper-item/">
|
||||||
|
<template>
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
:host {
|
:host {
|
||||||
overflow: hidden; /* needed for text-overflow: ellipsis to work on ff */
|
overflow: hidden; /* needed for text-overflow: ellipsis to work on ff */
|
||||||
@apply(--layout-vertical);
|
@apply(--layout-vertical);
|
||||||
|
@ -18898,29 +18978,17 @@ paper-ripple {
|
||||||
|
|
||||||
@apply(--paper-item-body-secondary);
|
@apply(--paper-item-body-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<template>
|
|
||||||
<content></content>
|
<content></content>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</dom-module>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
(function() {
|
|
||||||
|
|
||||||
Polymer({
|
Polymer({
|
||||||
|
|
||||||
is: 'paper-item-body'
|
is: 'paper-item-body'
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
})();
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
</dom-module>
|
||||||
<dom-module id="paper-radio-button" assetpath="bower_components/paper-radio-button/">
|
<dom-module id="paper-radio-button" assetpath="bower_components/paper-radio-button/">
|
||||||
<template>
|
<template>
|
||||||
<style>
|
<style>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue