From 5e79a8080bafbb8c736d1c41b8a088d5c81737f2 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 25 Jun 2015 00:04:32 -0700 Subject: [PATCH] Frontend cleanup and bug fixes --- homeassistant/components/frontend/version.py | 2 +- .../frontend/www_static/frontend.html | 5859 ++++------------- .../frontend/www_static/polymer/bower.json | 4 +- .../polymer/components/ha-logbook.html | 12 +- .../polymer/components/ha-sidebar.html | 35 +- .../polymer/dialogs/more-info-dialog.html | 38 +- .../www_static/polymer/home-assistant-js | 2 +- .../polymer/layouts/home-assistant-main.html | 4 +- .../polymer/layouts/partial-history.html | 22 +- .../polymer/layouts/partial-logbook.html | 32 +- .../polymer/managers/modal-manager.html | 56 - .../polymer/resources/moment-js.html | 2 +- .../polymer/resources/pikaday-js.html | 2 + 13 files changed, 1398 insertions(+), 4672 deletions(-) delete mode 100644 homeassistant/components/frontend/www_static/polymer/managers/modal-manager.html create mode 100644 homeassistant/components/frontend/www_static/polymer/resources/pikaday-js.html diff --git a/homeassistant/components/frontend/version.py b/homeassistant/components/frontend/version.py index e3e2ae2bf01..32ac212af89 100644 --- a/homeassistant/components/frontend/version.py +++ b/homeassistant/components/frontend/version.py @@ -1,2 +1,2 @@ """ DO NOT MODIFY. Auto-generated by build_frontend script """ -VERSION = "a44970ec771fb08baa6b54ff00a4e223" +VERSION = "9e4807d493dcb52e24dcd5163e6a2d4b" diff --git a/homeassistant/components/frontend/www_static/frontend.html b/homeassistant/components/frontend/www_static/frontend.html index 149052babc5..c62c8efa628 100644 --- a/homeassistant/components/frontend/www_static/frontend.html +++ b/homeassistant/components/frontend/www_static/frontend.html @@ -5803,7 +5803,6 @@ this._removeChildren(); } }); - - - - - - - @@ -22777,7 +20859,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
- + Loading logbook entries
@@ -22828,6 +20910,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN function(entries) { return entries.toArray(); }, ], }, + + datePicker: { + type: Object, + }, }, isStaleChanged: function(newVal) { @@ -22839,15 +20925,25 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN } }, - handleShowDatePicker: function() { - uiActions.showDatePicker( - logbookActions.changeCurrentDate, - this.selectedDate); - }, - handleRefresh: function() { logbookActions.fetchDate(this.selectedDate); }, + + datepickerFocus: function() { + this.datePicker.adjustPosition(); + this.datePicker.gotoDate(moment('2015-06-30').toDate()); + }, + + attached: function() { + this.datePicker = new Pikaday({ + field: this.$.datePicker.inputElement, + onSelect: logbookActions.changeCurrentDate, + }); + }, + + detached: function() { + this.datePicker.destroy(); + }, }); })(); @@ -23141,7 +21237,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
- +
@@ -23197,10 +21293,20 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN entityHistoryActions.fetchSelectedDate(); }, - handleShowDatePicker: function() { - uiActions.showDatePicker( - entityHistoryActions.changeCurrentDate, - this.selectedDate); + datepickerFocus: function() { + this.datePicker.adjustPosition(); + this.datePicker.gotoDate(moment('2015-06-30').toDate()); + }, + + attached: function() { + this.datePicker = new Pikaday({ + field: this.$.datePicker.inputElement, + onSelect: entityHistoryActions.changeCurrentDate, + }); + }, + + detached: function() { + this.datePicker.destroy(); }, computeContentClasses: function(narrow) { @@ -24500,1285 +22606,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN })(); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -