From 67b59f1976c206e41b79b58bd366cd1bd48c8624 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 19 Mar 2017 21:55:52 -0700 Subject: [PATCH] Shadow dom fixes (#241) * Fix color picker * Fix map panel CSS * Convert logbook to use vaadin date picker * Fix logbook clear date * Migrate history panel to use vaadin date picker * Remove pikaday * Lint * history panel: disable on loading --- .eslintrc | 3 +- bower.json | 2 +- panels/history/ha-panel-history.html | 83 +++++++++++++------------ panels/logbook/ha-panel-logbook.html | 90 ++++++++++++++-------------- panels/map/ha-panel-map.html | 3 +- src/components/ha-color-picker.html | 4 +- src/resources/pikaday-js.html | 2 - 7 files changed, 95 insertions(+), 92 deletions(-) delete mode 100644 src/resources/pikaday-js.html diff --git a/.eslintrc b/.eslintrc index 81aa76e3d2..be2414b93d 100644 --- a/.eslintrc +++ b/.eslintrc @@ -25,7 +25,8 @@ "vars-on-top": 0, "no-continue": 0, "no-param-reassign": 0, - "no-multi-assign": 0 + "no-multi-assign": 0, + "radix": 0 }, "plugins": [ "html" diff --git a/bower.json b/bower.json index 615eac02b1..9608c2655f 100644 --- a/bower.json +++ b/bower.json @@ -17,9 +17,9 @@ "paper-elements": "PolymerElements/paper-elements#~1.0.7", "paper-range-slider": "IftachSadeh/paper-range-slider#~0.2.4", "paper-scroll-header-panel": "~1.0.16", - "pikaday": "~1.5.1", "polymer": "Polymer/polymer#~1.8.0", "vaadin-combo-box": "vaadin/vaadin-combo-box#~1.1.5", + "vaadin-date-picker": "^1.2.1", "paper-slider": "1.0.13", "leaflet": "^1.0.2", "polymer-sortablejs": "^0.1.3" diff --git a/panels/history/ha-panel-history.html b/panels/history/ha-panel-history.html index ce3eaacacf..4da7d494f7 100644 --- a/panels/history/ha-panel-history.html +++ b/panels/history/ha-panel-history.html @@ -8,8 +8,9 @@ + + - @@ -18,13 +19,15 @@ @@ -107,7 +107,7 @@ Polymer({ ready: function () { this.setColor = this.setColor.bind(this); this.mouseMoveIsThrottled = true; - this.canvas = this.children[0]; + this.canvas = this.$.canvas; this.context = this.canvas.getContext('2d'); this.drawGradient(); }, diff --git a/src/resources/pikaday-js.html b/src/resources/pikaday-js.html deleted file mode 100644 index 258ba8631c..0000000000 --- a/src/resources/pikaday-js.html +++ /dev/null @@ -1,2 +0,0 @@ - -