From b43d55182d91d0a48346f9a1f9c064086b0d7125 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 17 Feb 2016 16:24:01 -0500 Subject: [PATCH 01/25] update device discovery --- .../bower_components/emby-webcomponents/.bower.json | 8 ++++---- .../emby-webcomponents/loading/loading.css | 4 ++-- .../paperdialoghelper/paperdialoghelper.js | 2 +- dashboard-ui/bower_components/polymer/.bower.json | 6 +++--- .../components/collectioneditor/collectioneditor.js | 2 +- dashboard-ui/components/metadataeditor/metadataeditor.js | 9 +++++++++ dashboard-ui/components/playlisteditor/playlisteditor.js | 2 +- .../subtitleeditor/subtitleeditor.template.html | 2 +- dashboard-ui/itemdetails.html | 1 + 9 files changed, 23 insertions(+), 13 deletions(-) diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index 313dceeb83..5d739f749c 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -15,12 +15,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.0.83", - "_release": "1.0.83", + "version": "1.0.84", + "_release": "1.0.84", "_resolution": { "type": "version", - "tag": "1.0.83", - "commit": "2d07f1da3ed23cf12b40ed2639e42dd737eb83fd" + "tag": "1.0.84", + "commit": "8a8bc2b228f290e1e5616eba205bcd6f117167e2" }, "_source": "git://github.com/MediaBrowser/emby-webcomponents.git", "_target": "~1.0.0", diff --git a/dashboard-ui/bower_components/emby-webcomponents/loading/loading.css b/dashboard-ui/bower_components/emby-webcomponents/loading/loading.css index ca42d00614..e9638958ee 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/loading/loading.css +++ b/dashboard-ui/bower_components/emby-webcomponents/loading/loading.css @@ -1,8 +1,8 @@ .docspinner { margin-top: -4vh; margin-left: -4vh; - width: 8vh; - height: 8vh; + width: 7vh; + height: 7vh; position: fixed; top: 50%; left: 50%; diff --git a/dashboard-ui/bower_components/emby-webcomponents/paperdialoghelper/paperdialoghelper.js b/dashboard-ui/bower_components/emby-webcomponents/paperdialoghelper/paperdialoghelper.js index 8835931352..5f63113dd4 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/paperdialoghelper/paperdialoghelper.js +++ b/dashboard-ui/bower_components/emby-webcomponents/paperdialoghelper/paperdialoghelper.js @@ -136,7 +136,7 @@ // but not needed here since this is already on top of an existing dialog // but skip it in IE because it's causing the entire browser to hang // Also have to disable for firefox because it's causing select elements to not be clickable - if (!browser.msie && !browser.firefox && options.modal !== false) { + if (options.modal !== false) { dlg.setAttribute('modal', 'modal'); } diff --git a/dashboard-ui/bower_components/polymer/.bower.json b/dashboard-ui/bower_components/polymer/.bower.json index 01365c0ce5..b152935123 100644 --- a/dashboard-ui/bower_components/polymer/.bower.json +++ b/dashboard-ui/bower_components/polymer/.bower.json @@ -26,14 +26,14 @@ "web-component-tester": "*" }, "private": true, - "homepage": "https://github.com/Polymer/polymer", + "homepage": "https://github.com/polymer/polymer", "_release": "1.2.4", "_resolution": { "type": "version", "tag": "v1.2.4", "commit": "284332a905ddd60eab11901a82ac037976175cf8" }, - "_source": "git://github.com/Polymer/polymer.git", + "_source": "git://github.com/polymer/polymer.git", "_target": "^1.0.0", - "_originalSource": "Polymer/polymer" + "_originalSource": "polymer/polymer" } \ No newline at end of file diff --git a/dashboard-ui/components/collectioneditor/collectioneditor.js b/dashboard-ui/components/collectioneditor/collectioneditor.js index 834d822600..a3078bd040 100644 --- a/dashboard-ui/components/collectioneditor/collectioneditor.js +++ b/dashboard-ui/components/collectioneditor/collectioneditor.js @@ -122,7 +122,7 @@ html += '
'; html += '
'; - html += ''; + html += ''; html += ''; html += '
'; diff --git a/dashboard-ui/components/metadataeditor/metadataeditor.js b/dashboard-ui/components/metadataeditor/metadataeditor.js index 0db81a2718..7dccc9b700 100644 --- a/dashboard-ui/components/metadataeditor/metadataeditor.js +++ b/dashboard-ui/components/metadataeditor/metadataeditor.js @@ -342,6 +342,12 @@ var items = []; + items.push({ + name: Globalize.translate('ButtonEditImages'), + id: 'images', + ironIcon: 'photo' + }); + items.push({ name: Globalize.translate('ButtonIdentify'), id: 'identify', @@ -369,6 +375,9 @@ case 'refresh': showRefreshMenu(context, button); break; + case 'images': + LibraryBrowser.editImages(currentItem.Id); + break; default: break; } diff --git a/dashboard-ui/components/playlisteditor/playlisteditor.js b/dashboard-ui/components/playlisteditor/playlisteditor.js index bdbbb95277..b1a6e786e2 100644 --- a/dashboard-ui/components/playlisteditor/playlisteditor.js +++ b/dashboard-ui/components/playlisteditor/playlisteditor.js @@ -130,7 +130,7 @@ html += ''; html += '
'; - html += ''; + html += ''; html += ''; html += '
'; diff --git a/dashboard-ui/components/subtitleeditor/subtitleeditor.template.html b/dashboard-ui/components/subtitleeditor/subtitleeditor.template.html index 74cca82966..8b1ed3ca38 100644 --- a/dashboard-ui/components/subtitleeditor/subtitleeditor.template.html +++ b/dashboard-ui/components/subtitleeditor/subtitleeditor.template.html @@ -9,7 +9,7 @@
- +
'; $('.syncJobForm', page).html(html); - SyncManager.renderForm({ - elem: $('.formFields', page), - dialogOptions: dialogOptions, - dialogOptionsFn: getTargetDialogOptionsFn(dialogOptions), - showName: true, - readOnlySyncTarget: true - }).then(function () { - fillJobValues(page, job, dialogOptions); + + require(['syncDialog'], function (syncDialog) { + syncDialog.renderForm({ + elem: $('.formFields', page), + dialogOptions: dialogOptions, + dialogOptionsFn: getTargetDialogOptionsFn(dialogOptions), + showName: true, + readOnlySyncTarget: true + }).then(function () { + fillJobValues(page, job, dialogOptions); + }); }); } @@ -344,19 +347,21 @@ ApiClient.getJSON(ApiClient.getUrl('Sync/Jobs/' + id)).then(function (job) { - SyncManager.setJobValues(job, page); + require(['syncDialog'], function (syncDialog) { + syncDialog.setJobValues(job, page); - ApiClient.ajax({ + ApiClient.ajax({ - url: ApiClient.getUrl('Sync/Jobs/' + id), - type: 'POST', - data: JSON.stringify(job), - contentType: "application/json" + url: ApiClient.getUrl('Sync/Jobs/' + id), + type: 'POST', + data: JSON.stringify(job), + contentType: "application/json" - }).then(function () { + }).then(function () { - Dashboard.hideLoadingMsg(); - Dashboard.alert(Globalize.translate('SettingsSaved')); + Dashboard.hideLoadingMsg(); + Dashboard.alert(Globalize.translate('SettingsSaved')); + }); }); }); From 9e4ec97ed5822a7278f5ac88e1ecc6215f888c9f Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 18 Feb 2016 00:34:53 -0500 Subject: [PATCH 05/25] fix chromecast queue command --- dashboard-ui/scripts/chromecast.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboard-ui/scripts/chromecast.js b/dashboard-ui/scripts/chromecast.js index 524e276e57..83150bac8b 100644 --- a/dashboard-ui/scripts/chromecast.js +++ b/dashboard-ui/scripts/chromecast.js @@ -621,7 +621,7 @@ }; self.queue = function (options) { - self.playWithCommnd(options, 'PlayLast'); + self.playWithCommand(options, 'PlayLast'); }; self.queueNext = function (options) { From 02e924e3c5e582e17c99709fb8944ed482d57111 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 18 Feb 2016 13:19:18 -0500 Subject: [PATCH 06/25] update live tv images --- dashboard-ui/scripts/livetvcomponents.js | 2 +- dashboard-ui/scripts/livetvseriestimer.js | 4 +++- dashboard-ui/scripts/livetvtimers.js | 4 +++- dashboard-ui/thirdparty/paper-button-style.css | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dashboard-ui/scripts/livetvcomponents.js b/dashboard-ui/scripts/livetvcomponents.js index 7931af5bce..adc1e18c51 100644 --- a/dashboard-ui/scripts/livetvcomponents.js +++ b/dashboard-ui/scripts/livetvcomponents.js @@ -43,7 +43,7 @@ } if (imgUrl) { - html += ''; + html += ''; } else if (program.IsKids) { html += ''; diff --git a/dashboard-ui/scripts/livetvseriestimer.js b/dashboard-ui/scripts/livetvseriestimer.js index aa6ea665db..9c23f41465 100644 --- a/dashboard-ui/scripts/livetvseriestimer.js +++ b/dashboard-ui/scripts/livetvseriestimer.js @@ -144,7 +144,9 @@ var timers = result.Items; LiveTvHelpers.getTimersHtml(timers).then(function(html) { - var elem = $('.scheduleTab', page).html(html); + var elem = $('.scheduleTab', page).html(html)[0]; + + ImageLoader.lazyChildren(elem); $('.btnDeleteTimer', elem).on('click', function () { diff --git a/dashboard-ui/scripts/livetvtimers.js b/dashboard-ui/scripts/livetvtimers.js index 49c29216cc..7ec5e5eea5 100644 --- a/dashboard-ui/scripts/livetvtimers.js +++ b/dashboard-ui/scripts/livetvtimers.js @@ -22,7 +22,9 @@ function renderTimers(page, timers) { LiveTvHelpers.getTimersHtml(timers).then(function (html) { - var elem = $('#items', page).html(html); + var elem = $('#items', page).html(html)[0]; + + ImageLoader.lazyChildren(elem); $('.btnDeleteTimer', elem).on('click', function () { diff --git a/dashboard-ui/thirdparty/paper-button-style.css b/dashboard-ui/thirdparty/paper-button-style.css index 8da574464f..659fe0720f 100644 --- a/dashboard-ui/thirdparty/paper-button-style.css +++ b/dashboard-ui/thirdparty/paper-button-style.css @@ -240,7 +240,7 @@ paper-dialog[role="alertdialog"] + iron-overlay-backdrop { } paper-tabs { - background-color: #111; + background-color: #080808; color: #fff; box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.2); } From 05b25af69f030979597d9f0a60c2d97013eb5d00 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 18 Feb 2016 13:20:10 -0500 Subject: [PATCH 07/25] update components --- .../iron-autogrow-textarea/.bower.json | 11 +- .../iron-autogrow-textarea/.travis.yml | 13 +- .../iron-autogrow-textarea/CONTRIBUTING.md | 11 +- .../iron-autogrow-textarea/bower.json | 5 +- .../iron-autogrow-textarea/demo/index.html | 102 ++- .../iron-autogrow-textarea.html | 24 +- .../iron-autogrow-textarea/test/index.html | 13 +- .../iron-behaviors/.bower.json | 6 +- .../iron-demo-helpers/.bower.json | 14 +- .../iron-demo-helpers/.travis.yml | 27 + .../iron-demo-helpers/CONTRIBUTING.md | 11 +- .../iron-demo-helpers/bower.json | 8 +- .../iron-demo-helpers/demo-snippet.html | 68 +- .../iron-demo-helpers/demo/index.html | 2 +- .../iron-demo-helpers/test/basic.html | 84 +-- .../iron-flex-layout/.bower.json | 22 +- .../iron-flex-layout/.travis.yml | 15 +- .../iron-flex-layout/CONTRIBUTING.md | 11 +- .../iron-flex-layout/bower.json | 10 +- .../iron-flex-layout/demo/demo-snippet.html | 95 --- .../iron-flex-layout/demo/index.html | 88 +-- .../iron-flex-layout/iron-flex-layout.html | 2 +- .../iron-flex-layout/test/index.html | 29 + .../test/iron-flex-layout.html | 344 ++++++++++ .../iron-overlay-behavior/.bower.json | 8 +- .../iron-overlay-behavior/bower.json | 2 +- .../iron-overlay-behavior.html | 19 +- .../test/iron-overlay-behavior.html | 639 +++++++++--------- .../iron-resizable-behavior/.bower.json | 11 +- .../iron-resizable-behavior/.travis.yml | 25 + .../iron-resizable-behavior/CONTRIBUTING.md | 77 +++ .../iron-resizable-behavior/bower.json | 7 +- .../iron-resizable-behavior.html | 2 + .../iron-resizable-behavior/test/basic.html | 118 ++-- .../iron-resizable-behavior/test/index.html | 19 +- .../test/iron-resizable-behavior.html | 1 + .../iron-selector/.bower.json | 8 +- .../bower_components/iron-selector/bower.json | 2 +- .../iron-selector/iron-multi-selectable.html | 31 +- .../iron-selector/iron-selectable.html | 13 +- .../iron-selector/iron-selection.html | 21 +- .../iron-selector/test/index.html | 25 +- .../iron-selector/test/multi.html | 127 +++- .../test/selected-attribute.html | 56 ++ .../bower_components/paper-input/.bower.json | 10 +- .../paper-input/CONTRIBUTING.md | 11 +- .../bower_components/paper-input/bower.json | 4 +- .../paper-input/paper-input-behavior.html | 36 +- .../paper-input/paper-input-char-counter.html | 8 +- .../paper-input/paper-input-container.html | 33 +- .../paper-input/paper-input-error.html | 5 +- .../test/paper-input-char-counter.html | 3 +- .../paper-input/test/paper-input.html | 52 +- .../paper-input/test/paper-textarea.html | 67 +- .../bower_components/polymer/.bower.json | 6 +- 55 files changed, 1554 insertions(+), 907 deletions(-) create mode 100644 dashboard-ui/bower_components/iron-demo-helpers/.travis.yml delete mode 100644 dashboard-ui/bower_components/iron-flex-layout/demo/demo-snippet.html create mode 100644 dashboard-ui/bower_components/iron-flex-layout/test/index.html create mode 100644 dashboard-ui/bower_components/iron-flex-layout/test/iron-flex-layout.html create mode 100644 dashboard-ui/bower_components/iron-resizable-behavior/.travis.yml create mode 100644 dashboard-ui/bower_components/iron-resizable-behavior/CONTRIBUTING.md diff --git a/dashboard-ui/bower_components/iron-autogrow-textarea/.bower.json b/dashboard-ui/bower_components/iron-autogrow-textarea/.bower.json index 81113ef022..0dbb4c1292 100644 --- a/dashboard-ui/bower_components/iron-autogrow-textarea/.bower.json +++ b/dashboard-ui/bower_components/iron-autogrow-textarea/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-autogrow-textarea", - "version": "1.0.10", + "version": "1.0.11", "description": "A textarea element that automatically grows with input", "authors": [ "The Polymer Authors" @@ -29,17 +29,18 @@ }, "devDependencies": { "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0", "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", "test-fixture": "PolymerElements/test-fixture#^1.0.0", - "web-component-tester": "polymer/web-component-tester#^3.4.0", + "web-component-tester": "^4.0.0", "paper-styles": "PolymerElements/paper-styles#^1.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "_release": "1.0.10", + "_release": "1.0.11", "_resolution": { "type": "version", - "tag": "v1.0.10", - "commit": "1ba4f97e250dc14e9638d95be582dd62b9083736" + "tag": "v1.0.11", + "commit": "8fe629c9fecb14b76319ab4fbeef7f0237d93004" }, "_source": "git://github.com/PolymerElements/iron-autogrow-textarea.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/iron-autogrow-textarea/.travis.yml b/dashboard-ui/bower_components/iron-autogrow-textarea/.travis.yml index 1929c8ae4c..771bf35d1e 100644 --- a/dashboard-ui/bower_components/iron-autogrow-textarea/.travis.yml +++ b/dashboard-ui/bower_components/iron-autogrow-textarea/.travis.yml @@ -1,22 +1,25 @@ language: node_js sudo: false before_script: - - npm install web-component-tester - - npm install bower - - 'export PATH=$PWD/node_modules/.bin:$PATH' + - npm install -g bower polylint web-component-tester - bower install + - polylint env: global: - secure: lIogwlz5kFUKYy1OWASXxQgZE4YTyjUY0QcEgnqbv6wQ0GX8wRMgbI3zhbAv+xXU5ieYXg6Bd47ZFZZ1kVEWzQynAdd2od14Eu1vfN60/yc/llz62VTYuFsPt8r+Tgw41Iz8plwejK4a+V26Da5tXW+soJQOJKvE/MOiPzKi2m0= - secure: cj3uSCQwLY6pyP3oTdGFjJoTRjv3G1lSe73fMd6i15XnMMxM4DVarfDtK+a0dPPxDY8BBhfr4sFClZuWX71bAHQuqUA84oigbeWt2xfl8d3HUuvr9aEnQxAGe2eQE7atpYJPC9M447sw48QKiUVgQo33DeJ1BGj6SBqkw0BJXO8= -node_js: 4 + - CXX=g++-4.8 +node_js: stable addons: - firefox: '42.0' + firefox: latest apt: sources: - google-chrome + - ubuntu-toolchain-r-test packages: - google-chrome-stable + - g++-4.8 + sauce_connect: true script: - xvfb-run wct - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi" diff --git a/dashboard-ui/bower_components/iron-autogrow-textarea/CONTRIBUTING.md b/dashboard-ui/bower_components/iron-autogrow-textarea/CONTRIBUTING.md index 7b10141565..f147978a3e 100644 --- a/dashboard-ui/bower_components/iron-autogrow-textarea/CONTRIBUTING.md +++ b/dashboard-ui/bower_components/iron-autogrow-textarea/CONTRIBUTING.md @@ -5,6 +5,11 @@ https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md If you edit that file, it will get updated everywhere else. If you edit this file, your changes will get overridden :) + +You can however override the jsbin link with one that's customized to this +specific element: + +jsbin=https://jsbin.com/cagaye/edit?html,output --> # Polymer Elements ## Guide for Contributors @@ -41,7 +46,7 @@ Polymer Elements are built in the open, and the Polymer authors eagerly encourag 3. Click the `paper-foo` element. ``` - 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output). + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output). 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. @@ -51,14 +56,14 @@ Polymer Elements are built in the open, and the Polymer authors eagerly encourag When submitting pull requests, please provide: - 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax: + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: ```markdown (For a single issue) Fixes #20 (For multiple issues) - Fixes #32, #40 + Fixes #32, fixes #40 ``` 2. **A succinct description of the design** used to fix any related issues. For example: diff --git a/dashboard-ui/bower_components/iron-autogrow-textarea/bower.json b/dashboard-ui/bower_components/iron-autogrow-textarea/bower.json index 61a9c49ac2..b775b23443 100644 --- a/dashboard-ui/bower_components/iron-autogrow-textarea/bower.json +++ b/dashboard-ui/bower_components/iron-autogrow-textarea/bower.json @@ -1,6 +1,6 @@ { "name": "iron-autogrow-textarea", - "version": "1.0.10", + "version": "1.0.11", "description": "A textarea element that automatically grows with input", "authors": [ "The Polymer Authors" @@ -29,9 +29,10 @@ }, "devDependencies": { "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0", "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", "test-fixture": "PolymerElements/test-fixture#^1.0.0", - "web-component-tester": "polymer/web-component-tester#^3.4.0", + "web-component-tester": "^4.0.0", "paper-styles": "PolymerElements/paper-styles#^1.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" } diff --git a/dashboard-ui/bower_components/iron-autogrow-textarea/demo/index.html b/dashboard-ui/bower_components/iron-autogrow-textarea/demo/index.html index 0c7fdc052e..525d90a43e 100644 --- a/dashboard-ui/bower_components/iron-autogrow-textarea/demo/index.html +++ b/dashboard-ui/bower_components/iron-autogrow-textarea/demo/index.html @@ -18,46 +18,80 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN iron-autogrow-textarea demo + + - + + - - +
-

Updating the value imperatively

- +

Example of updating the value imperatively

+ +
+
- - diff --git a/dashboard-ui/bower_components/iron-autogrow-textarea/iron-autogrow-textarea.html b/dashboard-ui/bower_components/iron-autogrow-textarea/iron-autogrow-textarea.html index e255d79904..8ec9942772 100644 --- a/dashboard-ui/bower_components/iron-autogrow-textarea/iron-autogrow-textarea.html +++ b/dashboard-ui/bower_components/iron-autogrow-textarea/iron-autogrow-textarea.html @@ -33,6 +33,7 @@ The following custom properties and mixins are available for styling: Custom property | Description | Default ----------------|-------------|---------- `--iron-autogrow-textarea` | Mixin applied to the textarea | `{}` +`--iron-autogrow-textarea-placeholder` | Mixin applied to the textarea placeholder | `{}` @group Iron Elements @hero hero.svg @@ -50,6 +51,7 @@ Custom property | Description | Default padding: 2px; -moz-appearance: textarea; -webkit-appearance: textarea; + overflow: hidden; } .mirror-text { @@ -82,6 +84,21 @@ Custom property | Description | Default box-shadow: none; } + textarea::-webkit-input-placeholder { + @apply(--iron-autogrow-textarea-placeholder); + } + + textarea:-moz-placeholder { + @apply(--iron-autogrow-textarea-placeholder); + } + + textarea::-moz-placeholder { + @apply(--iron-autogrow-textarea-placeholder); + } + + textarea:-ms-input-placeholder { + @apply(--iron-autogrow-textarea-placeholder); + } + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-input/.bower.json b/dashboard-ui/bower_components/paper-input/.bower.json index 0216a6c581..598b2f24c7 100644 --- a/dashboard-ui/bower_components/paper-input/.bower.json +++ b/dashboard-ui/bower_components/paper-input/.bower.json @@ -1,6 +1,6 @@ { "name": "paper-input", - "version": "1.1.5", + "version": "1.1.6", "description": "Material design text fields", "authors": [ "The Polymer Authors" @@ -33,7 +33,7 @@ "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0", "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0", "iron-input": "PolymerElements/iron-input#^1.0.0", - "paper-styles": "PolymerElements/paper-styles#^1.0.0", + "paper-styles": "PolymerElements/paper-styles#^1.1.0", "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0" }, "devDependencies": { @@ -47,11 +47,11 @@ "web-component-tester": "^4.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "_release": "1.1.5", + "_release": "1.1.6", "_resolution": { "type": "version", - "tag": "v1.1.5", - "commit": "0aa8318b5e026688f94c78c7673acabf5bad0f17" + "tag": "v1.1.6", + "commit": "d918956322b733ee7673aec6e1ce9939aadb4c63" }, "_source": "git://github.com/polymerelements/paper-input.git", "_target": "^1.0.9", diff --git a/dashboard-ui/bower_components/paper-input/CONTRIBUTING.md b/dashboard-ui/bower_components/paper-input/CONTRIBUTING.md index 7b10141565..f147978a3e 100644 --- a/dashboard-ui/bower_components/paper-input/CONTRIBUTING.md +++ b/dashboard-ui/bower_components/paper-input/CONTRIBUTING.md @@ -5,6 +5,11 @@ https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md If you edit that file, it will get updated everywhere else. If you edit this file, your changes will get overridden :) + +You can however override the jsbin link with one that's customized to this +specific element: + +jsbin=https://jsbin.com/cagaye/edit?html,output --> # Polymer Elements ## Guide for Contributors @@ -41,7 +46,7 @@ Polymer Elements are built in the open, and the Polymer authors eagerly encourag 3. Click the `paper-foo` element. ``` - 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output). + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output). 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. @@ -51,14 +56,14 @@ Polymer Elements are built in the open, and the Polymer authors eagerly encourag When submitting pull requests, please provide: - 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax: + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: ```markdown (For a single issue) Fixes #20 (For multiple issues) - Fixes #32, #40 + Fixes #32, fixes #40 ``` 2. **A succinct description of the design** used to fix any related issues. For example: diff --git a/dashboard-ui/bower_components/paper-input/bower.json b/dashboard-ui/bower_components/paper-input/bower.json index 99a9b83b38..b507f5709c 100644 --- a/dashboard-ui/bower_components/paper-input/bower.json +++ b/dashboard-ui/bower_components/paper-input/bower.json @@ -1,6 +1,6 @@ { "name": "paper-input", - "version": "1.1.5", + "version": "1.1.6", "description": "Material design text fields", "authors": [ "The Polymer Authors" @@ -33,7 +33,7 @@ "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0", "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0", "iron-input": "PolymerElements/iron-input#^1.0.0", - "paper-styles": "PolymerElements/paper-styles#^1.0.0", + "paper-styles": "PolymerElements/paper-styles#^1.1.0", "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0" }, "devDependencies": { diff --git a/dashboard-ui/bower_components/paper-input/paper-input-behavior.html b/dashboard-ui/bower_components/paper-input/paper-input-behavior.html index 3edbb79ca9..89882be214 100644 --- a/dashboard-ui/bower_components/paper-input/paper-input-behavior.html +++ b/dashboard-ui/bower_components/paper-input/paper-input-behavior.html @@ -365,13 +365,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN listeners: { 'addon-attached': '_onAddonAttached', - 'focus': '_onFocus' }, - observers: [ - '_focusedControlStateChanged(focused)' - ], - keyBindings: { 'shift+tab:keydown': '_onShiftTabDown' }, @@ -440,12 +435,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, /** - * Forward focus to inputElement + * Forward focus to inputElement. Overriden from IronControlState. */ - _onFocus: function() { - if (!this._shiftTabPressed) { + _focusBlurHandler: function(event) { + if (this._shiftTabPressed) + return; + + Polymer.IronControlState._focusBlurHandler.call(this, event); + + // Forward the focus to the nested input. + if (this.focused) this._focusableElement.focus(); - } }, /** @@ -497,24 +497,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN return placeholder || alwaysFloatLabel; }, - _focusedControlStateChanged: function(focused) { - // IronControlState stops the focus and blur events in order to redispatch them on the host - // element, but paper-input-container listens to those events. Since there are more - // pending work on focus/blur in IronControlState, I'm putting in this hack to get the - // input focus state working for now. - if (!this.$.container) { - this.$.container = Polymer.dom(this.root).querySelector('paper-input-container'); - if (!this.$.container) { - return; - } - } - if (focused) { - this.$.container._onFocus(); - } else { - this.$.container._onBlur(); - } - }, - _updateAriaLabelledBy: function() { var label = Polymer.dom(this.root).querySelector('label'); if (!label) { diff --git a/dashboard-ui/bower_components/paper-input/paper-input-char-counter.html b/dashboard-ui/bower_components/paper-input/paper-input-char-counter.html index c0357824f9..ec427e0d9b 100644 --- a/dashboard-ui/bower_components/paper-input/paper-input-char-counter.html +++ b/dashboard-ui/bower_components/paper-input/paper-input-char-counter.html @@ -72,13 +72,13 @@ Custom property | Description | Default state.value = state.value || ''; - // Account for the textarea's new lines. - var str = state.value.replace(/(\r\n|\n|\r)/g, '--').length; + var counter = state.value.length; if (state.inputElement.hasAttribute('maxlength')) { - str += '/' + state.inputElement.getAttribute('maxlength'); + counter += '/' + state.inputElement.getAttribute('maxlength'); } - this._charCounterStr = str; + + this._charCounterStr = counter; } }); diff --git a/dashboard-ui/bower_components/paper-input/paper-input-container.html b/dashboard-ui/bower_components/paper-input/paper-input-container.html index d4c71f9ab4..c1b9f66b9c 100644 --- a/dashboard-ui/bower_components/paper-input/paper-input-container.html +++ b/dashboard-ui/bower_components/paper-input/paper-input-container.html @@ -10,7 +10,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - @@ -74,8 +73,8 @@ The following custom properties and mixins are available for styling: Custom property | Description | Default ----------------|-------------|---------- `--paper-input-container-color` | Label and underline color when the input is not focused | `--secondary-text-color` -`--paper-input-container-focus-color` | Label and underline color when the input is focused | `--default-primary-color` -`--paper-input-container-invalid-color` | Label and underline color when the input is is invalid | `--google-red-500` +`--paper-input-container-focus-color` | Label and underline color when the input is focused | `--primary-color` +`--paper-input-container-invalid-color` | Label and underline color when the input is is invalid | `--error-color` `--paper-input-container-input-color` | Input foreground color | `--primary-text-color` `--paper-input-container` | Mixin applied to the container | `{}` `--paper-input-container-disabled` | Mixin applied to the container when it's disabled | `{}` @@ -125,8 +124,9 @@ This element is `display:block` by default, but you can set the `inline` attribu .focused-line { @apply(--layout-fit); - background: var(--paper-input-container-focus-color, --default-primary-color); + background: var(--paper-input-container-focus-color, --primary-color); height: 2px; + -webkit-transform-origin: center center; transform-origin: center center; -webkit-transform: scale3d(0,1,1); @@ -145,7 +145,7 @@ This element is `display:block` by default, but you can set the `inline` attribu } .underline.is-invalid .focused-line { - background: var(--paper-input-container-invalid-color, --google-red-500); + background: var(--paper-input-container-invalid-color, --error-color); -webkit-transform: none; transform: none; -webkit-transition: -webkit-transform 0.25s; @@ -157,8 +157,8 @@ This element is `display:block` by default, but you can set the `inline` attribu .unfocused-line { @apply(--layout-fit); - height: 1px; background: var(--paper-input-container-color, --secondary-text-color); + height: 1px; @apply(--paper-input-container-underline); } @@ -174,6 +174,7 @@ This element is `display:block` by default, but you can set the `inline` attribu .label-and-input-container { @apply(--layout-flex-auto); @apply(--layout-relative); + width: 100%; max-width: 100%; } @@ -194,26 +195,26 @@ This element is `display:block` by default, but you can set the `inline` attribu width: 100%; font: inherit; color: var(--paper-input-container-color, --secondary-text-color); + -webkit-transition: -webkit-transform 0.25s, width 0.25s; + transition: transform 0.25s, width 0.25s; + -webkit-transform-origin: left top; + transform-origin: left top; @apply(--paper-font-common-nowrap); @apply(--paper-font-subhead); @apply(--paper-input-container-label); + @apply(--paper-transition-easing); } .input-content.label-is-floating ::content label, .input-content.label-is-floating ::content .paper-input-label { -webkit-transform: translateY(-75%) scale(0.75); transform: translateY(-75%) scale(0.75); - -webkit-transition: -webkit-transform 0.25s, width 0.25s; - transition: transform 0.25s, width 0.25s; - -webkit-transform-origin: left top; - transform-origin: left top; /* Since we scale to 75/100 of the size, we actually have 100/75 of the original space now available */ width: 133%; - @apply(--paper-transition-easing); @apply(--paper-input-container-label-floating); } @@ -229,14 +230,14 @@ This element is `display:block` by default, but you can set the `inline` attribu .input-content.label-is-highlighted ::content label, .input-content.label-is-highlighted ::content .paper-input-label { - color: var(--paper-input-container-focus-color, --default-primary-color); + color: var(--paper-input-container-focus-color, --primary-color); @apply(--paper-input-container-label-focus); } .input-content.is-invalid ::content label, .input-content.is-invalid ::content .paper-input-label { - color: var(--paper-input-container-invalid-color, --google-red-500); + color: var(--paper-input-container-invalid-color, --error-color); } .input-content.label-is-hidden ::content label, @@ -266,12 +267,14 @@ This element is `display:block` by default, but you can set the `inline` attribu ::content [prefix] { @apply(--paper-font-subhead); + @apply(--paper-input-prefix); @apply(--layout-flex-none); } ::content [suffix] { @apply(--paper-font-subhead); + @apply(--paper-input-suffix); @apply(--layout-flex-none); } @@ -290,11 +293,11 @@ This element is `display:block` by default, but you can set the `inline` attribu } .add-on-content.is-invalid ::content * { - color: var(--paper-input-container-invalid-color, --google-red-500); + color: var(--paper-input-container-invalid-color, --error-color); } .add-on-content.is-highlighted ::content * { - color: var(--paper-input-container-focus-color, --default-primary-color); + color: var(--paper-input-container-focus-color, --primary-color); } diff --git a/dashboard-ui/bower_components/paper-input/paper-input-error.html b/dashboard-ui/bower_components/paper-input/paper-input-error.html index 4b33a332e2..b950910e37 100644 --- a/dashboard-ui/bower_components/paper-input/paper-input-error.html +++ b/dashboard-ui/bower_components/paper-input/paper-input-error.html @@ -9,7 +9,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN --> - @@ -28,7 +27,7 @@ The following custom properties and mixins are available for styling: Custom property | Description | Default ----------------|-------------|---------- -`--paper-input-container-invalid-color` | The foreground color of the error | `--google-red-500` +`--paper-input-container-invalid-color` | The foreground color of the error | `--error-color` `--paper-input-error` | Mixin applied to the error | `{}` --> @@ -39,7 +38,7 @@ Custom property | Description | Default display: inline-block; visibility: hidden; - color: var(--paper-input-container-invalid-color, --google-red-500); + color: var(--paper-input-container-invalid-color, --error-color); @apply(--paper-font-caption); @apply(--paper-input-error); diff --git a/dashboard-ui/bower_components/paper-input/test/paper-input-char-counter.html b/dashboard-ui/bower_components/paper-input/test/paper-input-char-counter.html index 5e7f2800c0..49e1278e96 100644 --- a/dashboard-ui/bower_components/paper-input/test/paper-input-char-counter.html +++ b/dashboard-ui/bower_components/paper-input/test/paper-input-char-counter.html @@ -97,8 +97,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN var counter = Polymer.dom(input.root).querySelector('paper-input-char-counter') assert.ok(counter, 'paper-input-char-counter exists'); - // A new line counts as two characters. - assert.equal(counter._charCounterStr, input.value.length + 1, 'character counter shows the value length'); + assert.equal(counter._charCounterStr, input.value.length, 'character counter shows the value length'); }); }); diff --git a/dashboard-ui/bower_components/paper-input/test/paper-input.html b/dashboard-ui/bower_components/paper-input/test/paper-input.html index df7915d2bf..4a43210204 100644 --- a/dashboard-ui/bower_components/paper-input/test/paper-input.html +++ b/dashboard-ui/bower_components/paper-input/test/paper-input.html @@ -196,23 +196,51 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN input = fixture('basic'); }); - test('focus/blur events fired on host element', function() { - var nFocusEvents = 0; - var nBlurEvents = 0; + // At the moment, it is very hard to correctly fire exactly + // one focus/blur events on a paper-input. This is because + // when a paper-input is focused, it needs to focus + // its underlying native input, which will also fire a `blur` + // event. + test('focus events fired on host element', function() { input.addEventListener('focus', function(event) { - nFocusEvents += 1; assert(input.focused, 'input is focused'); - MockInteractions.blur(input.inputElement); }); - input.addEventListener('blur', function() { - nBlurEvents += 1; - assert(!input.focused, 'input is blurred'); - }); - MockInteractions.focus(input.inputElement); - assert.isTrue(nFocusEvents >= 1, 'focus event fired'); - assert.isTrue(nBlurEvents >= 1, 'blur event fired'); + MockInteractions.focus(input); }); + test('focus events fired on host element if nested element is focused', function() { + input.addEventListener('focus', function(event) { + assert(input.focused, 'input is focused'); + }); + MockInteractions.focus(input.inputElement); + }); + + test('blur events fired on host element', function() { + MockInteractions.focus(input); + input.addEventListener('blur', function(event) { + assert(!input.focused, 'input is blurred'); + }); + MockInteractions.blur(input); + }); + + test('blur events fired on host element nested element is blurred', function() { + MockInteractions.focus(input); + input.addEventListener('blur', function(event) { + assert(!input.focused, 'input is blurred'); + }); + MockInteractions.blur(input.inputElement); + }); + + test('focusing then bluring sets the focused attribute correctly', function() { + MockInteractions.focus(input); + assert(input.focused, 'input is focused'); + MockInteractions.blur(input); + assert(!input.focused, 'input is blurred'); + MockInteractions.focus(input.inputElement); + assert(input.focused, 'input is focused'); + MockInteractions.blur(input.inputElement); + assert(!input.focused, 'input is blurred'); + }); }); suite('focused styling (integration test)', function() { diff --git a/dashboard-ui/bower_components/paper-input/test/paper-textarea.html b/dashboard-ui/bower_components/paper-input/test/paper-textarea.html index a63add12f7..254df8f97c 100644 --- a/dashboard-ui/bower_components/paper-input/test/paper-textarea.html +++ b/dashboard-ui/bower_components/paper-input/test/paper-textarea.html @@ -32,12 +32,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - - -