diff --git a/dashboard-ui/bower_components/iron-menu-behavior/.bower.json b/dashboard-ui/bower_components/iron-menu-behavior/.bower.json index 7b53ecc860..a7ca74371c 100644 --- a/dashboard-ui/bower_components/iron-menu-behavior/.bower.json +++ b/dashboard-ui/bower_components/iron-menu-behavior/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-menu-behavior", - "version": "1.0.3", + "version": "1.0.4", "description": "Provides accessible menu behavior", "authors": "The Polymer Authors", "keywords": [ @@ -30,11 +30,11 @@ "web-component-tester": "*", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "_release": "1.0.3", + "_release": "1.0.4", "_resolution": { "type": "version", - "tag": "v1.0.3", - "commit": "04cc87b1f6551383b1896f13df24ff1d01a9796f" + "tag": "v1.0.4", + "commit": "4ea050f534e5c418f901d432116762d0c7cb65dd" }, "_source": "git://github.com/polymerelements/iron-menu-behavior.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/iron-menu-behavior/bower.json b/dashboard-ui/bower_components/iron-menu-behavior/bower.json index 123191c196..e5de436b9c 100644 --- a/dashboard-ui/bower_components/iron-menu-behavior/bower.json +++ b/dashboard-ui/bower_components/iron-menu-behavior/bower.json @@ -1,6 +1,6 @@ { "name": "iron-menu-behavior", - "version": "1.0.3", + "version": "1.0.4", "description": "Provides accessible menu behavior", "authors": "The Polymer Authors", "keywords": [ diff --git a/dashboard-ui/bower_components/iron-menu-behavior/demo/index.html b/dashboard-ui/bower_components/iron-menu-behavior/demo/index.html index 8148abb1fc..d7379a139b 100644 --- a/dashboard-ui/bower_components/iron-menu-behavior/demo/index.html +++ b/dashboard-ui/bower_components/iron-menu-behavior/demo/index.html @@ -31,17 +31,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN width: 100%; } - simple-menu li { + simple-menu a { display: block; - padding: 15px 20px; } - simple-menubar li { + simple-menubar a, + simple-menu a { padding: 15px 20px; + color: var(--primary-text-color); + text-decoration: none; } - simple-menu li[disabled], - simple-menubar li[disabled] { + simple-menu a[disabled], + simple-menubar a[disabled] { color: var(--google-grey-300); } @@ -55,17 +57,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN } - +

Simple menu

-
  • item 0
  • -
  • item 1
  • -
  • item 2
  • -
  • item 3
  • + Item 0 + Item 1 + Item 2 + Item 3
    @@ -74,10 +76,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN

    Multi-select menu

    -
  • item 0
  • -
  • item 1
  • -
  • item 2
  • -
  • item 3
  • + Item 0 + Item 1 + Item 2 + Item 3
    @@ -87,10 +89,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN

    Simple menubar

    -
  • item 0
  • -
  • item 1
  • -
  • item 2
  • -
  • item 3
  • + Item 0 + Item 1 + Item 2 + Item 3
    @@ -98,10 +100,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN

    Multi-select menubar

    -
  • item 0
  • -
  • item 1
  • -
  • item 2
  • -
  • item 3
  • + Item 0 + Item 1 + Item 2 + Item 3
    diff --git a/dashboard-ui/bower_components/iron-menu-behavior/iron-menu-behavior.html b/dashboard-ui/bower_components/iron-menu-behavior/iron-menu-behavior.html index 93845aace6..c83a4c7d2e 100644 --- a/dashboard-ui/bower_components/iron-menu-behavior/iron-menu-behavior.html +++ b/dashboard-ui/bower_components/iron-menu-behavior/iron-menu-behavior.html @@ -55,59 +55,27 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN listeners: { 'focus': '_onFocus', - 'keydown': '_onKeydown' + 'keydown': '_onKeydown', + 'iron-items-changed': '_onIronItemsChanged' }, keyBindings: { 'up': '_onUpKey', 'down': '_onDownKey', 'esc': '_onEscKey', - 'enter': '_onEnterKey', 'shift+tab:keydown': '_onShiftTabDown' }, - _updateMultiselectable: function(multi) { - if (multi) { - 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(); - } + attached: function() { + this._resetTabindices(); }, + /** + * 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) { if (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); }, + /** + * 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) { if (Polymer.IronMenuBehaviorImpl._shiftTabPressed) { return; @@ -140,62 +254,48 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, 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 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(); }, - _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 this.focusedItem.blur(); }, - _onEnterKey: function(event) { - // enter activates the item unless it is disabled - this._activateFocused(event.detail.keyboardEvent); - }, - + /** + * Handler that is called when a keydown event is detected. + * + * @param {KeyboardEvent} event A keyboard event. + */ _onKeydown: function(event) { - if (this.keyboardEventMatchesKeys(event, 'up down esc enter')) { + if (this.keyboardEventMatchesKeys(event, 'up down esc')) { return; } // all other keys focus the menu item starting with that character 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; diff --git a/dashboard-ui/bower_components/iron-menu-behavior/iron-menubar-behavior.html b/dashboard-ui/bower_components/iron-menu-behavior/iron-menubar-behavior.html index e25304a5ec..dc707a7053 100644 --- a/dashboard-ui/bower_components/iron-menu-behavior/iron-menubar-behavior.html +++ b/dashboard-ui/bower_components/iron-menu-behavior/iron-menubar-behavior.html @@ -30,11 +30,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, _onUpKey: function(event) { - this._activateFocused(event.detail.keyboardEvent); + this.focusedItem.click(); + event.detail.keyboardEvent.preventDefault(); }, _onDownKey: function(event) { - this._activateFocused(event.detail.keyboardEvent); + this.focusedItem.click(); + event.detail.keyboardEvent.preventDefault(); }, _onLeftKey: function() { @@ -46,7 +48,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, _onKeydown: function(event) { - if (this.keyboardEventMatchesKeys(event, 'up down left right esc enter')) { + if (this.keyboardEventMatchesKeys(event, 'up down left right esc')) { return; } diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json b/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json index 4c2d96b1f1..1d4238574e 100644 --- a/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json +++ b/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json @@ -34,14 +34,14 @@ "web-component-tester": "*", "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", "_resolution": { "type": "version", "tag": "v1.0.6", "commit": "9c77f077f4181b6f03cc986d0f3c224094edbc2d" }, - "_source": "git://github.com/PolymerElements/iron-overlay-behavior.git", + "_source": "git://github.com/polymerelements/iron-overlay-behavior.git", "_target": "^1.0.0", - "_originalSource": "PolymerElements/iron-overlay-behavior" + "_originalSource": "polymerelements/iron-overlay-behavior" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/neon-animation/.bower.json b/dashboard-ui/bower_components/neon-animation/.bower.json index 16a4ffdfce..ef68d27d08 100644 --- a/dashboard-ui/bower_components/neon-animation/.bower.json +++ b/dashboard-ui/bower_components/neon-animation/.bower.json @@ -54,7 +54,7 @@ "tag": "v1.0.6", "commit": "ec51bf68f05c40373536cc726ca674e4549b7db2" }, - "_source": "git://github.com/PolymerElements/neon-animation.git", + "_source": "git://github.com/polymerelements/neon-animation.git", "_target": "^1.0.0", - "_originalSource": "PolymerElements/neon-animation" + "_originalSource": "polymerelements/neon-animation" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-item/.bower.json b/dashboard-ui/bower_components/paper-item/.bower.json index 436c653b5f..3cb35354c0 100644 --- a/dashboard-ui/bower_components/paper-item/.bower.json +++ b/dashboard-ui/bower_components/paper-item/.bower.json @@ -1,6 +1,6 @@ { "name": "paper-item", - "version": "1.0.2", + "version": "1.0.3", "description": "A material-design styled list item", "authors": [ "The Polymer Authors" @@ -24,27 +24,28 @@ "homepage": "https://github.com/PolymerElements/paper-item", "ignore": [], "dependencies": { + "polymer": "Polymer/polymer#^1.1.0", "paper-styles": "PolymerElements/paper-styles#^1.0.0", - "polymer": "Polymer/polymer#^1.0.0" + "iron-behaviors": "polymerelements/iron-behaviors#^1.0.0" }, "devDependencies": { + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", "iron-icon": "PolymerElements/iron-icon#^1.0.0", "iron-icons": "PolymerElements/iron-icons#^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", - "iron-component-page": "PolymerElements/iron-component-page#^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" }, - "_release": "1.0.2", + "_release": "1.0.3", "_resolution": { "type": "version", - "tag": "v1.0.2", - "commit": "209d000bd2e99d9b31cfc996bbc5b0fc554be21d" + "tag": "v1.0.3", + "commit": "52ca8cf95ed34f265a6208def81dae9189330ad6" }, "_source": "git://github.com/PolymerElements/paper-item.git", "_target": "~1.0.2", - "_originalSource": "PolymerElements/paper-item", - "_direct": true + "_originalSource": "PolymerElements/paper-item" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-item/bower.json b/dashboard-ui/bower_components/paper-item/bower.json index bbfec78456..c709eedc92 100644 --- a/dashboard-ui/bower_components/paper-item/bower.json +++ b/dashboard-ui/bower_components/paper-item/bower.json @@ -1,6 +1,6 @@ { "name": "paper-item", - "version": "1.0.2", + "version": "1.0.3", "description": "A material-design styled list item", "authors": [ "The Polymer Authors" @@ -24,17 +24,19 @@ "homepage": "https://github.com/PolymerElements/paper-item", "ignore": [], "dependencies": { + "polymer": "Polymer/polymer#^1.1.0", "paper-styles": "PolymerElements/paper-styles#^1.0.0", - "polymer": "Polymer/polymer#^1.0.0" + "iron-behaviors": "polymerelements/iron-behaviors#^1.0.0" }, "devDependencies": { + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", "iron-icon": "PolymerElements/iron-icon#^1.0.0", "iron-icons": "PolymerElements/iron-icons#^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", - "iron-component-page": "PolymerElements/iron-component-page#^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" } } diff --git a/dashboard-ui/bower_components/paper-item/demo/index.html b/dashboard-ui/bower_components/paper-item/demo/index.html index 88dab60bf6..5e2c0e1148 100644 --- a/dashboard-ui/bower_components/paper-item/demo/index.html +++ b/dashboard-ui/bower_components/paper-item/demo/index.html @@ -23,6 +23,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + @@ -77,7 +78,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN

    Single line items

    -
    +
    Inbox Starred Sent mail @@ -87,7 +88,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN

    Icon with text

    -
    +
    Inbox @@ -105,7 +106,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN

    Avatar with text

    -
    +
    Alphonso Engelking
    @@ -123,7 +124,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN

    Avatar with text and icon

    -
    +
    Alphonso
    @@ -149,7 +150,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN

    Avatar with text and control

    -
    +
    Alphonso
    @@ -175,7 +176,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN

    Control with text and icon

    -
    +
    Alphonso
    @@ -201,7 +202,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN

    Two-line items

    -
    +
    Profile Photo
    @@ -225,7 +226,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN

    Icon with two-line text

    -
    +
    @@ -253,14 +254,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN

    Avatar with text and icon

    -
    +
    Photos
    Jan 9, 2014
    - +
    @@ -268,7 +269,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
    Recipes
    Jan 17, 2014
    - +
    @@ -276,7 +277,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
    Work
    Jan 28, 2014
    - +
    diff --git a/dashboard-ui/bower_components/paper-item/paper-icon-item.html b/dashboard-ui/bower_components/paper-item/paper-icon-item.html index 231159c09f..a2e48f4d14 100644 --- a/dashboard-ui/bower_components/paper-item/paper-icon-item.html +++ b/dashboard-ui/bower_components/paper-item/paper-icon-item.html @@ -9,7 +9,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN --> + + + - - - - - + - - diff --git a/dashboard-ui/bower_components/paper-item/paper-item-body.html b/dashboard-ui/bower_components/paper-item/paper-item-body.html index 6345830c13..966244efaa 100644 --- a/dashboard-ui/bower_components/paper-item/paper-item-body.html +++ b/dashboard-ui/bower_components/paper-item/paper-item-body.html @@ -1,11 +1,11 @@ @@ -38,56 +38,43 @@ Custom property | Description | Default --> - - - + - - diff --git a/dashboard-ui/bower_components/paper-item/paper-item-shared-styles.html b/dashboard-ui/bower_components/paper-item/paper-item-shared-styles.html new file mode 100644 index 0000000000..d35ded90c2 --- /dev/null +++ b/dashboard-ui/bower_components/paper-item/paper-item-shared-styles.html @@ -0,0 +1,25 @@ + + + + + diff --git a/dashboard-ui/bower_components/paper-item/paper-item-shared.css b/dashboard-ui/bower_components/paper-item/paper-item-shared.css deleted file mode 100644 index 8528d1a2a7..0000000000 --- a/dashboard-ui/bower_components/paper-item/paper-item-shared.css +++ /dev/null @@ -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; -} diff --git a/dashboard-ui/bower_components/paper-item/paper-item.html b/dashboard-ui/bower_components/paper-item/paper-item.html index 50b89fee43..a9471ff3fa 100644 --- a/dashboard-ui/bower_components/paper-item/paper-item.html +++ b/dashboard-ui/bower_components/paper-item/paper-item.html @@ -9,8 +9,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN --> - + + + - - - - - + - - diff --git a/dashboard-ui/bower_components/paper-item/test/paper-item.html b/dashboard-ui/bower_components/paper-item/test/paper-item.html index 3c77ce3040..053d6579f9 100644 --- a/dashboard-ui/bower_components/paper-item/test/paper-item.html +++ b/dashboard-ui/bower_components/paper-item/test/paper-item.html @@ -31,13 +31,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN @@ -47,8 +51,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN var item, iconItem; setup(function() { - item = fixture('item'); - iconItem = fixture('iconItem'); + item = fixture('item').querySelector('paper-item'); + iconItem = fixture('iconItem').querySelector('paper-icon-item'); }); 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() { assert.equal(iconItem.getAttribute('role'), 'listitem', 'has role="item"'); }); + + a11ySuite('item'); + a11ySuite('iconItem'); }); diff --git a/dashboard-ui/bower_components/paper-ripple/.bower.json b/dashboard-ui/bower_components/paper-ripple/.bower.json index c9e9b86273..d289efd9cf 100644 --- a/dashboard-ui/bower_components/paper-ripple/.bower.json +++ b/dashboard-ui/bower_components/paper-ripple/.bower.json @@ -30,14 +30,14 @@ "web-component-tester": "*", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "homepage": "https://github.com/PolymerElements/paper-ripple", + "homepage": "https://github.com/polymerelements/paper-ripple", "_release": "1.0.2", "_resolution": { "type": "version", "tag": "v1.0.2", "commit": "b546dbe6ad0b1f58cac80caec3136cf3232e12fc" }, - "_source": "git://github.com/PolymerElements/paper-ripple.git", + "_source": "git://github.com/polymerelements/paper-ripple.git", "_target": "^1.0.0", - "_originalSource": "PolymerElements/paper-ripple" + "_originalSource": "polymerelements/paper-ripple" } \ No newline at end of file diff --git a/dashboard-ui/cordova/ios/tabbar.js b/dashboard-ui/cordova/ios/tabbar.js index 141de84195..ff76bbc250 100644 --- a/dashboard-ui/cordova/ios/tabbar.js +++ b/dashboard-ui/cordova/ios/tabbar.js @@ -18,7 +18,7 @@ Dashboard.navigate('index.html'); break; case 'Search': - Dashboard.navigate('index.html'); + Dashboard.navigate('search.html'); break; case 'NowPlaying': Dashboard.navigate('nowplaying.html'); @@ -69,19 +69,16 @@ var items = [ { 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: 'NowPlaying', label: Globalize.translate('ButtonNowPlaying'), image: 'tabButton:MostViewed', options: {} }, - { name: 'Sync', label: Globalize.translate('ButtonSync'), image: 'tabButton:Downloads', options: {} }, - { name: 'Settings', label: Globalize.translate('ButtonSettings'), image: 'tabButton:More', options: {} } + { name: 'NowPlaying', label: Globalize.translate('ButtonNowPlaying'), image: 'tabbar/tab-nowplaying.png', options: {} }, + { name: 'Sync', label: Globalize.translate('ButtonSync'), image: 'tabbar/tab-sync.png', options: {} }, + { name: 'Settings', label: Globalize.translate('ButtonSettings'), image: 'tabbar/tab-settings.png', options: {} } ]; for (var i = 0; i < items.length; i++) { var item = items[i]; - var options = 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.createItem(item.name, item.label, item.image, onTabSelected, item.options); }; TabBar.showItems(); @@ -116,6 +113,8 @@ Events.on(ConnectionManager, 'localusersignedin', showTabs); Events.on(ConnectionManager, 'localusersignedout', hideTabs); + Events.on(ConnectionManager, 'playbackstart', onPlaybackStop); + Events.on(ConnectionManager, 'playbackstop', onPlaybackStart); }); 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(); + } + } + })(); \ No newline at end of file diff --git a/dashboard-ui/cordova/registrationservices.js b/dashboard-ui/cordova/registrationservices.js index 8a2cab90c3..4685d11f74 100644 --- a/dashboard-ui/cordova/registrationservices.js +++ b/dashboard-ui/cordova/registrationservices.js @@ -100,7 +100,7 @@ HttpClient.send({ type: "POST", - url: "https://mb3admin.com/test/admin/service/appstore/addDeviceFeature", + url: "https://mb3admin.com/admin/service/appstore/addDeviceFeature", data: { deviceId: ConnectionManager.deviceId(), feature: 'com.mb.android.unlock' diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 27725d5341..ca1b08f0b4 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -1,4 +1,4 @@ -.hidingAnimatedTab{ +.hidingAnimatedTab { visibility: hidden; } @@ -1212,17 +1212,17 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { line-height: 1; } -.alphabetPicker a { - display: block; - text-decoration: none; - padding: 1px 5px 1px 10px; - font-weight: 500; -} - - .alphabetPicker a:not(.selectedCharacter) { - color: #bbb !important; + .alphabetPicker a { + display: block; + text-decoration: none; + padding: 1px 5px 1px 10px; + font-weight: 500; } + .alphabetPicker a:not(.selectedCharacter) { + color: #bbb !important; + } + .selectedCharacter { color: #4d90fe !important; @@ -1493,10 +1493,6 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { background-position: center center; } -.ui-body-b .listItem:hover { - background-color: rgba(51,51,51,.6) !important; -} - .listViewUserDataButtons { visibility: hidden; } diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index 0e8f96859f..85d724adbc 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -382,7 +382,7 @@ h2 { font-weight: 500 !important; } -h1 a { +a { text-decoration: none; } diff --git a/dashboard-ui/mypreferencesmenu.html b/dashboard-ui/mypreferencesmenu.html index eef6a7bfd4..3b7fde43fe 100644 --- a/dashboard-ui/mypreferencesmenu.html +++ b/dashboard-ui/mypreferencesmenu.html @@ -26,7 +26,7 @@
    -

    ${HeaderSettings}

    +

    ${HeaderSettings}

    diff --git a/dashboard-ui/mysync.html b/dashboard-ui/mysync.html index ac236572a6..6a6aeee395 100644 --- a/dashboard-ui/mysync.html +++ b/dashboard-ui/mysync.html @@ -22,9 +22,9 @@

    - ${LabelSyncStatus} + - +
    diff --git a/dashboard-ui/scripts/htmlmediarenderer.js b/dashboard-ui/scripts/htmlmediarenderer.js index 5038cc6466..7f5d619a4b 100644 --- a/dashboard-ui/scripts/htmlmediarenderer.js +++ b/dashboard-ui/scripts/htmlmediarenderer.js @@ -11,7 +11,7 @@ function hideStatusBar() { if (options.type == 'video' && window.StatusBar) { - StatusBar.backgroundColorByName("black"); + //StatusBar.backgroundColorByName("black"); //StatusBar.overlaysWebView(true); StatusBar.hide(); } diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index 3ffbaccf3e..f61089e967 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -143,15 +143,7 @@ return false; }, - 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; + allowSwipe: function (target) { function allowSwipeOn(elem) { @@ -166,28 +158,34 @@ return true; } - function allowSwipe(e) { - - var target = e.target; - - var parent = target.parentNode; - while (parent != null) { - if (!allowSwipeOn(parent)) { - return false; - } - parent = parent.parentNode; + var parent = target; + while (parent != null) { + if (!allowSwipeOn(parent)) { + return false; } - - return true; + parent = parent.parentNode; } + 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) { var hammertime = new Hammer(pages); hammertime.get('swipe').set({ direction: Hammer.DIRECTION_HORIZONTAL }); hammertime.on('swipeleft', function (e) { - if (allowSwipe(e)) { + if (LibraryBrowser.allowSwipe(e.target)) { var selected = parseInt(pages.selected || '0'); if (selected < (pageCount - 1)) { if (LibraryBrowser.animatePaperTabs()) { @@ -200,7 +198,7 @@ }); hammertime.on('swiperight', function (e) { - if (allowSwipe(e)) { + if (LibraryBrowser.allowSwipe(e.target)) { var selected = parseInt(pages.selected || '0'); if (selected > 0) { if (LibraryBrowser.animatePaperTabs()) { diff --git a/dashboard-ui/scripts/librarylist.js b/dashboard-ui/scripts/librarylist.js index 5f6b2c258e..fbbe49a078 100644 --- a/dashboard-ui/scripts/librarylist.js +++ b/dashboard-ui/scripts/librarylist.js @@ -955,8 +955,10 @@ this.on('click', onListViewPlayButtonClick); if (AppInfo.isTouchPreferred) { - this.off('contextmenu', disableEvent); - this.on('contextmenu', disableEvent); + //this.off('contextmenu', disableEvent); + //this.on('contextmenu', disableEvent); + this.off('contextmenu', onContextMenu); + this.on('contextmenu', onContextMenu); } else { this.off('contextmenu', onContextMenu); @@ -973,7 +975,7 @@ } for (var i = 0, length = this.length; i < length; i++) { - initTapHold(this[i]); + //initTapHold(this[i]); } return this; @@ -990,6 +992,10 @@ function initTapHold(element) { + if (!LibraryBrowser.allowSwipe(element)) { + return; + } + require(['hammer'], function (Hammer) { var hammertime = new Hammer(element); diff --git a/dashboard-ui/scripts/mediacontroller.js b/dashboard-ui/scripts/mediacontroller.js index 71b43cbbc1..7dfaf4cf97 100644 --- a/dashboard-ui/scripts/mediacontroller.js +++ b/dashboard-ui/scripts/mediacontroller.js @@ -249,10 +249,15 @@ } Events.on(player, 'playbackstop', onPlaybackStop); + Events.on(player, 'playbackstart', onPlaybackStart); }; + function onPlaybackStart(e, state) { + $(self).trigger('playbackstart', [state, this]); + } + function onPlaybackStop(e, state) { - $(self).trigger('playbackstop', [state]); + $(self).trigger('playbackstop', [state, this]); } self.getPlayerInfo = function () { diff --git a/dashboard-ui/scripts/mysync.js b/dashboard-ui/scripts/mysync.js index 572fbb3e98..2e530fc5e2 100644 --- a/dashboard-ui/scripts/mysync.js +++ b/dashboard-ui/scripts/mysync.js @@ -13,7 +13,12 @@ page.querySelector('.labelSyncStatus').innerHTML = Globalize.translate('LabelLocalSyncStatusValue', status); 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 { page.querySelector('.localSyncStatus').classList.add('hide'); diff --git a/dashboard-ui/scripts/searchpage.js b/dashboard-ui/scripts/searchpage.js new file mode 100644 index 0000000000..42c4b3a4fe --- /dev/null +++ b/dashboard-ui/scripts/searchpage.js @@ -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 = ''; + itemHtml += i.Name; + itemHtml += ''; + return itemHtml; + + }).join(''); + + page.querySelector('.searchSuggestions').innerHTML = html; + }); + } + + pageIdOn('pageshowready', "searchPage", function () { + + var page = this; + loadSuggestions(page); + + Search.showSearchPanel(); + }); + + +})(); \ No newline at end of file diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 338bf282d2..1eb6b9701b 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1762,6 +1762,7 @@ var AppInfo = {}; AppInfo.enableMovieTrailersTab = true; } + AppInfo.enableAppLayouts = true; if (isCordova) { AppInfo.enableAppLayouts = true; AppInfo.hasKnownExternalPlayerSupport = true; diff --git a/dashboard-ui/search.html b/dashboard-ui/search.html new file mode 100644 index 0000000000..151bad2193 --- /dev/null +++ b/dashboard-ui/search.html @@ -0,0 +1,20 @@ + + + + Emby + + +
    + +
    +
    + +

    ${TabSuggestions}

    + +
    +
    +
    +
    +
    + + diff --git a/dashboard-ui/themes/ios.css b/dashboard-ui/themes/ios.css index 982e94d2c4..5476741d58 100644 --- a/dashboard-ui/themes/ios.css +++ b/dashboard-ui/themes/ios.css @@ -61,6 +61,15 @@ body { flex-grow: 0 !important; } +.ui-body-b .paperList { + background-color: transparent; + box-shadow: none; +} + +.settingsMenuHeader { + display: none; +} + @media all and (max-width: 600px) { .libraryViewNav a { diff --git a/dashboard-ui/thirdparty/paper-button-style.css b/dashboard-ui/thirdparty/paper-button-style.css index 3e76ba1667..c0ec7b2764 100644 --- a/dashboard-ui/thirdparty/paper-button-style.css +++ b/dashboard-ui/thirdparty/paper-button-style.css @@ -321,6 +321,10 @@ paper-fab.square { border-radius: 5px; } +paper-fab.accent { + background-color: #52B54B; +} + paper-slider { width: 100%; } diff --git a/dashboard-ui/vulcanize-out.html b/dashboard-ui/vulcanize-out.html index 4463053fe0..57203acda3 100644 --- a/dashboard-ui/vulcanize-out.html +++ b/dashboard-ui/vulcanize-out.html @@ -1,12 +1,4 @@