100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
smart toggle consistent, energy monitor added, celsius symbol added, settings page updated
Robina20e24658068
diff --git a/frontend/api/settings/current/get_current_settings.json b/frontend/api/settings/current/get_current_settings.jsonindex e2475a67b..6ddf60789 100644--- a/frontend/api/settings/current/get_current_settings.json+++ b/frontend/api/settings/current/get_current_settings.json@@ -12,7 +12,8 @@},"start_devices": [{"label":"Dishwasher", "time": "15:30", "status": "false"},- {"label":"Washing ", "time": "12:30", "status": "true"}+ {"label":"Washer ", "time": "12:30", "status": "true"},+ {"label":"Dryer ", "time": "12:30", "status": "true"}],"energy" : {"usage": "0.9", "main_power": "0", "solar": "0.9"},"alarm": "true",@@ -29,23 +30,29 @@"ventilation": "Low"},"scenes":{- "header":["Home","Away","Evening","Night"],+ "header":["Climate","Home","Away","Evening","Night"],"data":[["Living","21", "19", "22", "18"],["Bed","21", "19", "22", "18"],["Bath","21", "19", "22", "18"]]},+ "alarms":{+ "header":["Alarm","Home","Away","Evening","Night"],+ "data":[+ ["Arm","true", "false", "false", "false"]+ ]+ },"predicted_schedule":{- "header":["Home","Away","Evening","Night"],+ "header":["","Home","Away","Evening","Night"],"data":[- ["Mon","9:00", "10:00", "17:00", "23:00"],- ["Tue","9:00", "10:00", "17:00", "23:00"],- ["Wed","9:00", "10:00", "17:00", "23:00"],- ["Thu","9:00", "10:00", "17:00", "23:00"],- ["Fri","9:00", "10:00", "17:00", "23:00"],- ["Sat","9:00", "10:00", "17:00", "23:00"],- ["Sun","9:00", "10:00", "17:00", "23:00"]+ ["Mon","09:00", "10:00", "17:00", "23:00"],+ ["Tue","09:00", "10:00", "17:00", "23:00"],+ ["Wed","09:00", "10:00", "17:00", "23:00"],+ ["Thu","09:00", "10:00", "17:00", "23:00"],+ ["Fri","09:00", "10:00", "17:00", "23:00"],+ ["Sat","09:00", "10:00", "17:00", "23:00"],+ ["Sun","09:00", "10:00", "17:00", "23:00"]]}diff --git a/frontend/bower.json b/frontend/bower.jsonindex c7f265075..c1b3d04e5 100644--- a/frontend/bower.json+++ b/frontend/bower.json@@ -13,7 +13,7 @@"paper-radio-group": "PolymerElements/paper-radio-group#^1.2.1","paper-dropdown-menu": "PolymerElements/paper-dropdown-menu#^1.4.3","paper-listbox": "PolymerElements/paper-listbox#^1.1.2",- "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^1.10.1",+ "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^1.10.2","iron-form": "PolymerElements/iron-form#^1.1.4","paper-button": "PolymerElements/paper-button#^1.0.14","paper-checkbox": "PolymerElements/paper-checkbox#^1.4.2",@@ -22,7 +22,9 @@"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.23","iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^1.0.5","app-route": "PolymerElements/app-route#^0.9.3",- "iron-ajax": "PolymerElements/iron-ajax#^1.4.3"+ "iron-ajax": "PolymerElements/iron-ajax#^1.4.3",+ "iron-collapse": "PolymerElements/iron-collapse#^1.3.0",+ "paper-dialog": "PolymerElements/paper-dialog#^1.1.0"},"devDependencies": {"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",diff --git a/frontend/bower_components/iron-overlay-behavior/.bower.json b/frontend/bower_components/iron-overlay-behavior/.bower.jsonindex 0b4ad936c..950d30652 100644--- a/frontend/bower_components/iron-overlay-behavior/.bower.json+++ b/frontend/bower_components/iron-overlay-behavior/.bower.json@@ -1,6 +1,6 @@{"name": "iron-overlay-behavior",- "version": "1.10.1",+ "version": "1.10.2","license": "http://polymer.github.io/LICENSE.txt","description": "Provides a behavior for making an element an overlay","private": true,@@ -34,14 +34,14 @@"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"},"ignore": [],- "homepage": "https://github.com/polymerelements/iron-overlay-behavior",- "_release": "1.10.1",+ "homepage": "https://github.com/PolymerElements/iron-overlay-behavior",+ "_release": "1.10.2","_resolution": {"type": "version",- "tag": "v1.10.1",- "commit": "4daacfc095bdaaaa0ca002b5a56f87f9eac4dcb0"+ "tag": "v1.10.2",+ "commit": "27558b9ceeba7c670999818fc50eebe7e044ed5c"},- "_source": "https://github.com/polymerelements/iron-overlay-behavior.git",- "_target": "^1.8.6",- "_originalSource": "polymerelements/iron-overlay-behavior"+ "_source": "https://github.com/PolymerElements/iron-overlay-behavior.git",+ "_target": "^1.10.1",+ "_originalSource": "PolymerElements/iron-overlay-behavior"}\ No newline at end of filediff --git a/frontend/bower_components/iron-overlay-behavior/.travis.yml b/frontend/bower_components/iron-overlay-behavior/.travis.ymlindex 6305033b4..cc9cef450 100644--- a/frontend/bower_components/iron-overlay-behavior/.travis.yml+++ b/frontend/bower_components/iron-overlay-behavior/.travis.yml@@ -1,23 +1,24 @@language: node_jssudo: requiredbefore_script:-- npm install -g bower polylint web-component-tester-- bower install-- polylint+ - npm install -g bower polylint web-component-tester+ - bower install+ - polylintenv:global:- - secure: ZE4MrCc8vi6hb2WDctjBf9Y7wmYm0tbknPCX0TR+ks0eEXt2ZkWOvMGCw6sKvL1SsrUzhSOQiAc3IFCZBZ6vA1DUCo6S+4O8IvH+VawsK34arI7PIN7UhTDRmudzDwYKJHToRGVFffM1Y5vmNOBNj7hyiQp/UP0hz8vWLpQKyNw=- - secure: IDwaZdFRon3lTOOZsoGXFUTJayvthgm5JTigYlOtVq6CVlJQBShveehe08fHAhb0XkpFyTFxBsricOUc2DOlyK9ds+DE9rRlIml+BuCrmvfCFvxX4loRg5tibKrRT9mrHNhJRwZiL4WbsGTskMpWGorgkO9qMJSJ9sAabjCJrmM=-node_js: stable+ - secure: >-+ ZE4MrCc8vi6hb2WDctjBf9Y7wmYm0tbknPCX0TR+ks0eEXt2ZkWOvMGCw6sKvL1SsrUzhSOQiAc3IFCZBZ6vA1DUCo6S+4O8IvH+VawsK34arI7PIN7UhTDRmudzDwYKJHToRGVFffM1Y5vmNOBNj7hyiQp/UP0hz8vWLpQKyNw=+ - secure: >-+ IDwaZdFRon3lTOOZsoGXFUTJayvthgm5JTigYlOtVq6CVlJQBShveehe08fHAhb0XkpFyTFxBsricOUc2DOlyK9ds+DE9rRlIml+BuCrmvfCFvxX4loRg5tibKrRT9mrHNhJRwZiL4WbsGTskMpWGorgkO9qMJSJ9sAabjCJrmM=+node_js: '6'addons:- firefox: '46.0'+ firefox: latestapt:sources:- - google-chrome+ - google-chromepackages:- - google-chrome-stable- sauce_connect: true+ - google-chrome-stablescript:-- xvfb-run wct-- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then wct -s 'default'; fi+ - xvfb-run wct+ - 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then wct -s ''default''; fi'dist: trustydiff --git a/frontend/bower_components/iron-overlay-behavior/bower.json b/frontend/bower_components/iron-overlay-behavior/bower.jsonindex 31e99082d..753afba09 100644--- a/frontend/bower_components/iron-overlay-behavior/bower.json+++ b/frontend/bower_components/iron-overlay-behavior/bower.json@@ -1,6 +1,6 @@{"name": "iron-overlay-behavior",- "version": "1.10.1",+ "version": "1.10.2","license": "http://polymer.github.io/LICENSE.txt","description": "Provides a behavior for making an element an overlay","private": true,diff --git a/frontend/bower_components/iron-overlay-behavior/iron-focusables-helper.html b/frontend/bower_components/iron-overlay-behavior/iron-focusables-helper.htmlindex 5c8a663f4..084ad7d2b 100644--- a/frontend/bower_components/iron-overlay-behavior/iron-focusables-helper.html+++ b/frontend/bower_components/iron-overlay-behavior/iron-focusables-helper.html@@ -1,4 +1,220 @@-<!DOCTYPE html><html><head><link rel="import" href="../polymer/polymer.html">+<!doctype html>+<!--+@license+Copyright (c) 2016 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+-->+<link rel="import" href="../polymer/polymer.html">-<script>!function(){"use strict";var e=Element.prototype,t=e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;Polymer.IronFocusablesHelper={getTabbableNodes:function(e){var t=[],r=this._collectTabbableNodes(e,t);return r?this._sortByTabIndex(t):t},isFocusable:function(e){return t.call(e,"input, select, textarea, button, object")?t.call(e,":not([disabled])"):t.call(e,"a[href], area[href], iframe, [tabindex], [contentEditable]")},isTabbable:function(e){return this.isFocusable(e)&&t.call(e,':not([tabindex="-1"])')&&this._isVisible(e)},_normalizedTabIndex:function(e){if(this.isFocusable(e)){var t=e.getAttribute("tabindex")||0;return Number(t)}return-1},_collectTabbableNodes:function(e,t){if(e.nodeType!==Node.ELEMENT_NODE||!this._isVisible(e))return!1;var r=e,a=this._normalizedTabIndex(r),i=a>0;a>=0&&t.push(r);var n;n="content"===r.localName?Polymer.dom(r).getDistributedNodes():Polymer.dom(r.root||r).children;for(var o=0;o<n.length;o++){var s=this._collectTabbableNodes(n[o],t);i=i||s}return i},_isVisible:function(e){var t=e.style;return"hidden"!==t.visibility&&"none"!==t.display&&(t=window.getComputedStyle(e),"hidden"!==t.visibility&&"none"!==t.display)},_sortByTabIndex:function(e){var t=e.length;if(t<2)return e;var r=Math.ceil(t/2),a=this._sortByTabIndex(e.slice(0,r)),i=this._sortByTabIndex(e.slice(r));return this._mergeSortByTabIndex(a,i)},_mergeSortByTabIndex:function(e,t){for(var r=[];e.length>0&&t.length>0;)this._hasLowerTabOrder(e[0],t[0])?r.push(t.shift()):r.push(e.shift());return r.concat(e,t)},_hasLowerTabOrder:function(e,t){var r=Math.max(e.tabIndex,0),a=Math.max(t.tabIndex,0);return 0===r||0===a?a>r:r>a}}}();</script>-</head><body></body></html>\ No newline at end of file+<script>+ (function() {+ 'use strict';++ var p = Element.prototype;+ var matches = p.matches || p.matchesSelector || p.mozMatchesSelector ||+ p.msMatchesSelector || p.oMatchesSelector || p.webkitMatchesSelector;++ Polymer.IronFocusablesHelper = {++ /**+ * Returns a sorted array of tabbable nodes, including the root node.+ * It searches the tabbable nodes in the light and shadow dom of the chidren,+ * sorting the result by tabindex.+ * @param {!Node} node+ * @return {Array<HTMLElement>}+ */+ getTabbableNodes: function(node) {+ var result = [];+ // If there is at least one element with tabindex > 0, we need to sort+ // the final array by tabindex.+ var needsSortByTabIndex = this._collectTabbableNodes(node, result);+ if (needsSortByTabIndex) {+ return this._sortByTabIndex(result);+ }+ return result;+ },++ /**+ * Returns if a element is focusable.+ * @param {!HTMLElement} element+ * @return {boolean}+ */+ isFocusable: function(element) {+ // From http://stackoverflow.com/a/1600194/4228703:+ // There isn't a definite list, it's up to the browser. The only+ // standard we have is DOM Level 2 HTML https://www.w3.org/TR/DOM-Level-2-HTML/html.html,+ // according to which the only elements that have a focus() method are+ // HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement and+ // HTMLAnchorElement. This notably omits HTMLButtonElement and+ // HTMLAreaElement.+ // Referring to these tests with tabbables in different browsers+ // http://allyjs.io/data-tables/focusable.html++ // Elements that cannot be focused if they have [disabled] attribute.+ if (matches.call(element, 'input, select, textarea, button, object')) {+ return matches.call(element, ':not([disabled])');+ }+ // Elements that can be focused even if they have [disabled] attribute.+ return matches.call(element,+ 'a[href], area[href], iframe, [tabindex], [contentEditable]');+ },++ /**+ * Returns if a element is tabbable. To be tabbable, a element must be+ * focusable, visible, and with a tabindex !== -1.+ * @param {!HTMLElement} element+ * @return {boolean}+ */+ isTabbable: function(element) {+ return this.isFocusable(element) &&+ matches.call(element, ':not([tabindex="-1"])') &&+ this._isVisible(element);+ },++ /**+ * Returns the normalized element tabindex. If not focusable, returns -1.+ * It checks for the attribute "tabindex" instead of the element property+ * `tabIndex` since browsers assign different values to it.+ * e.g. in Firefox `<div contenteditable>` has `tabIndex = -1`+ * @param {!HTMLElement} element+ * @return {!number}+ * @private+ */+ _normalizedTabIndex: function(element) {+ if (this.isFocusable(element)) {+ var tabIndex = element.getAttribute('tabindex') || 0;+ return Number(tabIndex);+ }+ return -1;+ },++ /**+ * Searches for nodes that are tabbable and adds them to the `result` array.+ * Returns if the `result` array needs to be sorted by tabindex.+ * @param {!Node} node The starting point for the search; added to `result`+ * if tabbable.+ * @param {!Array<HTMLElement>} result+ * @return {boolean}+ * @private+ */+ _collectTabbableNodes: function(node, result) {+ // If not an element or not visible, no need to explore children.+ if (node.nodeType !== Node.ELEMENT_NODE || !this._isVisible(node)) {+ return false;+ }+ var element = /** @type {HTMLElement} */ (node);+ var tabIndex = this._normalizedTabIndex(element);+ var needsSortByTabIndex = tabIndex > 0;+ if (tabIndex >= 0) {+ result.push(element);+ }++ // In ShadowDOM v1, tab order is affected by the order of distrubution.+ // E.g. getTabbableNodes(#root) in ShadowDOM v1 should return [#A, #B];+ // in ShadowDOM v0 tab order is not affected by the distrubution order,+ // in fact getTabbableNodes(#root) returns [#B, #A].+ // <div id="root">+ // <!-- shadow -->+ // <slot name="a">+ // <slot name="b">+ // <!-- /shadow -->+ // <input id="A" slot="a">+ // <input id="B" slot="b" tabindex="1">+ // </div>+ // TODO(valdrin) support ShadowDOM v1 when upgrading to Polymer v2.0.+ var children;+ if (element.localName === 'content') {+ children = Polymer.dom(element).getDistributedNodes();+ } else {+ // Use shadow root if possible, will check for distributed nodes.+ children = Polymer.dom(element.root || element).children;+ }+ for (var i = 0; i < children.length; i++) {+ // Ensure method is always invoked to collect tabbable children.+ var needsSort = this._collectTabbableNodes(children[i], result);+ needsSortByTabIndex = needsSortByTabIndex || needsSort;+ }+ return needsSortByTabIndex;+ },++ /**+ * Returns false if the element has `visibility: hidden` or `display: none`+ * @param {!HTMLElement} element+ * @return {boolean}+ * @private+ */+ _isVisible: function(element) {+ // Check inline style first to save a re-flow. If looks good, check also+ // computed style.+ var style = element.style;+ if (style.visibility !== 'hidden' && style.display !== 'none') {+ style = window.getComputedStyle(element);+ return (style.visibility !== 'hidden' && style.display !== 'none');+ }+ return false;+ },++ /**+ * Sorts an array of tabbable elements by tabindex. Returns a new array.+ * @param {!Array<HTMLElement>} tabbables+ * @return {Array<HTMLElement>}+ * @private+ */+ _sortByTabIndex: function(tabbables) {+ // Implement a merge sort as Array.prototype.sort does a non-stable sort+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort+ var len = tabbables.length;+ if (len < 2) {+ return tabbables;+ }+ var pivot = Math.ceil(len / 2);+ var left = this._sortByTabIndex(tabbables.slice(0, pivot));+ var right = this._sortByTabIndex(tabbables.slice(pivot));+ return this._mergeSortByTabIndex(left, right);+ },++ /**+ * Merge sort iterator, merges the two arrays into one, sorted by tab index.+ * @param {!Array<HTMLElement>} left+ * @param {!Array<HTMLElement>} right+ * @return {Array<HTMLElement>}+ * @private+ */+ _mergeSortByTabIndex: function(left, right) {+ var result = [];+ while ((left.length > 0) && (right.length > 0)) {+ if (this._hasLowerTabOrder(left[0], right[0])) {+ result.push(right.shift());+ } else {+ result.push(left.shift());+ }+ }++ return result.concat(left, right);+ },++ /**+ * Returns if element `a` has lower tab order compared to element `b`+ * (both elements are assumed to be focusable and tabbable).+ * Elements with tabindex = 0 have lower tab order compared to elements+ * with tabindex > 0.+ * If both have same tabindex, it returns false.+ * @param {!HTMLElement} a+ * @param {!HTMLElement} b+ * @return {boolean}+ * @private+ */+ _hasLowerTabOrder: function(a, b) {+ // Normalize tabIndexes+ // e.g. in Firefox `<div contenteditable>` has `tabIndex = -1`+ var ati = Math.max(a.tabIndex, 0);+ var bti = Math.max(b.tabIndex, 0);+ return (ati === 0 || bti === 0) ? bti > ati : ati > bti;+ }+ };+ })();+</script>diff --git a/frontend/bower_components/iron-overlay-behavior/iron-overlay-backdrop.html b/frontend/bower_components/iron-overlay-behavior/iron-overlay-backdrop.htmlindex 3e0f74514..432a57e11 100644--- a/frontend/bower_components/iron-overlay-behavior/iron-overlay-backdrop.html+++ b/frontend/bower_components/iron-overlay-behavior/iron-overlay-backdrop.html@@ -1,8 +1,32 @@-<html><head><link rel="import" href="../polymer/polymer.html">+<!--+@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+-->+<link rel="import" href="../polymer/polymer.html">+<!--+`iron-overlay-backdrop` is a backdrop used by `Polymer.IronOverlayBehavior`. It should be a+singleton.-</head><body><dom-module id="iron-overlay-backdrop">+### Styling++The following custom properties and mixins are available for styling.++Custom property | Description | Default+-------------------------------------------|------------------------|---------+`--iron-overlay-backdrop-background-color` | Backdrop background color | #000+`--iron-overlay-backdrop-opacity` | Backdrop opacity | 0.6+`--iron-overlay-backdrop` | Mixin applied to `iron-overlay-backdrop`. | {}+`--iron-overlay-backdrop-opened` | Mixin applied to `iron-overlay-backdrop` when it is displayed | {}+-->++<dom-module id="iron-overlay-backdrop"><template><style>@@ -31,5 +55,114 @@</dom-module>-<script>!function(){"use strict";Polymer({is:"iron-overlay-backdrop",properties:{opened:{reflectToAttribute:!0,type:Boolean,value:!1,observer:"_openedChanged"}},listeners:{transitionend:"_onTransitionend"},created:function(){this.__openedRaf=null},attached:function(){this.opened&&this._openedChanged(this.opened)},prepare:function(){this.opened&&!this.parentNode&&Polymer.dom(document.body).appendChild(this)},open:function(){this.opened=!0},close:function(){this.opened=!1},complete:function(){this.opened||this.parentNode!==document.body||Polymer.dom(this.parentNode).removeChild(this)},_onTransitionend:function(e){e&&e.target===this&&this.complete()},_openedChanged:function(e){if(e)this.prepare();else{var t=window.getComputedStyle(this);"0s"!==t.transitionDuration&&0!=t.opacity||this.complete()}this.isAttached&&(this.__openedRaf&&(window.cancelAnimationFrame(this.__openedRaf),this.__openedRaf=null),this.scrollTop=this.scrollTop,this.__openedRaf=window.requestAnimationFrame(function(){this.__openedRaf=null,this.toggleClass("opened",this.opened)}.bind(this)))}})}();</script>-</body></html>\ No newline at end of file+<script>+(function() {+'use strict';++ Polymer({++ is: 'iron-overlay-backdrop',++ properties: {++ /**+ * Returns true if the backdrop is opened.+ */+ opened: {+ reflectToAttribute: true,+ type: Boolean,+ value: false,+ observer: '_openedChanged'+ }++ },++ listeners: {+ 'transitionend': '_onTransitionend'+ },++ created: function() {+ // Used to cancel previous requestAnimationFrame calls when opened changes.+ this.__openedRaf = null;+ },++ attached: function() {+ this.opened && this._openedChanged(this.opened);+ },++ /**+ * Appends the backdrop to document body if needed.+ */+ prepare: function() {+ if (this.opened && !this.parentNode) {+ Polymer.dom(document.body).appendChild(this);+ }+ },++ /**+ * Shows the backdrop.+ */+ open: function() {+ this.opened = true;+ },++ /**+ * Hides the backdrop.+ */+ close: function() {+ this.opened = false;+ },++ /**+ * Removes the backdrop from document body if needed.+ */+ complete: function() {+ if (!this.opened && this.parentNode === document.body) {+ Polymer.dom(this.parentNode).removeChild(this);+ }+ },++ _onTransitionend: function(event) {+ if (event && event.target === this) {+ this.complete();+ }+ },++ /**+ * @param {boolean} opened+ * @private+ */+ _openedChanged: function(opened) {+ if (opened) {+ // Auto-attach.+ this.prepare();+ } else {+ // Animation might be disabled via the mixin or opacity custom property.+ // If it is disabled in other ways, it's up to the user to call complete.+ var cs = window.getComputedStyle(this);+ if (cs.transitionDuration === '0s' || cs.opacity == 0) {+ this.complete();+ }+ }++ if (!this.isAttached) {+ return;+ }++ // Always cancel previous requestAnimationFrame.+ if (this.__openedRaf) {+ window.cancelAnimationFrame(this.__openedRaf);+ this.__openedRaf = null;+ }+ // Force relayout to ensure proper transitions.+ this.scrollTop = this.scrollTop;+ this.__openedRaf = window.requestAnimationFrame(function() {+ this.__openedRaf = null;+ this.toggleClass('opened', this.opened);+ }.bind(this));+ }+ });++})();++</script>diff --git a/frontend/bower_components/iron-overlay-behavior/iron-overlay-behavior.html b/frontend/bower_components/iron-overlay-behavior/iron-overlay-behavior.htmlindex 58a0ab06d..ae085c535 100644--- a/frontend/bower_components/iron-overlay-behavior/iron-overlay-behavior.html+++ b/frontend/bower_components/iron-overlay-behavior/iron-overlay-behavior.html@@ -1,8 +1,637 @@-<html><head><link rel="import" href="../polymer/polymer.html">+<!--+@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+-->++<link rel="import" href="../polymer/polymer.html"><link rel="import" href="../iron-fit-behavior/iron-fit-behavior.html"><link rel="import" href="../iron-resizable-behavior/iron-resizable-behavior.html"><link rel="import" href="iron-overlay-manager.html"><link rel="import" href="iron-focusables-helper.html">-<script>!function(){"use strict";Polymer.IronOverlayBehaviorImpl={properties:{opened:{observer:"_openedChanged",type:Boolean,value:!1,notify:!0},canceled:{observer:"_canceledChanged",readOnly:!0,type:Boolean,value:!1},withBackdrop:{observer:"_withBackdropChanged",type:Boolean},noAutoFocus:{type:Boolean,value:!1},noCancelOnEscKey:{type:Boolean,value:!1},noCancelOnOutsideClick:{type:Boolean,value:!1},closingReason:{type:Object},restoreFocusOnClose:{type:Boolean,value:!1},alwaysOnTop:{type:Boolean},_manager:{type:Object,value:Polymer.IronOverlayManager},_focusedChild:{type:Object}},listeners:{"iron-resize":"_onIronResize"},get backdropElement(){return this._manager.backdropElement},get _focusNode(){return this._focusedChild||Polymer.dom(this).querySelector("[autofocus]")||this},get _focusableNodes(){return Polymer.IronFocusablesHelper.getTabbableNodes(this)},ready:function(){this.__isAnimating=!1,this.__shouldRemoveTabIndex=!1,this.__firstFocusableNode=this.__lastFocusableNode=null,this.__raf=null,this.__restoreFocusNode=null,this._ensureSetup()},attached:function(){this.opened&&this._openedChanged(this.opened),this._observer=Polymer.dom(this).observeNodes(this._onNodesChange)},detached:function(){Polymer.dom(this).unobserveNodes(this._observer),this._observer=null,this.__raf&&(window.cancelAnimationFrame(this.__raf),this.__raf=null),this._manager.removeOverlay(this)},toggle:function(){this._setCanceled(!1),this.opened=!this.opened},open:function(){this._setCanceled(!1),this.opened=!0},close:function(){this._setCanceled(!1),this.opened=!1},cancel:function(e){var t=this.fire("iron-overlay-canceled",e,{cancelable:!0});t.defaultPrevented||(this._setCanceled(!0),this.opened=!1)},invalidateTabbables:function(){this.__firstFocusableNode=this.__lastFocusableNode=null},_ensureSetup:function(){this._overlaySetup||(this._overlaySetup=!0,this.style.outline="none",this.style.display="none")},_openedChanged:function(e){e?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true"),this.isAttached&&(this.__isAnimating=!0,this.__onNextAnimationFrame(this.__openedChanged))},_canceledChanged:function(){this.closingReason=this.closingReason||{},this.closingReason.canceled=this.canceled},_withBackdropChanged:function(){this.withBackdrop&&!this.hasAttribute("tabindex")?(this.setAttribute("tabindex","-1"),this.__shouldRemoveTabIndex=!0):this.__shouldRemoveTabIndex&&(this.removeAttribute("tabindex"),this.__shouldRemoveTabIndex=!1),this.opened&&this.isAttached&&this._manager.trackBackdrop()},_prepareRenderOpened:function(){this.__restoreFocusNode=this._manager.deepActiveElement,this._preparePositioning(),this.refit(),this._finishPositioning(),this.noAutoFocus&&document.activeElement===this._focusNode&&(this._focusNode.blur(),this.__restoreFocusNode.focus())},_renderOpened:function(){this._finishRenderOpened()},_renderClosed:function(){this._finishRenderClosed()},_finishRenderOpened:function(){this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-opened")},_finishRenderClosed:function(){this.style.display="none",this.style.zIndex="",this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-closed",this.closingReason)},_preparePositioning:function(){this.style.transition=this.style.webkitTransition="none",this.style.transform=this.style.webkitTransform="none",this.style.display=""},_finishPositioning:function(){this.style.display="none",this.scrollTop=this.scrollTop,this.style.transition=this.style.webkitTransition="",this.style.transform=this.style.webkitTransform="",this.style.display="",this.scrollTop=this.scrollTop},_applyFocus:function(){if(this.opened)this.noAutoFocus||this._focusNode.focus();else{this._focusNode.blur(),this._focusedChild=null,this.restoreFocusOnClose&&this.__restoreFocusNode&&this.__restoreFocusNode.focus(),this.__restoreFocusNode=null;var e=this._manager.currentOverlay();e&&this!==e&&e._applyFocus()}},_onCaptureClick:function(e){this.noCancelOnOutsideClick||this.cancel(e)},_onCaptureFocus:function(e){if(this.withBackdrop){var t=Polymer.dom(e).path;t.indexOf(this)===-1?(e.stopPropagation(),this._applyFocus()):this._focusedChild=t[0]}},_onCaptureEsc:function(e){this.noCancelOnEscKey||this.cancel(e)},_onCaptureTab:function(e){if(this.withBackdrop){this.__ensureFirstLastFocusables();var t=e.shiftKey,i=t?this.__firstFocusableNode:this.__lastFocusableNode,s=t?this.__lastFocusableNode:this.__firstFocusableNode,o=!1;if(i===s)o=!0;else{var n=this._manager.deepActiveElement;o=n===i||n===this}o&&(e.preventDefault(),this._focusedChild=s,this._applyFocus())}},_onIronResize:function(){this.opened&&!this.__isAnimating&&this.__onNextAnimationFrame(this.refit)},_onNodesChange:function(){this.opened&&!this.__isAnimating&&(this.invalidateTabbables(),this.notifyResize())},__ensureFirstLastFocusables:function(){if(!this.__firstFocusableNode||!this.__lastFocusableNode){var e=this._focusableNodes;this.__firstFocusableNode=e[0],this.__lastFocusableNode=e[e.length-1]}},__openedChanged:function(){this.opened?(this._prepareRenderOpened(),this._manager.addOverlay(this),this._applyFocus(),this._renderOpened()):(this._manager.removeOverlay(this),this._applyFocus(),this._renderClosed())},__onNextAnimationFrame:function(e){this.__raf&&window.cancelAnimationFrame(this.__raf);var t=this;this.__raf=window.requestAnimationFrame(function(){t.__raf=null,e.call(t)})}},Polymer.IronOverlayBehavior=[Polymer.IronFitBehavior,Polymer.IronResizableBehavior,Polymer.IronOverlayBehaviorImpl]}();</script>-</head><body></body></html>\ No newline at end of file+<script>+(function() {+ 'use strict';++ /** @polymerBehavior */+ Polymer.IronOverlayBehaviorImpl = {++ properties: {++ /**+ * True if the overlay is currently displayed.+ */+ opened: {+ observer: '_openedChanged',+ type: Boolean,+ value: false,+ notify: true+ },++ /**+ * True if the overlay was canceled when it was last closed.+ */+ canceled: {+ observer: '_canceledChanged',+ readOnly: true,+ type: Boolean,+ value: false+ },++ /**+ * Set to true to display a backdrop behind the overlay. It traps the focus+ * within the light DOM of the overlay.+ */+ withBackdrop: {+ observer: '_withBackdropChanged',+ type: Boolean+ },++ /**+ * Set to true to disable auto-focusing the overlay or child nodes with+ * the `autofocus` attribute` when the overlay is opened.+ */+ noAutoFocus: {+ type: Boolean,+ value: false+ },++ /**+ * Set to true to disable canceling the overlay with the ESC key.+ */+ noCancelOnEscKey: {+ type: Boolean,+ value: false+ },++ /**+ * Set to true to disable canceling the overlay by clicking outside it.+ */+ noCancelOnOutsideClick: {+ type: Boolean,+ value: false+ },++ /**+ * Contains the reason(s) this overlay was last closed (see `iron-overlay-closed`).+ * `IronOverlayBehavior` provides the `canceled` reason; implementers of the+ * behavior can provide other reasons in addition to `canceled`.+ */+ closingReason: {+ // was a getter before, but needs to be a property so other+ // behaviors can override this.+ type: Object+ },++ /**+ * Set to true to enable restoring of focus when overlay is closed.+ */+ restoreFocusOnClose: {+ type: Boolean,+ value: false+ },++ /**+ * Set to true to keep overlay always on top.+ */+ alwaysOnTop: {+ type: Boolean+ },++ /**+ * Shortcut to access to the overlay manager.+ * @private+ * @type {Polymer.IronOverlayManagerClass}+ */+ _manager: {+ type: Object,+ value: Polymer.IronOverlayManager+ },++ /**+ * The node being focused.+ * @type {?Node}+ */+ _focusedChild: {+ type: Object+ }++ },++ listeners: {+ 'iron-resize': '_onIronResize'+ },++ /**+ * The backdrop element.+ * @type {Element}+ */+ get backdropElement() {+ return this._manager.backdropElement;+ },++ /**+ * Returns the node to give focus to.+ * @type {Node}+ */+ get _focusNode() {+ return this._focusedChild || Polymer.dom(this).querySelector('[autofocus]') || this;+ },++ /**+ * Array of nodes that can receive focus (overlay included), ordered by `tabindex`.+ * This is used to retrieve which is the first and last focusable nodes in order+ * to wrap the focus for overlays `with-backdrop`.+ *+ * If you know what is your content (specifically the first and last focusable children),+ * you can override this method to return only `[firstFocusable, lastFocusable];`+ * @type {Array<Node>}+ * @protected+ */+ get _focusableNodes() {+ return Polymer.IronFocusablesHelper.getTabbableNodes(this);+ },++ ready: function() {+ // Used to skip calls to notifyResize and refit while the overlay is animating.+ this.__isAnimating = false;+ // with-backdrop needs tabindex to be set in order to trap the focus.+ // If it is not set, IronOverlayBehavior will set it, and remove it if with-backdrop = false.+ this.__shouldRemoveTabIndex = false;+ // Used for wrapping the focus on TAB / Shift+TAB.+ this.__firstFocusableNode = this.__lastFocusableNode = null;+ // Used by __onNextAnimationFrame to cancel any previous callback.+ this.__raf = null;+ // Focused node before overlay gets opened. Can be restored on close.+ this.__restoreFocusNode = null;+ this._ensureSetup();+ },++ attached: function() {+ // Call _openedChanged here so that position can be computed correctly.+ if (this.opened) {+ this._openedChanged(this.opened);+ }+ this._observer = Polymer.dom(this).observeNodes(this._onNodesChange);+ },++ detached: function() {+ Polymer.dom(this).unobserveNodes(this._observer);+ this._observer = null;+ if (this.__raf) {+ window.cancelAnimationFrame(this.__raf);+ this.__raf = null;+ }+ this._manager.removeOverlay(this);+ },++ /**+ * Toggle the opened state of the overlay.+ */+ toggle: function() {+ this._setCanceled(false);+ this.opened = !this.opened;+ },++ /**+ * Open the overlay.+ */+ open: function() {+ this._setCanceled(false);+ this.opened = true;+ },++ /**+ * Close the overlay.+ */+ close: function() {+ this._setCanceled(false);+ this.opened = false;+ },++ /**+ * Cancels the overlay.+ * @param {Event=} event The original event+ */+ cancel: function(event) {+ var cancelEvent = this.fire('iron-overlay-canceled', event, {cancelable: true});+ if (cancelEvent.defaultPrevented) {+ return;+ }++ this._setCanceled(true);+ this.opened = false;+ },++ /**+ * Invalidates the cached tabbable nodes. To be called when any of the focusable+ * content changes (e.g. a button is disabled).+ */+ invalidateTabbables: function() {+ this.__firstFocusableNode = this.__lastFocusableNode = null;+ },++ _ensureSetup: function() {+ if (this._overlaySetup) {+ return;+ }+ this._overlaySetup = true;+ this.style.outline = 'none';+ this.style.display = 'none';+ },++ /**+ * Called when `opened` changes.+ * @param {boolean=} opened+ * @protected+ */+ _openedChanged: function(opened) {+ if (opened) {+ this.removeAttribute('aria-hidden');+ } else {+ this.setAttribute('aria-hidden', 'true');+ }++ // Defer any animation-related code on attached+ // (_openedChanged gets called again on attached).+ if (!this.isAttached) {+ return;+ }++ this.__isAnimating = true;++ // Use requestAnimationFrame for non-blocking rendering.+ this.__onNextAnimationFrame(this.__openedChanged);+ },++ _canceledChanged: function() {+ this.closingReason = this.closingReason || {};+ this.closingReason.canceled = this.canceled;+ },++ _withBackdropChanged: function() {+ // If tabindex is already set, no need to override it.+ if (this.withBackdrop && !this.hasAttribute('tabindex')) {+ this.setAttribute('tabindex', '-1');+ this.__shouldRemoveTabIndex = true;+ } else if (this.__shouldRemoveTabIndex) {+ this.removeAttribute('tabindex');+ this.__shouldRemoveTabIndex = false;+ }+ if (this.opened && this.isAttached) {+ this._manager.trackBackdrop();+ }+ },++ /**+ * tasks which must occur before opening; e.g. making the element visible.+ * @protected+ */+ _prepareRenderOpened: function() {+ // Store focused node.+ this.__restoreFocusNode = this._manager.deepActiveElement;++ // Needed to calculate the size of the overlay so that transitions on its size+ // will have the correct starting points.+ this._preparePositioning();+ this.refit();+ this._finishPositioning();++ // Safari will apply the focus to the autofocus element when displayed+ // for the first time, so we make sure to return the focus where it was.+ if (this.noAutoFocus && document.activeElement === this._focusNode) {+ this._focusNode.blur();+ this.__restoreFocusNode.focus();+ }+ },++ /**+ * Tasks which cause the overlay to actually open; typically play an animation.+ * @protected+ */+ _renderOpened: function() {+ this._finishRenderOpened();+ },++ /**+ * Tasks which cause the overlay to actually close; typically play an animation.+ * @protected+ */+ _renderClosed: function() {+ this._finishRenderClosed();+ },++ /**+ * Tasks to be performed at the end of open action. Will fire `iron-overlay-opened`.+ * @protected+ */+ _finishRenderOpened: function() {+ this.notifyResize();+ this.__isAnimating = false;++ this.fire('iron-overlay-opened');+ },++ /**+ * Tasks to be performed at the end of close action. Will fire `iron-overlay-closed`.+ * @protected+ */+ _finishRenderClosed: function() {+ // Hide the overlay.+ this.style.display = 'none';+ // Reset z-index only at the end of the animation.+ this.style.zIndex = '';+ this.notifyResize();+ this.__isAnimating = false;+ this.fire('iron-overlay-closed', this.closingReason);+ },++ _preparePositioning: function() {+ this.style.transition = this.style.webkitTransition = 'none';+ this.style.transform = this.style.webkitTransform = 'none';+ this.style.display = '';+ },++ _finishPositioning: function() {+ // First, make it invisible & reactivate animations.+ this.style.display = 'none';+ // Force reflow before re-enabling animations so that they don't start.+ // Set scrollTop to itself so that Closure Compiler doesn't remove this.+ this.scrollTop = this.scrollTop;+ this.style.transition = this.style.webkitTransition = '';+ this.style.transform = this.style.webkitTransform = '';+ // Now that animations are enabled, make it visible again+ this.style.display = '';+ // Force reflow, so that following animations are properly started.+ // Set scrollTop to itself so that Closure Compiler doesn't remove this.+ this.scrollTop = this.scrollTop;+ },++ /**+ * Applies focus according to the opened state.+ * @protected+ */+ _applyFocus: function() {+ if (this.opened) {+ if (!this.noAutoFocus) {+ this._focusNode.focus();+ }+ }+ else {+ this._focusNode.blur();+ this._focusedChild = null;+ // Restore focus.+ if (this.restoreFocusOnClose && this.__restoreFocusNode) {+ this.__restoreFocusNode.focus();+ }+ this.__restoreFocusNode = null;+ // If many overlays get closed at the same time, one of them would still+ // be the currentOverlay even if already closed, and would call _applyFocus+ // infinitely, so we check for this not to be the current overlay.+ var currentOverlay = this._manager.currentOverlay();+ if (currentOverlay && this !== currentOverlay) {+ currentOverlay._applyFocus();+ }+ }+ },++ /**+ * Cancels (closes) the overlay. Call when click happens outside the overlay.+ * @param {!Event} event+ * @protected+ */+ _onCaptureClick: function(event) {+ if (!this.noCancelOnOutsideClick) {+ this.cancel(event);+ }+ },++ /**+ * Keeps track of the focused child. If withBackdrop, traps focus within overlay.+ * @param {!Event} event+ * @protected+ */+ _onCaptureFocus: function (event) {+ if (!this.withBackdrop) {+ return;+ }+ var path = Polymer.dom(event).path;+ if (path.indexOf(this) === -1) {+ event.stopPropagation();+ this._applyFocus();+ } else {+ this._focusedChild = path[0];+ }+ },++ /**+ * Handles the ESC key event and cancels (closes) the overlay.+ * @param {!Event} event+ * @protected+ */+ _onCaptureEsc: function(event) {+ if (!this.noCancelOnEscKey) {+ this.cancel(event);+ }+ },++ /**+ * Handles TAB key events to track focus changes.+ * Will wrap focus for overlays withBackdrop.+ * @param {!Event} event+ * @protected+ */+ _onCaptureTab: function(event) {+ if (!this.withBackdrop) {+ return;+ }+ this.__ensureFirstLastFocusables();+ // TAB wraps from last to first focusable.+ // Shift + TAB wraps from first to last focusable.+ var shift = event.shiftKey;+ var nodeToCheck = shift ? this.__firstFocusableNode : this.__lastFocusableNode;+ var nodeToSet = shift ? this.__lastFocusableNode : this.__firstFocusableNode;+ var shouldWrap = false;+ if (nodeToCheck === nodeToSet) {+ // If nodeToCheck is the same as nodeToSet, it means we have an overlay+ // with 0 or 1 focusables; in either case we still need to trap the+ // focus within the overlay.+ shouldWrap = true;+ } else {+ // In dom=shadow, the manager will receive focus changes on the main+ // root but not the ones within other shadow roots, so we can't rely on+ // _focusedChild, but we should check the deepest active element.+ var focusedNode = this._manager.deepActiveElement;+ // If the active element is not the nodeToCheck but the overlay itself,+ // it means the focus is about to go outside the overlay, hence we+ // should prevent that (e.g. user opens the overlay and hit Shift+TAB).+ shouldWrap = (focusedNode === nodeToCheck || focusedNode === this);+ }++ if (shouldWrap) {+ // When the overlay contains the last focusable element of the document+ // and it's already focused, pressing TAB would move the focus outside+ // the document (e.g. to the browser search bar). Similarly, when the+ // overlay contains the first focusable element of the document and it's+ // already focused, pressing Shift+TAB would move the focus outside the+ // document (e.g. to the browser search bar).+ // In both cases, we would not receive a focus event, but only a blur.+ // In order to achieve focus wrapping, we prevent this TAB event and+ // force the focus. This will also prevent the focus to temporarily move+ // outside the overlay, which might cause scrolling.+ event.preventDefault();+ this._focusedChild = nodeToSet;+ this._applyFocus();+ }+ },++ /**+ * Refits if the overlay is opened and not animating.+ * @protected+ */+ _onIronResize: function() {+ if (this.opened && !this.__isAnimating) {+ this.__onNextAnimationFrame(this.refit);+ }+ },++ /**+ * Will call notifyResize if overlay is opened.+ * Can be overridden in order to avoid multiple observers on the same node.+ * @protected+ */+ _onNodesChange: function() {+ if (this.opened && !this.__isAnimating) {+ // It might have added focusable nodes, so invalidate cached values.+ this.invalidateTabbables();+ this.notifyResize();+ }+ },++ /**+ * Will set first and last focusable nodes if any of them is not set.+ * @private+ */+ __ensureFirstLastFocusables: function() {+ if (!this.__firstFocusableNode || !this.__lastFocusableNode) {+ var focusableNodes = this._focusableNodes;+ this.__firstFocusableNode = focusableNodes[0];+ this.__lastFocusableNode = focusableNodes[focusableNodes.length - 1];+ }+ },++ /**+ * Tasks executed when opened changes: prepare for the opening, move the+ * focus, update the manager, render opened/closed.+ * @private+ */+ __openedChanged: function() {+ if (this.opened) {+ // Make overlay visible, then add it to the manager.+ this._prepareRenderOpened();+ this._manager.addOverlay(this);+ // Move the focus to the child node with [autofocus].+ this._applyFocus();++ this._renderOpened();+ } else {+ // Remove overlay, then restore the focus before actually closing.+ this._manager.removeOverlay(this);+ this._applyFocus();++ this._renderClosed();+ }+ },++ /**+ * Executes a callback on the next animation frame, overriding any previous+ * callback awaiting for the next animation frame. e.g.+ * `__onNextAnimationFrame(callback1) && __onNextAnimationFrame(callback2)`;+ * `callback1` will never be invoked.+ * @param {!Function} callback Its `this` parameter is the overlay itself.+ * @private+ */+ __onNextAnimationFrame: function(callback) {+ if (this.__raf) {+ window.cancelAnimationFrame(this.__raf);+ }+ var self = this;+ this.__raf = window.requestAnimationFrame(function nextAnimationFrame() {+ self.__raf = null;+ callback.call(self);+ });+ }++ };++ /**+ Use `Polymer.IronOverlayBehavior` to implement an element that can be hidden or shown, and displays+ on top of other content. It includes an optional backdrop, and can be used to implement a variety+ of UI controls including dialogs and drop downs. Multiple overlays may be displayed at once.++ See the [demo source code](https://github.com/PolymerElements/iron-overlay-behavior/blob/master/demo/simple-overlay.html)+ for an example.++ ### Closing and canceling++ An overlay may be hidden by closing or canceling. The difference between close and cancel is user+ intent. Closing generally implies that the user acknowledged the content on the overlay. By default,+ it will cancel whenever the user taps outside it or presses the escape key. This behavior is+ configurable with the `no-cancel-on-esc-key` and the `no-cancel-on-outside-click` properties.+ `close()` should be called explicitly by the implementer when the user interacts with a control+ in the overlay element. When the dialog is canceled, the overlay fires an 'iron-overlay-canceled'+ event. Call `preventDefault` on this event to prevent the overlay from closing.++ ### Positioning++ By default the element is sized and positioned to fit and centered inside the window. You can+ position and size it manually using CSS. See `Polymer.IronFitBehavior`.++ ### Backdrop++ Set the `with-backdrop` attribute to display a backdrop behind the overlay. The backdrop is+ appended to `<body>` and is of type `<iron-overlay-backdrop>`. See its doc page for styling+ options.++ In addition, `with-backdrop` will wrap the focus within the content in the light DOM.+ Override the [`_focusableNodes` getter](#Polymer.IronOverlayBehavior:property-_focusableNodes)+ to achieve a different behavior.++ ### Limitations++ The element is styled to appear on top of other content by setting its `z-index` property. You+ must ensure no element has a stacking context with a higher `z-index` than its parent stacking+ context. You should place this element as a child of `<body>` whenever possible.++ @demo demo/index.html+ @polymerBehavior+ */+ Polymer.IronOverlayBehavior = [Polymer.IronFitBehavior, Polymer.IronResizableBehavior, Polymer.IronOverlayBehaviorImpl];++ /**+ * Fired after the overlay opens.+ * @event iron-overlay-opened+ */++ /**+ * Fired when the overlay is canceled, but before it is closed.+ * @event iron-overlay-canceled+ * @param {Event} event The closing of the overlay can be prevented+ * by calling `event.preventDefault()`. The `event.detail` is the original event that+ * originated the canceling (e.g. ESC keyboard event or click event outside the overlay).+ */++ /**+ * Fired after the overlay closes.+ * @event iron-overlay-closed+ * @param {Event} event The `event.detail` is the `closingReason` property+ * (contains `canceled`, whether the overlay was canceled).+ */++})();+</script>diff --git a/frontend/bower_components/iron-overlay-behavior/iron-overlay-manager.html b/frontend/bower_components/iron-overlay-behavior/iron-overlay-manager.htmlindex 2d8656051..9309c3b5a 100644--- a/frontend/bower_components/iron-overlay-behavior/iron-overlay-manager.html+++ b/frontend/bower_components/iron-overlay-behavior/iron-overlay-manager.html@@ -1,6 +1,362 @@-<html><head><link rel="import" href="../polymer/polymer.html">+<!--+@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+-->++<link rel="import" href="../polymer/polymer.html"><link rel="import" href="../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html"><link rel="import" href="iron-overlay-backdrop.html">-<script>Polymer.IronOverlayManagerClass=function(){this._overlays=[],this._minimumZ=101,this._backdropElement=null,Polymer.Gestures.add(document,"tap",this._onCaptureClick.bind(this)),document.addEventListener("focus",this._onCaptureFocus.bind(this),!0),document.addEventListener("keydown",this._onCaptureKeyDown.bind(this),!0)},Polymer.IronOverlayManagerClass.prototype={constructor:Polymer.IronOverlayManagerClass,get backdropElement(){return this._backdropElement||(this._backdropElement=document.createElement("iron-overlay-backdrop")),this._backdropElement},get deepActiveElement(){for(var e=document.activeElement||document.body;e.root&&Polymer.dom(e.root).activeElement;)e=Polymer.dom(e.root).activeElement;return e},_bringOverlayAtIndexToFront:function(e){var t=this._overlays[e];if(t){var r=this._overlays.length-1,a=this._overlays[r];if(a&&this._shouldBeBehindOverlay(t,a)&&r--,!(e>=r)){var n=Math.max(this.currentOverlayZ(),this._minimumZ);for(this._getZ(t)<=n&&this._applyOverlayZ(t,n);e<r;)this._overlays[e]=this._overlays[e+1],e++;this._overlays[r]=t}}},addOrRemoveOverlay:function(e){e.opened?this.addOverlay(e):this.removeOverlay(e)},addOverlay:function(e){var t=this._overlays.indexOf(e);if(t>=0)return this._bringOverlayAtIndexToFront(t),void this.trackBackdrop();var r=this._overlays.length,a=this._overlays[r-1],n=Math.max(this._getZ(a),this._minimumZ),o=this._getZ(e);if(a&&this._shouldBeBehindOverlay(e,a)){this._applyOverlayZ(a,n),r--;var i=this._overlays[r-1];n=Math.max(this._getZ(i),this._minimumZ)}o<=n&&this._applyOverlayZ(e,n),this._overlays.splice(r,0,e),this.trackBackdrop()},removeOverlay:function(e){var t=this._overlays.indexOf(e);t!==-1&&(this._overlays.splice(t,1),this.trackBackdrop())},currentOverlay:function(){var e=this._overlays.length-1;return this._overlays[e]},currentOverlayZ:function(){return this._getZ(this.currentOverlay())},ensureMinimumZ:function(e){this._minimumZ=Math.max(this._minimumZ,e)},focusOverlay:function(){var e=this.currentOverlay();e&&e._applyFocus()},trackBackdrop:function(){var e=this._overlayWithBackdrop();(e||this._backdropElement)&&(this.backdropElement.style.zIndex=this._getZ(e)-1,this.backdropElement.opened=!!e)},getBackdrops:function(){for(var e=[],t=0;t<this._overlays.length;t++)this._overlays[t].withBackdrop&&e.push(this._overlays[t]);return e},backdropZ:function(){return this._getZ(this._overlayWithBackdrop())-1},_overlayWithBackdrop:function(){for(var e=0;e<this._overlays.length;e++)if(this._overlays[e].withBackdrop)return this._overlays[e]},_getZ:function(e){var t=this._minimumZ;if(e){var r=Number(e.style.zIndex||window.getComputedStyle(e).zIndex);r===r&&(t=r)}return t},_setZ:function(e,t){e.style.zIndex=t},_applyOverlayZ:function(e,t){this._setZ(e,t+2)},_overlayInPath:function(e){e=e||[];for(var t=0;t<e.length;t++)if(e[t]._manager===this)return e[t]},_onCaptureClick:function(e){var t=this.currentOverlay();t&&this._overlayInPath(Polymer.dom(e).path)!==t&&t._onCaptureClick(e)},_onCaptureFocus:function(e){var t=this.currentOverlay();t&&t._onCaptureFocus(e)},_onCaptureKeyDown:function(e){var t=this.currentOverlay();t&&(Polymer.IronA11yKeysBehavior.keyboardEventMatchesKeys(e,"esc")?t._onCaptureEsc(e):Polymer.IronA11yKeysBehavior.keyboardEventMatchesKeys(e,"tab")&&t._onCaptureTab(e))},_shouldBeBehindOverlay:function(e,t){return!e.alwaysOnTop&&t.alwaysOnTop}},Polymer.IronOverlayManager=new Polymer.IronOverlayManagerClass;</script>-</head><body></body></html>\ No newline at end of file+<script>++ /**+ * @struct+ * @constructor+ * @private+ */+ Polymer.IronOverlayManagerClass = function() {+ /**+ * Used to keep track of the opened overlays.+ * @private {Array<Element>}+ */+ this._overlays = [];++ /**+ * iframes have a default z-index of 100,+ * so this default should be at least that.+ * @private {number}+ */+ this._minimumZ = 101;++ /**+ * Memoized backdrop element.+ * @private {Element|null}+ */+ this._backdropElement = null;++ // Enable document-wide tap recognizer.+ Polymer.Gestures.add(document, 'tap', this._onCaptureClick.bind(this));++ document.addEventListener('focus', this._onCaptureFocus.bind(this), true);+ document.addEventListener('keydown', this._onCaptureKeyDown.bind(this), true);+ };++ Polymer.IronOverlayManagerClass.prototype = {++ constructor: Polymer.IronOverlayManagerClass,++ /**+ * The shared backdrop element.+ * @type {!Element} backdropElement+ */+ get backdropElement() {+ if (!this._backdropElement) {+ this._backdropElement = document.createElement('iron-overlay-backdrop');+ }+ return this._backdropElement;+ },++ /**+ * The deepest active element.+ * @type {!Element} activeElement the active element+ */+ get deepActiveElement() {+ // document.activeElement can be null+ // https://developer.mozilla.org/en-US/docs/Web/API/Document/activeElement+ // In case of null, default it to document.body.+ var active = document.activeElement || document.body;+ while (active.root && Polymer.dom(active.root).activeElement) {+ active = Polymer.dom(active.root).activeElement;+ }+ return active;+ },++ /**+ * Brings the overlay at the specified index to the front.+ * @param {number} i+ * @private+ */+ _bringOverlayAtIndexToFront: function(i) {+ var overlay = this._overlays[i];+ if (!overlay) {+ return;+ }+ var lastI = this._overlays.length - 1;+ var currentOverlay = this._overlays[lastI];+ // Ensure always-on-top overlay stays on top.+ if (currentOverlay && this._shouldBeBehindOverlay(overlay, currentOverlay)) {+ lastI--;+ }+ // If already the top element, return.+ if (i >= lastI) {+ return;+ }+ // Update z-index to be on top.+ var minimumZ = Math.max(this.currentOverlayZ(), this._minimumZ);+ if (this._getZ(overlay) <= minimumZ) {+ this._applyOverlayZ(overlay, minimumZ);+ }++ // Shift other overlays behind the new on top.+ while (i < lastI) {+ this._overlays[i] = this._overlays[i + 1];+ i++;+ }+ this._overlays[lastI] = overlay;+ },++ /**+ * Adds the overlay and updates its z-index if it's opened, or removes it if it's closed.+ * Also updates the backdrop z-index.+ * @param {!Element} overlay+ */+ addOrRemoveOverlay: function(overlay) {+ if (overlay.opened) {+ this.addOverlay(overlay);+ } else {+ this.removeOverlay(overlay);+ }+ },++ /**+ * Tracks overlays for z-index and focus management.+ * Ensures the last added overlay with always-on-top remains on top.+ * @param {!Element} overlay+ */+ addOverlay: function(overlay) {+ var i = this._overlays.indexOf(overlay);+ if (i >= 0) {+ this._bringOverlayAtIndexToFront(i);+ this.trackBackdrop();+ return;+ }+ var insertionIndex = this._overlays.length;+ var currentOverlay = this._overlays[insertionIndex - 1];+ var minimumZ = Math.max(this._getZ(currentOverlay), this._minimumZ);+ var newZ = this._getZ(overlay);++ // Ensure always-on-top overlay stays on top.+ if (currentOverlay && this._shouldBeBehindOverlay(overlay, currentOverlay)) {+ // This bumps the z-index of +2.+ this._applyOverlayZ(currentOverlay, minimumZ);+ insertionIndex--;+ // Update minimumZ to match previous overlay's z-index.+ var previousOverlay = this._overlays[insertionIndex - 1];+ minimumZ = Math.max(this._getZ(previousOverlay), this._minimumZ);+ }++ // Update z-index and insert overlay.+ if (newZ <= minimumZ) {+ this._applyOverlayZ(overlay, minimumZ);+ }+ this._overlays.splice(insertionIndex, 0, overlay);++ this.trackBackdrop();+ },++ /**+ * @param {!Element} overlay+ */+ removeOverlay: function(overlay) {+ var i = this._overlays.indexOf(overlay);+ if (i === -1) {+ return;+ }+ this._overlays.splice(i, 1);++ this.trackBackdrop();+ },++ /**+ * Returns the current overlay.+ * @return {Element|undefined}+ */+ currentOverlay: function() {+ var i = this._overlays.length - 1;+ return this._overlays[i];+ },++ /**+ * Returns the current overlay z-index.+ * @return {number}+ */+ currentOverlayZ: function() {+ return this._getZ(this.currentOverlay());+ },++ /**+ * Ensures that the minimum z-index of new overlays is at least `minimumZ`.+ * This does not effect the z-index of any existing overlays.+ * @param {number} minimumZ+ */+ ensureMinimumZ: function(minimumZ) {+ this._minimumZ = Math.max(this._minimumZ, minimumZ);+ },++ focusOverlay: function() {+ var current = /** @type {?} */ (this.currentOverlay());+ if (current) {+ current._applyFocus();+ }+ },++ /**+ * Updates the backdrop z-index.+ */+ trackBackdrop: function() {+ var overlay = this._overlayWithBackdrop();+ // Avoid creating the backdrop if there is no overlay with backdrop.+ if (!overlay && !this._backdropElement) {+ return;+ }+ this.backdropElement.style.zIndex = this._getZ(overlay) - 1;+ this.backdropElement.opened = !!overlay;+ },++ /**+ * @return {Array<Element>}+ */+ getBackdrops: function() {+ var backdrops = [];+ for (var i = 0; i < this._overlays.length; i++) {+ if (this._overlays[i].withBackdrop) {+ backdrops.push(this._overlays[i]);+ }+ }+ return backdrops;+ },++ /**+ * Returns the z-index for the backdrop.+ * @return {number}+ */+ backdropZ: function() {+ return this._getZ(this._overlayWithBackdrop()) - 1;+ },++ /**+ * Returns the first opened overlay that has a backdrop.+ * @return {Element|undefined}+ * @private+ */+ _overlayWithBackdrop: function() {+ for (var i = 0; i < this._overlays.length; i++) {+ if (this._overlays[i].withBackdrop) {+ return this._overlays[i];+ }+ }+ },++ /**+ * Calculates the minimum z-index for the overlay.+ * @param {Element=} overlay+ * @private+ */+ _getZ: function(overlay) {+ var z = this._minimumZ;+ if (overlay) {+ var z1 = Number(overlay.style.zIndex || window.getComputedStyle(overlay).zIndex);+ // Check if is a number+ // Number.isNaN not supported in IE 10++ if (z1 === z1) {+ z = z1;+ }+ }+ return z;+ },++ /**+ * @param {!Element} element+ * @param {number|string} z+ * @private+ */+ _setZ: function(element, z) {+ element.style.zIndex = z;+ },++ /**+ * @param {!Element} overlay+ * @param {number} aboveZ+ * @private+ */+ _applyOverlayZ: function(overlay, aboveZ) {+ this._setZ(overlay, aboveZ + 2);+ },++ /**+ * Returns the deepest overlay in the path.+ * @param {Array<Element>=} path+ * @return {Element|undefined}+ * @suppress {missingProperties}+ * @private+ */+ _overlayInPath: function(path) {+ path = path || [];+ for (var i = 0; i < path.length; i++) {+ if (path[i]._manager === this) {+ return path[i];+ }+ }+ },++ /**+ * Ensures the click event is delegated to the right overlay.+ * @param {!Event} event+ * @private+ */+ _onCaptureClick: function(event) {+ var overlay = /** @type {?} */ (this.currentOverlay());+ // Check if clicked outside of top overlay.+ if (overlay && this._overlayInPath(Polymer.dom(event).path) !== overlay) {+ overlay._onCaptureClick(event);+ }+ },++ /**+ * Ensures the focus event is delegated to the right overlay.+ * @param {!Event} event+ * @private+ */+ _onCaptureFocus: function(event) {+ var overlay = /** @type {?} */ (this.currentOverlay());+ if (overlay) {+ overlay._onCaptureFocus(event);+ }+ },++ /**+ * Ensures TAB and ESC keyboard events are delegated to the right overlay.+ * @param {!Event} event+ * @private+ */+ _onCaptureKeyDown: function(event) {+ var overlay = /** @type {?} */ (this.currentOverlay());+ if (overlay) {+ if (Polymer.IronA11yKeysBehavior.keyboardEventMatchesKeys(event, 'esc')) {+ overlay._onCaptureEsc(event);+ } else if (Polymer.IronA11yKeysBehavior.keyboardEventMatchesKeys(event, 'tab')) {+ overlay._onCaptureTab(event);+ }+ }+ },++ /**+ * Returns if the overlay1 should be behind overlay2.+ * @param {!Element} overlay1+ * @param {!Element} overlay2+ * @return {boolean}+ * @suppress {missingProperties}+ * @private+ */+ _shouldBeBehindOverlay: function(overlay1, overlay2) {+ return !overlay1.alwaysOnTop && overlay2.alwaysOnTop;+ }+ };++ Polymer.IronOverlayManager = new Polymer.IronOverlayManagerClass();+</script>diff --git a/frontend/bower_components/paper-dialog-behavior/.bower.json b/frontend/bower_components/paper-dialog-behavior/.bower.jsonnew file mode 100644index 000000000..8ac5fcb3f--- /dev/null+++ b/frontend/bower_components/paper-dialog-behavior/.bower.json@@ -0,0 +1,49 @@+{+ "name": "paper-dialog-behavior",+ "version": "1.2.7",+ "description": "Implements a behavior used for material design dialogs",+ "authors": "The Polymer Authors",+ "keywords": [+ "web-components",+ "polymer",+ "dialog",+ "overlay",+ "behavior"+ ],+ "main": "paper-dialog-behavior.html",+ "private": true,+ "repository": {+ "type": "git",+ "url": "git://github.com/PolymerElements/paper-dialog-behavior"+ },+ "license": "http://polymer.github.io/LICENSE.txt",+ "homepage": "https://github.com/PolymerElements/paper-dialog-behavior",+ "ignore": [],+ "dependencies": {+ "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^1.0.0",+ "paper-styles": "PolymerElements/paper-styles#^1.1.0",+ "polymer": "Polymer/polymer#^1.1.0"+ },+ "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",+ "paper-button": "PolymerElements/paper-button#^1.0.0",+ "paper-dialog-scrollable": "PolymerElements/paper-dialog-scrollable#^1.0.0",+ "paper-dropdown-menu": "PolymerElements/paper-dropdown-menu#^1.0.0",+ "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",+ "paper-item": "PolymerElements/paper-item#^1.0.0",+ "paper-listbox": "PolymerElements/paper-listbox#^1.0.0",+ "web-component-tester": "^4.0.0",+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"+ },+ "_release": "1.2.7",+ "_resolution": {+ "type": "version",+ "tag": "v1.2.7",+ "commit": "decc77ca55c0381cf01d7409ddf1eb966543e84e"+ },+ "_source": "https://github.com/PolymerElements/paper-dialog-behavior.git",+ "_target": "^1.0.0",+ "_originalSource": "PolymerElements/paper-dialog-behavior"+}\ No newline at end of filediff --git a/frontend/bower_components/paper-dialog-behavior/.github/ISSUE_TEMPLATE.md b/frontend/bower_components/paper-dialog-behavior/.github/ISSUE_TEMPLATE.mdnew file mode 100644index 000000000..f544977ff--- /dev/null+++ b/frontend/bower_components/paper-dialog-behavior/.github/ISSUE_TEMPLATE.md@@ -0,0 +1,33 @@+<!-- Instructions: https://github.com/PolymerElements/paper-dialog-behavior/CONTRIBUTING.md#filing-issues -->+### Description+<!-- Example: The `paper-foo` element causes the page to turn pink when clicked. -->++### Expected outcome++<!-- Example: The page stays the same color. -->++### Actual outcome++<!-- Example: The page turns pink. -->++### Live Demo+<!-- Example: https://jsbin.com/cagaye/edit?html,output -->++### Steps to reproduce++<!-- Example+1. Put a `paper-foo` element in the page.+2. Open the page in a web browser.+3. Click the `paper-foo` element.+-->++### Browsers Affected+<!-- Check all that apply -->+- [ ] Chrome+- [ ] Firefox+- [ ] Safari 9+- [ ] Safari 8+- [ ] Safari 7+- [ ] Edge+- [ ] IE 11+- [ ] IE 10diff --git a/frontend/bower_components/paper-dialog-behavior/.gitignore b/frontend/bower_components/paper-dialog-behavior/.gitignorenew file mode 100644index 000000000..8d4ae2536--- /dev/null+++ b/frontend/bower_components/paper-dialog-behavior/.gitignore@@ -0,0 +1 @@+bower_componentsdiff --git a/frontend/bower_components/paper-dialog-behavior/.travis.yml b/frontend/bower_components/paper-dialog-behavior/.travis.ymlnew file mode 100644index 000000000..7319854af--- /dev/null+++ b/frontend/bower_components/paper-dialog-behavior/.travis.yml@@ -0,0 +1,23 @@+language: node_js+sudo: required+before_script:+ - npm install -g bower polylint web-component-tester+ - bower install+ - polylint+env:+ global:+ - secure: ZBrrZGA8OWY95x8yHSsKUNrQfowhRe/s/pMZhHgnoppnZ1+bDfpoms+ggOdvH0TgURAAdF+1Wq1mTCgNp0FYLJ3Oe34XseDIxiA3wXSQO/E2m4Cfj/w4fRvaSy8ikdz5urQJET33SjDKdggm1FmWmnt6vSVgW/mg8M7AW2KWDcE=+ - secure: P5UKkTar39Q1k0VwtF5LhOphqNiW3r+DSnN1vRNA4oKZPrt6l3dJE1hpA9+1x1m6SryG856lLekPM6/fVZuC7nyDKFLz4vU/EWhiGdyWN1lHhE2MDh281TsCtzK56S0uJxdmlIpSiWTFWIrrEiiewN2b8dXy3FSPfy0Fo1sGn54=+node_js: stable+addons:+ firefox: '46.0'+ apt:+ sources:+ - google-chrome+ packages:+ - google-chrome-stable+ sauce_connect: true+script:+ - xvfb-run wct+ - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"+dist: trustydiff --git a/frontend/bower_components/paper-dialog-behavior/CONTRIBUTING.md b/frontend/bower_components/paper-dialog-behavior/CONTRIBUTING.mdnew file mode 100644index 000000000..093090d43--- /dev/null+++ b/frontend/bower_components/paper-dialog-behavior/CONTRIBUTING.md@@ -0,0 +1,77 @@+<!--+This file is autogenerated based on+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++Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:++### Filing Issues++**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:++ 1. **Who will use the feature?** _“As someone filling out a form…”_+ 2. **When will they use the feature?** _“When I enter an invalid value…”_+ 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_++**If you are filing an issue to report a bug**, please provide:++ 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:++ ```markdown+ The `paper-foo` element causes the page to turn pink when clicked.++ ## Expected outcome++ The page stays the same color.++ ## Actual outcome++ The page turns pink.++ ## Steps to reproduce++ 1. Put a `paper-foo` element in the page.+ 2. Open the page in a web browser.+ 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: [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.++### Submitting Pull Requests++**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.++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 in the pull request description using the following syntax:++ ```markdown+ (For a single issue)+ Fixes #20++ (For multiple issues)+ Fixes #32, fixes #40+ ```++ 2. **A succinct description of the design** used to fix any related issues. For example:++ ```markdown+ This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.+ ```++ 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.++If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!diff --git a/frontend/bower_components/paper-dialog-behavior/README.md b/frontend/bower_components/paper-dialog-behavior/README.mdnew file mode 100644index 000000000..ba8acc409--- /dev/null+++ b/frontend/bower_components/paper-dialog-behavior/README.md@@ -0,0 +1,54 @@++<!---++This README is automatically generated from the comments in these files:+paper-dialog-behavior.html++Edit those files, and our readme bot will duplicate them over here!+Edit this file, and the bot will squash your changes :)++The bot does some handling of markdown. Please file a bug if it does the wrong+thing! https://github.com/PolymerLabs/tedium/issues++-->++[](https://travis-ci.org/PolymerElements/paper-dialog-behavior)++_[Demo and API docs](https://elements.polymer-project.org/elements/paper-dialog-behavior)_+++##Polymer.PaperDialogBehavior++Use `Polymer.PaperDialogBehavior` and `paper-dialog-shared-styles.html` to implement a Material Design+dialog.++For example, if `<paper-dialog-impl>` implements this behavior:++```html+<paper-dialog-impl>+ <h2>Header</h2>+ <div>Dialog body</div>+ <div class="buttons">+ <paper-button dialog-dismiss>Cancel</paper-button>+ <paper-button dialog-confirm>Accept</paper-button>+ </div>+</paper-dialog-impl>+```++`paper-dialog-shared-styles.html` provide styles for a header, content area, and an action area for buttons.+Use the `<h2>` tag for the header and the `buttons` class for the action area. You can use the+`paper-dialog-scrollable` element (in its own repository) if you need a scrolling content area.++Use the `dialog-dismiss` and `dialog-confirm` attributes on interactive controls to close the+dialog. If the user dismisses the dialog with `dialog-confirm`, the `closingReason` will update+to include `confirmed: true`.++### Accessibility++This element has `role="dialog"` by default. Depending on the context, it may be more appropriate+to override this attribute with `role="alertdialog"`.++If `modal` is set, the element will set `aria-modal` and prevent the focus from exiting the element.+It will also ensure that focus remains in the dialog.++diff --git a/frontend/bower_components/paper-dialog-behavior/bower.json b/frontend/bower_components/paper-dialog-behavior/bower.jsonnew file mode 100644index 000000000..cbe17d39c--- /dev/null+++ b/frontend/bower_components/paper-dialog-behavior/bower.json@@ -0,0 +1,40 @@+{+ "name": "paper-dialog-behavior",+ "version": "1.2.7",+ "description": "Implements a behavior used for material design dialogs",+ "authors": "The Polymer Authors",+ "keywords": [+ "web-components",+ "polymer",+ "dialog",+ "overlay",+ "behavior"+ ],+ "main": "paper-dialog-behavior.html",+ "private": true,+ "repository": {+ "type": "git",+ "url": "git://github.com/PolymerElements/paper-dialog-behavior"+ },+ "license": "http://polymer.github.io/LICENSE.txt",+ "homepage": "https://github.com/PolymerElements/paper-dialog-behavior",+ "ignore": [],+ "dependencies": {+ "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^1.0.0",+ "paper-styles": "PolymerElements/paper-styles#^1.1.0",+ "polymer": "Polymer/polymer#^1.1.0"+ },+ "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",+ "paper-button": "PolymerElements/paper-button#^1.0.0",+ "paper-dialog-scrollable": "PolymerElements/paper-dialog-scrollable#^1.0.0",+ "paper-dropdown-menu": "PolymerElements/paper-dropdown-menu#^1.0.0",+ "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",+ "paper-item": "PolymerElements/paper-item#^1.0.0",+ "paper-listbox": "PolymerElements/paper-listbox#^1.0.0",+ "web-component-tester": "^4.0.0",+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"+ }+}diff --git a/frontend/bower_components/paper-dialog-behavior/demo/index.html b/frontend/bower_components/paper-dialog-behavior/demo/index.htmlnew file mode 100644index 000000000..193dddcc2--- /dev/null+++ b/frontend/bower_components/paper-dialog-behavior/demo/index.html@@ -0,0 +1,102 @@+<!doctype html>+<!--+@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+-->+<html>+<head>++ <meta charset="utf-8">+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">++ <title>paper-dialog-behavior demo</title>++ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>++ <link rel="import" href="simple-dialog.html">++ <link rel="import" href="../../paper-button/paper-button.html">+ <link rel="import" href="../../paper-dropdown-menu/paper-dropdown-menu.html">+ <link rel="import" href="../../paper-item/paper-item.html">+ <link rel="import" href="../../paper-listbox/paper-listbox.html">+ <link rel="import" href="../../paper-dialog-scrollable/paper-dialog-scrollable.html">+ <link rel="import" href="../../iron-demo-helpers/demo-snippet.html">+ <link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">++ <style is="custom-style" include="demo-pages-shared-styles"></style>+</head>+<body unresolved class="centered">++ <h3>An element with <code>PaperDialogBehavior</code> can be opened, closed, toggled. Use <code>h2</code> for the title</h3>+ <demo-snippet class="centered-demo">+ <template>+ <paper-button raised onclick="dialog.toggle()">dialog</paper-button>+ <simple-dialog id="dialog">+ <h2>Dialog Title</h2>+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>+ </simple-dialog>+ </template>+ </demo-snippet>++ <h3>An element with <code>PaperDialogBehavior</code> can be modal. Use the attributes <code>dialog-dismiss</code> and <code>dialog-confirm</code> on the children to close it.</h3>+ <demo-snippet class="centered-demo">+ <template>+ <paper-button raised onclick="modalAlert.toggle()">modal alert</paper-button>+ <simple-dialog id="modalAlert" modal role="alertdialog">+ <h2>Alert</h2>+ <paper-dropdown-menu label="Draft to discard">+ <paper-listbox class="dropdown-content">+ <paper-item>Draft 1</paper-item>+ <paper-item>Draft 2</paper-item>+ <paper-item>Draft 3</paper-item>+ <paper-item>Draft 4</paper-item>+ </paper-listbox>+ </paper-dropdown-menu>+ <div class="buttons">+ <paper-button onclick="modalDetails.toggle()">More details</paper-button>+ <paper-button dialog-dismiss>Cancel</paper-button>+ <paper-button dialog-confirm autofocus>Discard</paper-button>+ </div>+ </simple-dialog>+ <simple-dialog id="modalDetails" modal>+ <h2>Details</h2>+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>+ <div class="buttons">+ <paper-button dialog-confirm autofocus>OK</paper-button>+ </div>+ </simple-dialog>+ </template>+ </demo-snippet>++ <h3>Use <code>paper-dialog-scrollable</code> for scrolling content</h3>+ <demo-snippet class="centered-demo">+ <template>+ <paper-button raised onclick="scrolling.toggle()">scrolling</paper-button>+ <simple-dialog id="scrolling">+ <h2>Scrolling</h2>+ <paper-dialog-scrollable>+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>+ </paper-dialog-scrollable>+ <div class="buttons">+ <paper-button dialog-dismiss>Cancel</paper-button>+ <paper-button dialog-confirm>OK</paper-button>+ </div>+ </simple-dialog>+ </template>+ </demo-snippet>++</body>+</html>diff --git a/frontend/bower_components/paper-dialog-behavior/demo/simple-dialog.html b/frontend/bower_components/paper-dialog-behavior/demo/simple-dialog.htmlnew file mode 100644index 000000000..a20437239--- /dev/null+++ b/frontend/bower_components/paper-dialog-behavior/demo/simple-dialog.html@@ -0,0 +1,39 @@+<!--+@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+-->++<link rel="import" href="../../polymer/polymer.html">+<link rel="import" href="../paper-dialog-behavior.html">+<link rel="import" href="../paper-dialog-shared-styles.html">++<dom-module id="simple-dialog">+ <template>+ <style include="paper-dialog-shared-styles"></style>+ <content></content>+ </template>++</dom-module>++<script>++(function() {++ Polymer({++ is: 'simple-dialog',++ behaviors: [+ Polymer.PaperDialogBehavior+ ]++ });++})();++</script>diff --git a/frontend/bower_components/paper-dialog-behavior/hero.svg b/frontend/bower_components/paper-dialog-behavior/hero.svgnew file mode 100755index 000000000..564ccd387--- /dev/null+++ b/frontend/bower_components/paper-dialog-behavior/hero.svg@@ -0,0 +1,51 @@+<?xml version="1.0" encoding="utf-8"?>+<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"+ viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">+<g id="background" display="none">+ <rect display="inline" fill="#B0BEC5" width="225" height="126"/>+</g>+<g id="label">+</g>+<g id="art">+ <g>+ <polygon points="76.7,98 79.2,98 74,91.1 74,94.4 "/>+ <polygon points="74,81.4 74,84.7 84.1,98 86.6,98 "/>+ <polygon points="74,71.7 74,75 91.5,98 94,98 "/>+ <polygon points="74,62 74,65.3 98.9,98 101.4,98 "/>+ <polygon points="94.3,79 92,79 92,76 74,52.3 74,55.6 106.2,98 108.7,98 "/>+ <polygon points="92,69.6 92,66.3 74,42.6 74,45.9 "/>+ <polygon points="101.7,79 99.2,79 113.6,98 116.1,98 "/>+ <polygon points="92,59.9 92,56.6 74,32.9 74,36.2 "/>+ <polygon points="109.1,79 106.5,79 121,98 123.5,98 "/>+ <polygon points="92,50.2 92,47 92.1,47 77.7,28 75.2,28 "/>+ <polygon points="116.4,79 113.9,79 128.4,98 130.9,98 "/>+ <polygon points="97,47 99.5,47 85,28 82.5,28 "/>+ <polygon points="123.8,79 121.3,79 135.7,98 138.2,98 "/>+ <polygon points="104.4,47 106.9,47 92.4,28 89.9,28 "/>+ <polygon points="131.2,79 128.7,79 143.1,98 145.6,98 "/>+ <polygon points="132,70.4 132,73.7 150,97.4 150,94.1 "/>+ <polygon points="111.7,47 114.2,47 99.8,28 97.3,28 "/>+ <polygon points="132,60.7 132,64 150,87.7 150,84.3 "/>+ <polygon points="119.1,47 121.6,47 107.2,28 104.7,28 "/>+ <polygon points="132,51 132,54.3 150,77.9 150,74.6 "/>+ <polygon points="114.6,28 112,28 126.5,47 129,47 "/>+ <polygon points="121.9,28 119.4,28 150,68.2 150,64.9 "/>+ <polygon points="129.3,28 126.8,28 150,58.5 150,55.2 "/>+ <polygon points="136.7,28 134.2,28 150,48.8 150,45.5 "/>+ <polygon points="144.1,28 141.5,28 150,39.1 150,35.8 "/>+ <polygon points="150,29.4 150,28 148.9,28 "/>+ </g>+ <path d="M133,80H91V46h42V80z M93,78h38V48H93V78z"/>+ <path d="M151,99H73V27h78V99z M75,97h74V29H75V97z"/>+ <circle cx="74" cy="28" r="4"/>+ <circle cx="150" cy="28" r="4"/>+ <circle cx="150" cy="98" r="4"/>+ <circle cx="74" cy="98" r="4"/>+ <g id="ic_x5F_add_x0D_">+ </g>+</g>+<g id="Guides">+</g>+</svg>diff --git a/frontend/bower_components/paper-dialog-behavior/index.html b/frontend/bower_components/paper-dialog-behavior/index.htmlnew file mode 100644index 000000000..af98b85ac--- /dev/null+++ b/frontend/bower_components/paper-dialog-behavior/index.html@@ -0,0 +1,30 @@+<!doctype html>+<!--+@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+-->+<html>+<head>++ <meta charset="utf-8">+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">++ <title>paper-dialog-behavior</title>++ <script src="../webcomponentsjs/webcomponents-lite.js"></script>++ <link rel="import" href="../polymer/polymer.html">+ <link rel="import" href="../iron-component-page/iron-component-page.html">++</head>+<body>++ <iron-component-page></iron-component-page>++</body>+</html>diff --git a/frontend/bower_components/paper-dialog-behavior/paper-dialog-behavior.html b/frontend/bower_components/paper-dialog-behavior/paper-dialog-behavior.htmlnew file mode 100644index 000000000..6b45ddd16--- /dev/null+++ b/frontend/bower_components/paper-dialog-behavior/paper-dialog-behavior.html@@ -0,0 +1,140 @@+<!--+@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+-->++<link rel="import" href="../polymer/polymer.html">+<link rel="import" href="../iron-overlay-behavior/iron-overlay-behavior.html">++<script>++/**+Use `Polymer.PaperDialogBehavior` and `paper-dialog-shared-styles.html` to implement a Material Design+dialog.++For example, if `<paper-dialog-impl>` implements this behavior:++ <paper-dialog-impl>+ <h2>Header</h2>+ <div>Dialog body</div>+ <div class="buttons">+ <paper-button dialog-dismiss>Cancel</paper-button>+ <paper-button dialog-confirm>Accept</paper-button>+ </div>+ </paper-dialog-impl>++`paper-dialog-shared-styles.html` provide styles for a header, content area, and an action area for buttons.+Use the `<h2>` tag for the header and the `buttons` class for the action area. You can use the+`paper-dialog-scrollable` element (in its own repository) if you need a scrolling content area.++Use the `dialog-dismiss` and `dialog-confirm` attributes on interactive controls to close the+dialog. If the user dismisses the dialog with `dialog-confirm`, the `closingReason` will update+to include `confirmed: true`.++### Accessibility++This element has `role="dialog"` by default. Depending on the context, it may be more appropriate+to override this attribute with `role="alertdialog"`.++If `modal` is set, the element will prevent the focus from exiting the element.+It will also ensure that focus remains in the dialog.++@hero hero.svg+@demo demo/index.html+@polymerBehavior Polymer.PaperDialogBehavior+*/++ Polymer.PaperDialogBehaviorImpl = {++ hostAttributes: {+ 'role': 'dialog',+ 'tabindex': '-1'+ },++ properties: {++ /**+ * If `modal` is true, this implies `no-cancel-on-outside-click`, `no-cancel-on-esc-key` and `with-backdrop`.+ */+ modal: {+ type: Boolean,+ value: false+ }++ },++ observers: [+ '_modalChanged(modal, _readied)'+ ],++ listeners: {+ 'tap': '_onDialogClick'+ },++ ready: function () {+ // Only now these properties can be read.+ this.__prevNoCancelOnOutsideClick = this.noCancelOnOutsideClick;+ this.__prevNoCancelOnEscKey = this.noCancelOnEscKey;+ this.__prevWithBackdrop = this.withBackdrop;+ },++ _modalChanged: function(modal, readied) {+ // modal implies noCancelOnOutsideClick, noCancelOnEscKey and withBackdrop.+ // We need to wait for the element to be ready before we can read the+ // properties values.+ if (!readied) {+ return;+ }++ if (modal) {+ this.__prevNoCancelOnOutsideClick = this.noCancelOnOutsideClick;+ this.__prevNoCancelOnEscKey = this.noCancelOnEscKey;+ this.__prevWithBackdrop = this.withBackdrop;+ this.noCancelOnOutsideClick = true;+ this.noCancelOnEscKey = true;+ this.withBackdrop = true;+ } else {+ // If the value was changed to false, let it false.+ this.noCancelOnOutsideClick = this.noCancelOnOutsideClick &&+ this.__prevNoCancelOnOutsideClick;+ this.noCancelOnEscKey = this.noCancelOnEscKey &&+ this.__prevNoCancelOnEscKey;+ this.withBackdrop = this.withBackdrop && this.__prevWithBackdrop;+ }+ },++ _updateClosingReasonConfirmed: function(confirmed) {+ this.closingReason = this.closingReason || {};+ this.closingReason.confirmed = confirmed;+ },++ /**+ * Will dismiss the dialog if user clicked on an element with dialog-dismiss+ * or dialog-confirm attribute.+ */+ _onDialogClick: function(event) {+ // Search for the element with dialog-confirm or dialog-dismiss,+ // from the root target until this (excluded).+ var path = Polymer.dom(event).path;+ for (var i = 0; i < path.indexOf(this); i++) {+ var target = path[i];+ if (target.hasAttribute && (target.hasAttribute('dialog-dismiss') || target.hasAttribute('dialog-confirm'))) {+ this._updateClosingReasonConfirmed(target.hasAttribute('dialog-confirm'));+ this.close();+ event.stopPropagation();+ break;+ }+ }+ }++ };++ /** @polymerBehavior */+ Polymer.PaperDialogBehavior = [Polymer.IronOverlayBehavior, Polymer.PaperDialogBehaviorImpl];++</script>diff --git a/frontend/bower_components/paper-dialog-behavior/paper-dialog-common.css b/frontend/bower_components/paper-dialog-behavior/paper-dialog-common.cssnew file mode 100644index 000000000..560b0a56a--- /dev/null+++ b/frontend/bower_components/paper-dialog-behavior/paper-dialog-common.css@@ -0,0 +1,57 @@+/*+@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;+ margin: 24px 40px;++ background: var(--paper-dialog-background-color, --primary-background-color);+ color: var(--paper-dialog-color, --primary-text-color);++ @apply(--paper-font-body1);+ @apply(--shadow-elevation-16dp);+ @apply(--paper-dialog);+}++:host > ::content > * {+ margin-top: 20px;+ padding: 0 24px;+}++:host > ::content > .no-padding {+ padding: 0;+}++:host > ::content > *:first-child {+ margin-top: 24px;+}++:host > ::content > *:last-child {+ margin-bottom: 24px;+}++:host > ::content h2 {+ position: relative;+ margin: 0;+ @apply(--paper-font-title);++ @apply(--paper-dialog-title);+}++:host > ::content .buttons {+ position: relative;+ padding: 8px 8px 8px 24px;+ margin: 0;++ color: var(--paper-dialog-button-color, --primary-color);++ @apply(--layout-horizontal);+ @apply(--layout-end-justified);+}diff --git a/frontend/bower_components/paper-dialog-behavior/paper-dialog-shared-styles.html b/frontend/bower_components/paper-dialog-behavior/paper-dialog-shared-styles.htmlnew file mode 100644index 000000000..35ea74bd7--- /dev/null+++ b/frontend/bower_components/paper-dialog-behavior/paper-dialog-shared-styles.html@@ -0,0 +1,83 @@+<!--+@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+-->++<link rel="import" href="../polymer/polymer.html">+<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">+<link rel="import" href="../paper-styles/default-theme.html">+<link rel="import" href="../paper-styles/typography.html">+<link rel="import" href="../paper-styles/shadow.html">++<!--+### Styling++The following custom properties and mixins are available for styling.++Custom property | Description | Default+----------------|-------------|----------+`--paper-dialog-background-color` | Dialog background color | `--primary-background-color`+`--paper-dialog-color` | Dialog foreground color | `--primary-text-color`+`--paper-dialog` | Mixin applied to the dialog | `{}`+`--paper-dialog-title` | Mixin applied to the title (`<h2>`) element | `{}`+`--paper-dialog-button-color` | Button area foreground color | `--default-primary-color`+-->++<dom-module id="paper-dialog-shared-styles">+ <template>+ <style>+ :host {+ display: block;+ margin: 24px 40px;++ background: var(--paper-dialog-background-color, --primary-background-color);+ color: var(--paper-dialog-color, --primary-text-color);++ @apply(--paper-font-body1);+ @apply(--shadow-elevation-16dp);+ @apply(--paper-dialog);+ }++ :host > ::content > * {+ margin-top: 20px;+ padding: 0 24px;+ }++ :host > ::content > .no-padding {+ padding: 0;+ }++ :host > ::content > *:first-child {+ margin-top: 24px;+ }++ :host > ::content > *:last-child {+ margin-bottom: 24px;+ }++ :host > ::content h2 {+ position: relative;+ margin: 0;+ @apply(--paper-font-title);++ @apply(--paper-dialog-title);+ }++ :host > ::content .buttons {+ position: relative;+ padding: 8px 8px 8px 24px;+ margin: 0;++ color: var(--paper-dialog-button-color, --primary-color);++ @apply(--layout-horizontal);+ @apply(--layout-end-justified);+ }+ </style>+ </template>+</dom-module>diff --git a/frontend/bower_components/paper-dialog-behavior/test/index.html b/frontend/bower_components/paper-dialog-behavior/test/index.htmlnew file mode 100644index 000000000..cb0a87023--- /dev/null+++ b/frontend/bower_components/paper-dialog-behavior/test/index.html@@ -0,0 +1,31 @@+<!DOCTYPE html><!--+@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+--><html><head>++ <title>paper-dialog tests</title>++ <meta charset="utf-8">+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">++ <script src="../../web-component-tester/browser.js"></script>++ </head>+ <body>++ <script>+ WCT.loadSuites([+ 'paper-dialog-behavior.html',+ 'paper-dialog-behavior.html?dom=shadow'+ ]);+ </script>++++</body></html>diff --git a/frontend/bower_components/paper-dialog-behavior/test/paper-dialog-behavior.html b/frontend/bower_components/paper-dialog-behavior/test/paper-dialog-behavior.htmlnew file mode 100644index 000000000..d7c260e77--- /dev/null+++ b/frontend/bower_components/paper-dialog-behavior/test/paper-dialog-behavior.html@@ -0,0 +1,408 @@+<!doctype html>+<!--+@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+-->+<html>++ <head>++ <title>paper-dialog-behavior tests</title>++ <meta charset="utf-8">+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">++ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>+ <script src="../../web-component-tester/browser.js"></script>++ <link rel="import" href="../../paper-icon-button/paper-icon-button.html">+ <link rel="import" href="../../iron-icons/iron-icons.html">+ <link rel="import" href="../../iron-test-helpers/iron-test-helpers.html">+ <link rel="import" href="test-dialog.html">+ <link rel="import" href="test-buttons.html">++ </head>++ <body>++ <test-fixture id="basic">+ <template>+ <test-dialog>+ <p>Dialog</p>+ <div class="buttons">+ <button extra>extra</button>+ <button dialog-dismiss>dismiss</button>+ <button dialog-confirm>confirm</button>+ </div>+ </test-dialog>+ </template>+ </test-fixture>++ <test-fixture id="buttons">+ <template>+ <test-dialog>+ <p>Dialog with test-buttons</p>+ <test-buttons class="buttons"></test-buttons>+ </test-dialog>+ </template>+ </test-fixture>++ <test-fixture id="custom-element-button">+ <template>+ <test-dialog>+ <p>Dialog</p>+ <div class="buttons">+ <paper-icon-button icon="cancel" dialog-dismiss></paper-icon-button>+ <paper-icon-button icon="add-circle" dialog-confirm></paper-icon-button>+ <paper-icon-button icon="favorite"></paper-icon-button>+ </div>+ </test-dialog>+ </template>+ </test-fixture>++ <test-fixture id="modal">+ <template>+ <test-dialog modal>+ <p>Dialog</p>+ <div class="buttons">+ <button dialog-dismiss>dismiss</button>+ <button dialog-confirm autofocus>confirm</button>+ </div>+ </test-dialog>+ </template>+ </test-fixture>++ <test-fixture id="like-modal">+ <template>+ <test-dialog no-cancel-on-esc-key no-cancel-on-outside-click with-backdrop>+ <p>Dialog</p>+ </test-dialog>+ </template>+ </test-fixture>++ <test-fixture id="header">+ <template>+ <test-dialog>+ <h2>Dialog</h2>+ <div class="buttons">+ <button dialog-dismiss>dismiss</button>+ <button dialog-confirm autofocus>confirm</button>+ </div>+ </test-dialog>+ </template>+ </test-fixture>++ <test-fixture id="header-with-id">+ <template>+ <test-dialog>+ <h2 id="header">Dialog</h2>+ <div class="buttons">+ <button dialog-dismiss>dismiss</button>+ <button dialog-confirm autofocus>confirm</button>+ </div>+ </test-dialog>+ </template>+ </test-fixture>++ <test-fixture id="multiple">+ <template>+ <test-dialog modal id="dialog1">+ <p>Dialog 1</p>+ </test-dialog>+ <test-dialog modal id="dialog2">+ <p>Dialog 2</p>+ </test-dialog>+ </template>+ </test-fixture>++ <test-fixture id="nestedmodals">+ <template>+ <test-dialog modal opened>+ <p>Dialog 1</p>+ <div class="buttons">+ <button dialog-dismiss>dismiss</button>+ <button dialog-confirm autofocus>confirm</button>+ </div>++ <test-dialog modal opened>+ <p>Dialog 2</p>+ <div class="buttons">+ <button dialog-dismiss>dismiss</button>+ <button dialog-confirm autofocus>confirm</button>+ </div>+ </test-dialog>+ </test-dialog>+ </template>+ </test-fixture>++ <script>++ function runAfterOpen(dialog, callback) {+ dialog.addEventListener('iron-overlay-opened', callback);+ dialog.open();+ }++ suite('basic', function() {++ test('clicking dialog does not cancel the dialog', function(done) {+ var dialog = fixture('basic');+ runAfterOpen(dialog, function() {+ dialog.addEventListener('iron-overlay-closed', function() {+ assert('dialog should not close');+ });+ MockInteractions.tap(dialog);+ setTimeout(function() {+ done();+ }, 100);+ });+ });++ test('clicking dialog-dismiss button closes the dialog without confirmation', function(done) {+ var dialog = fixture('basic');+ runAfterOpen(dialog, function() {+ dialog.addEventListener('iron-overlay-closed', function(event) {+ assert.isFalse(event.detail.canceled, 'dialog is not canceled');+ assert.isFalse(event.detail.confirmed, 'dialog is not confirmed');+ done();+ });+ MockInteractions.tap(Polymer.dom(dialog).querySelector('[dialog-dismiss]'));+ });+ });++ test('dialog-dismiss on a custom element is handled', function(done) {+ var dialog = fixture('custom-element-button');+ runAfterOpen(dialog, function() {+ dialog.addEventListener('iron-overlay-closed', function(event) {+ assert.isFalse(event.detail.canceled, 'dialog is not canceled');+ assert.isFalse(event.detail.confirmed, 'dialog is not confirmed');+ done();+ });+ MockInteractions.tap(Polymer.dom(dialog).querySelector('[dialog-dismiss]'));+ });+ });++ test('dialog-dismiss button inside a custom element is handled', function(done) {+ var dialog = fixture('buttons');+ runAfterOpen(dialog, function() {+ dialog.addEventListener('iron-overlay-closed', function(event) {+ assert.isFalse(event.detail.canceled, 'dialog is not canceled');+ assert.isFalse(event.detail.confirmed, 'dialog is not confirmed');+ done();+ });+ MockInteractions.tap(Polymer.dom(dialog).querySelector('test-buttons').$.dismiss);+ });+ });++ test('clicking dialog-confirm button closes the dialog with confirmation', function(done) {+ var dialog = fixture('basic');+ runAfterOpen(dialog, function() {+ dialog.addEventListener('iron-overlay-closed', function(event) {+ assert.isFalse(event.detail.canceled, 'dialog is not canceled');+ assert.isTrue(event.detail.confirmed, 'dialog is confirmed');+ done();+ });+ MockInteractions.tap(Polymer.dom(dialog).querySelector('[dialog-confirm]'));+ });+ });++ test('dialog-confirm on a custom element handled', function(done) {+ var dialog = fixture('custom-element-button');+ runAfterOpen(dialog, function() {+ dialog.addEventListener('iron-overlay-closed', function(event) {+ assert.isFalse(event.detail.canceled, 'dialog is not canceled');+ assert.isTrue(event.detail.confirmed, 'dialog is confirmed');+ done();+ });+ MockInteractions.tap(Polymer.dom(dialog).querySelector('[dialog-confirm]'));+ });+ });++ test('dialog-confirm button inside a custom element is handled', function(done) {+ var dialog = fixture('buttons');+ runAfterOpen(dialog, function() {+ dialog.addEventListener('iron-overlay-closed', function(event) {+ assert.isFalse(event.detail.canceled, 'dialog is not canceled');+ assert.isTrue(event.detail.confirmed, 'dialog is confirmed');+ done();+ });+ MockInteractions.tap(Polymer.dom(dialog).querySelector('test-buttons').$.confirm);+ });+ });++ test('clicking dialog-dismiss button closes only the dialog where is contained', function(done) {+ var dialog = fixture('nestedmodals');+ var innerDialog = Polymer.dom(dialog).querySelector('test-dialog');+ MockInteractions.tap(Polymer.dom(innerDialog).querySelector('[dialog-dismiss]'));+ setTimeout(function() {+ assert.isFalse(innerDialog.opened, 'inner dialog is closed');+ assert.isTrue(dialog.opened, 'dialog is still open');+ done();+ }, 10);+ });++ test('clicking dialog-confirm button closes only the dialog where is contained', function(done) {+ var dialog = fixture('nestedmodals');+ var innerDialog = Polymer.dom(dialog).querySelector('test-dialog');+ MockInteractions.tap(Polymer.dom(innerDialog).querySelector('[dialog-confirm]'));+ setTimeout(function() {+ assert.isFalse(innerDialog.opened, 'inner dialog is closed');+ assert.isTrue(dialog.opened, 'dialog is still open');+ done();+ }, 10);+ });++ var properties = ['noCancelOnEscKey', 'noCancelOnOutsideClick', 'withBackdrop'];+ properties.forEach(function(property) {++ test('modal sets ' + property + ' to true', function() {+ var dialog = fixture('modal');+ assert.isTrue(dialog[property], property);+ });++ test('modal toggling keeps current value of ' + property, function() {+ var dialog = fixture('modal');+ // Changed to false while modal is true.+ dialog[property] = false;+ dialog.modal = false;+ assert.isFalse(dialog[property], property + ' is false');+ });++ test('modal toggling keeps previous value of ' + property, function() {+ var dialog = fixture('basic');+ // Changed before modal is true.+ dialog[property] = true;+ // Toggle twice to trigger observer.+ dialog.modal = true;+ dialog.modal = false;+ assert.isTrue(dialog[property], property + ' is still true');+ });++ test('default modal does not override ' + property +' (attribute)', function() {+ // Property is set on ready from attribute.+ var dialog = fixture('like-modal');+ assert.isTrue(dialog[property], property + ' is true');+ });++ test('modal toggling keeps previous value of ' + property + ' (attribute)', function() {+ // Property is set on ready from attribute.+ var dialog = fixture('like-modal');+ // Toggle twice to trigger observer.+ dialog.modal = true;+ dialog.modal = false;+ assert.isTrue(dialog[property], property + ' is still true');+ });++ });++ test('clicking outside a modal dialog does not move focus from dialog', function(done) {+ var dialog = fixture('modal');+ runAfterOpen(dialog, function() {+ MockInteractions.tap(document.body);+ setTimeout(function() {+ assert.equal(document.activeElement, Polymer.dom(dialog).querySelector('[autofocus]'), 'document.activeElement is the autofocused button');+ done();+ }, 10);+ });+ });++ test('removing a child element on click does not cause an exception', function(done) {+ var dialog = fixture('basic');+ runAfterOpen(dialog, function() {+ var button = Polymer.dom(dialog).querySelector('[extra]');+ button.addEventListener('click', function(event) {+ Polymer.dom(event.target.parentNode).removeChild(event.target);+ // should not throw exception here+ done();+ });+ MockInteractions.tap(button);+ });+ });++ test('multiple modal dialogs opened, handle focus change', function(done) {+ var dialogs = fixture('multiple');++ runAfterOpen(dialogs[0], function() {+ runAfterOpen(dialogs[1], function() {+ // Each modal dialog will trap the focus within its children.+ // Multiple modal dialogs doing it might result in an infinite loop+ // dialog1 focus -> dialog2 focus -> dialog1 focus -> dialog2 focus...+ // causing a "Maximum call stack size exceeded" error.+ // Wait 50ms and verify this does not happen.+ Polymer.Base.async(function() {+ // Should not enter in an infinite loop.+ done();+ }, 50);+ });+ });+ });++ test('multiple modal dialogs opened, handle outside click', function(done) {+ var dialogs = fixture('multiple');++ runAfterOpen(dialogs[0], function() {+ runAfterOpen(dialogs[1], function() {+ // Click should be handled only by dialogs[1].+ MockInteractions.tap(document.body);+ // Each modal dialog will trap the focus within its children.+ // Multiple modal dialogs doing it might result in an infinite loop+ // dialog1 focus -> dialog2 focus -> dialog1 focus -> dialog2 focus...+ // causing a "Maximum call stack size exceeded" error.+ // Wait 50ms and verify this does not happen.+ Polymer.Base.async(function() {+ // Should not enter in an infinite loop.+ done();+ }, 50);+ });+ });+ });++ test('focus is given to the autofocus element when clicking on backdrop', function(done) {+ var dialog = fixture('modal');+ dialog.addEventListener('iron-overlay-opened', onFirstOpen);+ dialog.open();++ function onFirstOpen() {+ dialog.removeEventListener('iron-overlay-opened', onFirstOpen);+ dialog.addEventListener('iron-overlay-closed', onFirstClose);+ // Set the focus on dismiss button+ MockInteractions.focus(Polymer.dom(dialog).querySelector('[dialog-dismiss]'));+ // Close the dialog+ dialog.close();+ }++ function onFirstClose() {+ dialog.removeEventListener('iron-overlay-closed', onFirstClose);+ dialog.addEventListener('iron-overlay-opened', onSecondOpen);+ dialog.open();+ }++ function onSecondOpen() {+ MockInteractions.tap(document.body);+ setTimeout(function() {+ assert.equal(document.activeElement, Polymer.dom(dialog).querySelector('[autofocus]'), 'document.activeElement is the autofocused button');+ done();+ }, 10);+ }+ });++ });++ suite('a11y', function() {++ test('dialog has role="dialog"', function() {+ var dialog = fixture('basic');+ assert.equal(dialog.getAttribute('role'), 'dialog', 'has role="dialog"');+ });++ });+ </script>++ </body>++</html>diff --git a/frontend/bower_components/paper-dialog-behavior/test/test-buttons.html b/frontend/bower_components/paper-dialog-behavior/test/test-buttons.htmlnew file mode 100644index 000000000..9f0d09c4c--- /dev/null+++ b/frontend/bower_components/paper-dialog-behavior/test/test-buttons.html@@ -0,0 +1,30 @@+<!--+@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+-->++<link rel="import" href="../../polymer/polymer.html">++<dom-module id="test-buttons">+ <template>+ <button dialog-dismiss id="dismiss">dismiss</button>+ <button dialog-confirm id="confirm">confirm</button>+ </template>+</dom-module>++<script>++(function() {++ Polymer({+ is: 'test-buttons'+ });++})();++</script>diff --git a/frontend/bower_components/paper-dialog-behavior/test/test-dialog.html b/frontend/bower_components/paper-dialog-behavior/test/test-dialog.htmlnew file mode 100644index 000000000..ccaf4e81e--- /dev/null+++ b/frontend/bower_components/paper-dialog-behavior/test/test-dialog.html@@ -0,0 +1,39 @@+<!--+@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+-->++<link rel="import" href="../../polymer/polymer.html">+<link rel="import" href="../paper-dialog-behavior.html">+<link rel="import" href="../paper-dialog-shared-styles.html">++<dom-module id="test-dialog">+ <template>+ <style include="paper-dialog-shared-styles"></style>+ <content></content>+ </template>++</dom-module>++<script>++(function() {++ Polymer({++ is: 'test-dialog',++ behaviors: [+ Polymer.PaperDialogBehavior+ ]++ });++})();++</script>diff --git a/frontend/bower_components/paper-dialog/.bower.json b/frontend/bower_components/paper-dialog/.bower.jsonnew file mode 100644index 000000000..228f6ff25--- /dev/null+++ b/frontend/bower_components/paper-dialog/.bower.json@@ -0,0 +1,50 @@+{+ "name": "paper-dialog",+ "description": "A Material Design dialog",+ "version": "1.1.0",+ "authors": "The Polymer Authors",+ "keywords": [+ "web-components",+ "polymer",+ "dialog",+ "overlay"+ ],+ "main": "paper-dialog.html",+ "private": true,+ "repository": {+ "type": "git",+ "url": "git://github.com/PolymerElements/paper-dialog"+ },+ "license": "http://polymer.github.io/LICENSE.txt",+ "homepage": "https://github.com/PolymerElements/paper-dialog",+ "ignore": [],+ "dependencies": {+ "neon-animation": "PolymerElements/neon-animation#^1.0.0",+ "paper-dialog-behavior": "PolymerElements/paper-dialog-behavior#^1.0.0",+ "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^1.7.0",+ "paper-styles": "PolymerElements/paper-styles#^1.0.0",+ "polymer": "Polymer/polymer#^1.1.0"+ },+ "devDependencies": {+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",+ "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",+ "paper-button": "PolymerElements/paper-button#^1.0.0",+ "paper-dialog-scrollable": "PolymerElements/paper-dialog-scrollable#^1.0.0",+ "paper-dropdown-menu": "PolymerElements/paper-dropdown-menu#^1.0.0",+ "paper-item": "PolymerElements/paper-item#^1.0.0",+ "paper-menu": "PolymerElements/paper-menu#^1.0.0",+ "test-fixture": "PolymerElements/test-fixture#^1.0.0",+ "web-component-tester": "^4.0.0",+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"+ },+ "_release": "1.1.0",+ "_resolution": {+ "type": "version",+ "tag": "v1.1.0",+ "commit": "7f31fa918fbd562b516eb262f1ed527dcaf7b7c0"+ },+ "_source": "https://github.com/PolymerElements/paper-dialog.git",+ "_target": "^1.1.0",+ "_originalSource": "PolymerElements/paper-dialog",+ "_direct": true+}\ No newline at end of filediff --git a/frontend/bower_components/paper-dialog/.github/ISSUE_TEMPLATE.md b/frontend/bower_components/paper-dialog/.github/ISSUE_TEMPLATE.mdnew file mode 100644index 000000000..823a0209b--- /dev/null+++ b/frontend/bower_components/paper-dialog/.github/ISSUE_TEMPLATE.md@@ -0,0 +1,33 @@+<!-- Instructions: https://github.com/PolymerElements/paper-dialog/CONTRIBUTING.md#filing-issues -->+### Description+<!-- Example: The `paper-foo` element causes the page to turn pink when clicked. -->++### Expected outcome++<!-- Example: The page stays the same color. -->++### Actual outcome++<!-- Example: The page turns pink. -->++### Live Demo+<!-- Example: https://jsbin.com/cagaye/edit?html,output -->++### Steps to reproduce++<!-- Example+1. Put a `paper-foo` element in the page.+2. Open the page in a web browser.+3. Click the `paper-foo` element.+-->++### Browsers Affected+<!-- Check all that apply -->+- [ ] Chrome+- [ ] Firefox+- [ ] Safari 9+- [ ] Safari 8+- [ ] Safari 7+- [ ] Edge+- [ ] IE 11+- [ ] IE 10diff --git a/frontend/bower_components/paper-dialog/.gitignore b/frontend/bower_components/paper-dialog/.gitignorenew file mode 100644index 000000000..8d4ae2536--- /dev/null+++ b/frontend/bower_components/paper-dialog/.gitignore@@ -0,0 +1 @@+bower_componentsdiff --git a/frontend/bower_components/paper-dialog/.travis.yml b/frontend/bower_components/paper-dialog/.travis.ymlnew file mode 100644index 000000000..7a3743aae--- /dev/null+++ b/frontend/bower_components/paper-dialog/.travis.yml@@ -0,0 +1,23 @@+language: node_js+sudo: required+before_script:+- npm install -g bower polylint web-component-tester+- bower install+- polylint+env:+ global:+ - secure: QgTx1GfP8J91Uzv03iETT60WI0ZhgvbT5tFkDp53oeQrNvXwZMCDN9BE+LsvE+3WJdhwV//gD3B72y+nSTa89UGSHwXaLiXPxL1OW7B/36X0ri1yPVVW9TJNramsVmjkFbjqbD6txUPE/j2STYIxGueng3R/bzt/Vx/ZjHnTJSVkyfQ0HCmMvgVvKBzP6wHHoggXcXeRhViQUbHW2v32Ptj2lw/qukQxv0rggugz/m+4miLFMEtAFlSJ+9Q4rA8pXMgrDJbd7T7BPNs9yeP0rVNab+dRE0wMkv0iRk0cL1ZPH/FB5F6everMc/7zc3mCEVXJM0fbj1XQVM640C413ncpDz/zK24e3lew4Erf7Ld9dl/xWRr60zBvGfFHz5JSBzL4/OsvnRFHfpxd6nwyVJhjv9uqyGNNqaDZ1AaPZ/ZCVDq+7KyJhM/Pug18cEzcDhUc0u5SIdjLnaiqgqAx0axAUdGPAN9Ssb58kDaqgt38VfoCc7ki/Qsk84ylxVu10vAeK4piklUb/PtR0gTKQ4GcYWnwZBgTlSthRFheOEp5BSDsKXi8Y2UCb/FJr1+oMbjbHLKnKvq7UDaLXXXKfvF1RjF1npgtYw4HBbHQ8Rsr7ZT2gU/85UDfpTgFNlpRWwajpEGQ7eK/CKQZnE8eGy+DR0KNuXxBkZpW5xOyq4g=+ - secure: GzJ6KvrESPTW2J2fqjTq4tXzaSLdjVuWHp4LV7isIBQk5qeh0l+AN/ZRzYj63AdhKBeQG68lLMayV/GFtJsKkLQWn1xZzxVjwdpWQjwnKWtoGYkwdHzuY6FNfLL9FTIGu5G6RCmfFfTDsUHkhSXW+cBaN7nJWtojXAOrr+9ivfU6acfoON8RN8m5N2o5uVJgwwlveYnCYayRHC50neHOVC1IzQlagW9TdpKMqHeg0XpSFhdjQua3ETiAiQDjpQz1BeNZh+/DjnlV08zAx64bjZTh441100HRP0qg4/Y6IcX/qCiRdQHYBvIAoka+ZySPu1zYfvn+7eJYwQ4shSuElKX9y6g+uk3g5djJJ7yoKIQnsYlO1yPB0E8fvIhP2K/ZCwXK86snR+pIfrpVudQy4RZObuvyJIqxmaUjlTg1zU/S0ZNqOnXtqO6pG6YNH1JpAt0Bdzy7hT/q44ROlBPYuZK8shzzLa4KBr3Rb7kknyi5YXempGjhLnUFFd+gGQUkfqoDmyLreDyO95Ch8+YOcTjAzWh/yrEw1of0l/an9TxtWjnFaioJDcVS/dQphufMHgxyushDaocm/My06ZNWfwe69IbH7lqdDn9aW8hdn9cgIKw/sNqVtksN0/tnoURD/8wuHmepzsCR7xs9NrAozaynK+NdPfDdUtLRjtcEy0A=+node_js: stable+addons:+ firefox: '46.0'+ apt:+ sources:+ - google-chrome+ packages:+ - google-chrome-stable+ sauce_connect: true+script:+- xvfb-run wct+- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then wct -s 'default'; fi+dist: trustydiff --git a/frontend/bower_components/paper-dialog/CONTRIBUTING.md b/frontend/bower_components/paper-dialog/CONTRIBUTING.mdnew file mode 100644index 000000000..093090d43--- /dev/null+++ b/frontend/bower_components/paper-dialog/CONTRIBUTING.md@@ -0,0 +1,77 @@+<!--+This file is autogenerated based on+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++Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:++### Filing Issues++**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:++ 1. **Who will use the feature?** _“As someone filling out a form…”_+ 2. **When will they use the feature?** _“When I enter an invalid value…”_+ 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_++**If you are filing an issue to report a bug**, please provide:++ 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:++ ```markdown+ The `paper-foo` element causes the page to turn pink when clicked.++ ## Expected outcome++ The page stays the same color.++ ## Actual outcome++ The page turns pink.++ ## Steps to reproduce++ 1. Put a `paper-foo` element in the page.+ 2. Open the page in a web browser.+ 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: [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.++### Submitting Pull Requests++**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.++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 in the pull request description using the following syntax:++ ```markdown+ (For a single issue)+ Fixes #20++ (For multiple issues)+ Fixes #32, fixes #40+ ```++ 2. **A succinct description of the design** used to fix any related issues. For example:++ ```markdown+ This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.+ ```++ 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.++If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!diff --git a/frontend/bower_components/paper-dialog/README.md b/frontend/bower_components/paper-dialog/README.mdnew file mode 100644index 000000000..a958f067c--- /dev/null+++ b/frontend/bower_components/paper-dialog/README.md@@ -0,0 +1,75 @@++<!---++This README is automatically generated from the comments in these files:+paper-dialog.html++Edit those files, and our readme bot will duplicate them over here!+Edit this file, and the bot will squash your changes :)++The bot does some handling of markdown. Please file a bug if it does the wrong+thing! https://github.com/PolymerLabs/tedium/issues++-->++[](https://travis-ci.org/PolymerElements/paper-dialog)++_[Demo and API docs](https://elements.polymer-project.org/elements/paper-dialog)_+++##<paper-dialog>++Material design: [Dialogs](https://www.google.com/design/spec/components/dialogs.html)++`<paper-dialog>` is a dialog with Material Design styling and optional animations when it is+opened or closed. It provides styles for a header, content area, and an action area for buttons.+You can use the `<paper-dialog-scrollable>` element (in its own repository) if you need a scrolling+content area. To autofocus a specific child element after opening the dialog, give it the `autofocus`+attribute. See `Polymer.PaperDialogBehavior` and `Polymer.IronOverlayBehavior` for specifics.++For example, the following code implements a dialog with a header, scrolling content area and+buttons. Focus will be given to the `dialog-confirm` button when the dialog is opened.++```html+<paper-dialog>+ <h2>Header</h2>+ <paper-dialog-scrollable>+ Lorem ipsum...+ </paper-dialog-scrollable>+ <div class="buttons">+ <paper-button dialog-dismiss>Cancel</paper-button>+ <paper-button dialog-confirm autofocus>Accept</paper-button>+ </div>+</paper-dialog>+```++### Styling++See the docs for `Polymer.PaperDialogBehavior` for the custom properties available for styling+this element.++### Animations++Set the `entry-animation` and/or `exit-animation` attributes to add an animation when the dialog+is opened or closed. See the documentation in+[PolymerElements/neon-animation](https://github.com/PolymerElements/neon-animation) for more info.++For example:++```html+<link rel="import" href="components/neon-animation/animations/scale-up-animation.html">+<link rel="import" href="components/neon-animation/animations/fade-out-animation.html">++<paper-dialog entry-animation="scale-up-animation"+ exit-animation="fade-out-animation">+ <h2>Header</h2>+ <div>Dialog body</div>+</paper-dialog>+```++### Accessibility++See the docs for `Polymer.PaperDialogBehavior` for accessibility features implemented by this+element.++diff --git a/frontend/bower_components/paper-dialog/bower.json b/frontend/bower_components/paper-dialog/bower.jsonnew file mode 100644index 000000000..e7882a55e--- /dev/null+++ b/frontend/bower_components/paper-dialog/bower.json@@ -0,0 +1,40 @@+{+ "name": "paper-dialog",+ "description": "A Material Design dialog",+ "version": "1.1.0",+ "authors": "The Polymer Authors",+ "keywords": [+ "web-components",+ "polymer",+ "dialog",+ "overlay"+ ],+ "main": "paper-dialog.html",+ "private": true,+ "repository": {+ "type": "git",+ "url": "git://github.com/PolymerElements/paper-dialog"+ },+ "license": "http://polymer.github.io/LICENSE.txt",+ "homepage": "https://github.com/PolymerElements/paper-dialog",+ "ignore": [],+ "dependencies": {+ "neon-animation": "PolymerElements/neon-animation#^1.0.0",+ "paper-dialog-behavior": "PolymerElements/paper-dialog-behavior#^1.0.0",+ "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^1.7.0",+ "paper-styles": "PolymerElements/paper-styles#^1.0.0",+ "polymer": "Polymer/polymer#^1.1.0"+ },+ "devDependencies": {+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",+ "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",+ "paper-button": "PolymerElements/paper-button#^1.0.0",+ "paper-dialog-scrollable": "PolymerElements/paper-dialog-scrollable#^1.0.0",+ "paper-dropdown-menu": "PolymerElements/paper-dropdown-menu#^1.0.0",+ "paper-item": "PolymerElements/paper-item#^1.0.0",+ "paper-menu": "PolymerElements/paper-menu#^1.0.0",+ "test-fixture": "PolymerElements/test-fixture#^1.0.0",+ "web-component-tester": "^4.0.0",+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"+ }+}diff --git a/frontend/bower_components/paper-dialog/demo/index.html b/frontend/bower_components/paper-dialog/demo/index.htmlnew file mode 100644index 000000000..fc1a1a6df--- /dev/null+++ b/frontend/bower_components/paper-dialog/demo/index.html@@ -0,0 +1,226 @@+<!doctype html>+<!--+@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+-->+<html>++<head>++ <meta charset="utf-8">+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">++ <title>paper-dialog demo</title>++ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>++ <link rel="import" href="../paper-dialog.html">+ <link rel="import" href="../../paper-button/paper-button.html">+ <link rel="import" href="../../paper-dialog-scrollable/paper-dialog-scrollable.html">+ <link rel="import" href="../../paper-styles/color.html">+ <link rel="import" href="../../paper-styles/demo-pages.html">+ <link rel="import" href="../../neon-animation/neon-animations.html">+ <link rel="import" href="../../paper-dropdown-menu/paper-dropdown-menu.html">+ <link rel="import" href="../../paper-menu/paper-menu.html">+ <link rel="import" href="../../paper-item/paper-item.html">+++ <link rel="import" href="../../iron-demo-helpers/demo-snippet.html">+ <link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">++ <style is="custom-style" include="demo-pages-shared-styles">+ .centered {+ min-width: 500px;+ }++ demo-snippet {+ --demo-snippet-code: {+ max-height: 250px;+ }+ }+ </style>++</head>++<body unresolved class="centered">+ <h3>Dialog layouts</h3>+ <demo-snippet>+ <template>+ <paper-button raised onclick="dialog.open()">plain dialog</paper-button>+ <paper-button raised onclick="modal.open()">modal dialog</paper-button>+ <paper-button raised onclick="scrolling.open()">scrolling dialog</paper-button>+ <paper-button raised onclick="actions.open()">dialog with actions</paper-button>+ <paper-button raised onclick="dropdownDialog.open()">dialog with dropdown</paper-button>+ <paper-button raised onclick="nested.open()">dialog with nested dialog</paper-button>++ <paper-dialog id="dialog">+ <h2>Dialog Title</h2>+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute+ irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>+ </paper-dialog>++ <paper-dialog id="scrolling">+ <h2>Scrolling</h2>+ <paper-dialog-scrollable>+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute+ irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute+ irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute+ irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute+ irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute+ irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute+ irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute+ irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute+ irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>+ </paper-dialog-scrollable>+ <div class="buttons">+ <paper-button dialog-dismiss>Cancel</paper-button>+ <paper-button dialog-confirm autofocus>OK</paper-button>+ </div>+ </paper-dialog>++ <paper-dialog id="actions">+ <h2>Dialog Title</h2>+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute+ irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>+ <div class="buttons">+ <paper-button>More Info...</paper-button>+ <paper-button dialog-dismiss>Decline</paper-button>+ <paper-button dialog-confirm autofocus>Accept</paper-button>+ </div>+ </paper-dialog>++ <paper-dialog id="modal" modal>+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>+ <div class="buttons">+ <paper-button dialog-confirm autofocus>Tap me to close</paper-button>+ </div>+ </paper-dialog>++ <paper-dialog id="dropdownDialog">+ <h2>Dialog Title</h2>+ <paper-dropdown-menu label="Value">+ <paper-menu class="dropdown-content">+ <paper-item>1</paper-item>+ <paper-item>2</paper-item>+ <paper-item>3</paper-item>+ <paper-item>4</paper-item>+ <paper-item>5</paper-item>+ <paper-item>6</paper-item>+ <paper-item>7</paper-item>+ <paper-item>8</paper-item>+ <paper-item>9</paper-item>+ <paper-item>10</paper-item>+ </paper-menu>+ </paper-dropdown-menu>+ </paper-dialog>++ <paper-dialog id="nested">+ <h2>Dialog Title</h2>+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute+ irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>+ <div class="buttons">+ <paper-button onclick="innerDialog.open()">Open nested dialog</paper-button>+ </div>+ </paper-dialog>++ <paper-dialog id="innerDialog">+ <h2>Dialog Title</h2>+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>+ </paper-dialog>+ </template>+ </demo-snippet>++ <h3>Styling and positioning</h3>+ <demo-snippet>+ <template>+ <style is="custom-style">+ paper-dialog.colored {+ border: 2px solid;+ border-color: var(--paper-green-500);+ background-color: var(--paper-light-green-50);+ color: var(--paper-green-500);+ }++ paper-dialog.size-position {+ position: fixed;+ top: 16px;+ right: 16px;+ width: 300px;+ height: 300px;+ overflow: auto;+ }+ </style>+ <paper-button raised onclick="colors.open()">colors</paper-button>+ <paper-button raised onclick="position.open()">size & position</paper-button>++ <paper-dialog id="colors" class="colored">+ <h2>Custom Colors</h2>+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure+ dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>+ </paper-dialog>++ <paper-dialog id="position" class="size-position">+ <h2>Custom Size & Position</h2>+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure+ dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>+ </paper-dialog>+ </template>+ </demo-snippet>++ <h3>Position with <code>positionTarget</code></h3>+ <demo-snippet>+ <template>+ <style is="custom-style">+ #alignedDialog {+ margin: 0;+ }+ </style>+ <paper-button raised onclick="openBy(this)">Open</paper-button>+ <paper-button raised onclick="openBy(this)">Open</paper-button>+ <paper-button raised onclick="openBy(this)">Open</paper-button>++ <paper-dialog id="alignedDialog" no-overlap horizontal-align="left" vertical-align="top">+ <h2>Aligned dialog</h2>+ <paper-dialog-scrollable>+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure+ dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.+ </paper-dialog-scrollable>+ </paper-dialog>++ <script>+ function openBy(element) {+ alignedDialog.positionTarget = element;+ alignedDialog.open();+ }+ </script>+ </template>+ </demo-snippet>++ <h3>Transitions with neon-animation</h3>+ <demo-snippet>+ <template>+ <paper-button raised onclick="animated.open()">open</paper-button>+ <paper-dialog id="animated" entry-animation="scale-up-animation" exit-animation="fade-out-animation" with-backdrop>+ <h2>Dialog Title</h2>+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute+ irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>+ </paper-dialog>+ </template>+ </demo-snippet>++</body>++</html>diff --git a/frontend/bower_components/paper-dialog/hero.svg b/frontend/bower_components/paper-dialog/hero.svgnew file mode 100755index 000000000..362831856--- /dev/null+++ b/frontend/bower_components/paper-dialog/hero.svg@@ -0,0 +1,58 @@+<?xml version="1.0" encoding="utf-8"?>+<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"+ viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">+<g id="background" display="none">+ <rect display="inline" fill="#B0BEC5" width="225" height="126"/>+</g>+<g id="label">+</g>+<g id="art">+ <g>+ <polygon points="0,124 0,126 2,126 "/>+ <polygon points="0,111.6 0,114.4 11.6,126 14.4,126 "/>+ <polygon points="0,99.1 0,101.9 24.1,126 26.9,126 "/>+ <polygon points="0,86.6 0,89.5 36.5,126 39.4,126 "/>+ <polygon points="0,74.2 0,77 49,126 51.8,126 "/>+ <polygon points="0,61.7 0,64.5 61.5,126 64.3,126 "/>+ <polygon points="0,49.2 0,52.1 73.9,126 76.8,126 "/>+ <polygon points="0,36.8 0,39.6 86.4,126 89.2,126 "/>+ <polygon points="0,24.3 0,27.1 98.9,126 101.7,126 "/>+ <polygon points="75.2,87 74,87 74,85.8 0,11.8 0,14.7 111.3,126 114.2,126 "/>+ <polygon points="87.6,87 84.8,87 123.8,126 126.6,126 "/>+ <polygon points="74,76.2 74,73.4 0.6,0 0,0 0,2.2 "/>+ <polygon points="74,63.7 74,60.9 13.1,0 10.3,0 "/>+ <polygon points="100.1,87 97.3,87 136.3,126 139.1,126 "/>+ <polygon points="112.6,87 109.7,87 148.7,126 151.6,126 "/>+ <polygon points="74,51.3 74,48.4 25.6,0 22.7,0 "/>+ <polygon points="125,87 122.2,87 161.2,126 164,126 "/>+ <polygon points="74.2,39 77,39 38,0 35.2,0 "/>+ <polygon points="86.7,39 89.5,39 50.5,0 47.7,0 "/>+ <polygon points="137.5,87 134.7,87 173.7,126 176.5,126 "/>+ <polygon points="150,87 147.1,87 186.1,126 189,126 "/>+ <polygon points="99.1,39 102,39 63,0 60.1,0 "/>+ <polygon points="150,74.6 150,77.4 198.6,126 201.4,126 "/>+ <polygon points="111.6,39 114.4,39 75.4,0 72.6,0 "/>+ <polygon points="150,62.1 150,64.9 211.1,126 213.9,126 "/>+ <polygon points="124.1,39 126.9,39 87.9,0 85.1,0 "/>+ <polygon points="100.3,0 97.5,0 136.5,39 139.3,39 "/>+ <polygon points="150,49.7 150,52.5 223.5,126 225,126 225,124.7 "/>+ <polygon points="112.8,0 110,0 149,39 150,39 150,40 225,115 225,112.2 "/>+ <polygon points="125.3,0 122.5,0 225,102.5 225,99.7 "/>+ <polygon points="137.7,0 134.9,0 225,90.1 225,87.3 "/>+ <polygon points="150.2,0 147.4,0 225,77.6 225,74.8 "/>+ <polygon points="162.7,0 159.8,0 225,65.2 225,62.3 "/>+ <polygon points="175.1,0 172.3,0 225,52.7 225,49.9 "/>+ <polygon points="187.6,0 184.8,0 225,40.2 225,37.4 "/>+ <polygon points="200.1,0 197.2,0 225,27.8 225,24.9 "/>+ <polygon points="212.5,0 209.7,0 225,15.3 225,12.5 "/>+ <polygon points="225,0 222.2,0 225,2.8 225,0 "/>+ </g>+ <g id="ic_x5F_add_x0D_">+ </g>+ <path d="M151,88H73V38h78V88z M75,86h74V40H75V86z"/>+</g>+<g id="Guides">+</g>+</svg>diff --git a/frontend/bower_components/paper-dialog/index.html b/frontend/bower_components/paper-dialog/index.htmlnew file mode 100644index 000000000..6304b8dc6--- /dev/null+++ b/frontend/bower_components/paper-dialog/index.html@@ -0,0 +1,30 @@+<!doctype html>+<!--+@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+-->+<html>+<head>++ <meta charset="utf-8">+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">++ <title>paper-dialog</title>++ <script src="../webcomponentsjs/webcomponents-lite.js"></script>++ <link rel="import" href="../polymer/polymer.html">+ <link rel="import" href="../iron-component-page/iron-component-page.html">++</head>+<body>++ <iron-component-page></iron-component-page>++</body>+</html>diff --git a/frontend/bower_components/paper-dialog/paper-dialog.html b/frontend/bower_components/paper-dialog/paper-dialog.htmlnew file mode 100644index 000000000..512ca0487--- /dev/null+++ b/frontend/bower_components/paper-dialog/paper-dialog.html@@ -0,0 +1,117 @@+<!--+@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+-->++<link rel="import" href="../polymer/polymer.html">+<link rel="import" href="../neon-animation/neon-animation-runner-behavior.html">+<link rel="import" href="../paper-dialog-behavior/paper-dialog-behavior.html">+<link rel="import" href="../paper-dialog-behavior/paper-dialog-shared-styles.html">+<!--+Material design: [Dialogs](https://www.google.com/design/spec/components/dialogs.html)++`<paper-dialog>` is a dialog with Material Design styling and optional animations when it is+opened or closed. It provides styles for a header, content area, and an action area for buttons.+You can use the `<paper-dialog-scrollable>` element (in its own repository) if you need a scrolling+content area. To autofocus a specific child element after opening the dialog, give it the `autofocus`+attribute. See `Polymer.PaperDialogBehavior` and `Polymer.IronOverlayBehavior` for specifics.++For example, the following code implements a dialog with a header, scrolling content area and+buttons. Focus will be given to the `dialog-confirm` button when the dialog is opened.++ <paper-dialog>+ <h2>Header</h2>+ <paper-dialog-scrollable>+ Lorem ipsum...+ </paper-dialog-scrollable>+ <div class="buttons">+ <paper-button dialog-dismiss>Cancel</paper-button>+ <paper-button dialog-confirm autofocus>Accept</paper-button>+ </div>+ </paper-dialog>++### Styling++See the docs for `Polymer.PaperDialogBehavior` for the custom properties available for styling+this element.++### Animations++Set the `entry-animation` and/or `exit-animation` attributes to add an animation when the dialog+is opened or closed. See the documentation in+[PolymerElements/neon-animation](https://github.com/PolymerElements/neon-animation) for more info.++For example:++ <link rel="import" href="components/neon-animation/animations/scale-up-animation.html">+ <link rel="import" href="components/neon-animation/animations/fade-out-animation.html">++ <paper-dialog entry-animation="scale-up-animation"+ exit-animation="fade-out-animation">+ <h2>Header</h2>+ <div>Dialog body</div>+ </paper-dialog>++### Accessibility++See the docs for `Polymer.PaperDialogBehavior` for accessibility features implemented by this+element.++@group Paper Elements+@element paper-dialog+@hero hero.svg+@demo demo/index.html+-->++<dom-module id="paper-dialog">+ <template>+ <style include="paper-dialog-shared-styles"></style>+ <content></content>+ </template>+</dom-module>++<script>++(function() {++ Polymer({++ is: 'paper-dialog',++ behaviors: [+ Polymer.PaperDialogBehavior,+ Polymer.NeonAnimationRunnerBehavior+ ],++ listeners: {+ 'neon-animation-finish': '_onNeonAnimationFinish'+ },++ _renderOpened: function() {+ this.cancelAnimation();+ this.playAnimation('entry');+ },++ _renderClosed: function() {+ this.cancelAnimation();+ this.playAnimation('exit');+ },++ _onNeonAnimationFinish: function() {+ if (this.opened) {+ this._finishRenderOpened();+ } else {+ this._finishRenderClosed();+ }+ }++ });++})();++</script>diff --git a/frontend/bower_components/paper-dialog/test/index.html b/frontend/bower_components/paper-dialog/test/index.htmlnew file mode 100644index 000000000..3d0c8eec7--- /dev/null+++ b/frontend/bower_components/paper-dialog/test/index.html@@ -0,0 +1,31 @@+<!DOCTYPE html><!--+@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+--><html><head>++ <title>paper-dialog tests</title>++ <meta charset="utf-8">+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">++ <script src="../../web-component-tester/browser.js"></script>++ </head>+ <body>++ <script>+ WCT.loadSuites([+ 'paper-dialog.html',+ 'paper-dialog.html?dom=shadow'+ ]);+ </script>++++</body></html>diff --git a/frontend/bower_components/paper-dialog/test/paper-dialog.html b/frontend/bower_components/paper-dialog/test/paper-dialog.htmlnew file mode 100644index 000000000..02ed50900--- /dev/null+++ b/frontend/bower_components/paper-dialog/test/paper-dialog.html@@ -0,0 +1,92 @@+<!doctype html>+<!--+@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+-->+<html>++<head>++ <title>paper-dialog tests</title>++ <meta charset="utf-8">+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">++ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>+ <script src="../../web-component-tester/browser.js"></script>+ <link rel="import" href="../paper-dialog.html">+</head>++<body>++ <test-fixture id="basic">+ <template>+ <paper-dialog>+ <p>Dialog</p>+ </paper-dialog>+ </template>+ </test-fixture>++ <test-fixture id="modal">+ <template>+ <paper-dialog modal>+ <p>Dialog</p>+ </paper-dialog>+ </template>+ </test-fixture>++ <test-fixture id="opened-modals">+ <template>+ <paper-dialog modal opened>+ <p>Dialog 1</p>+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>+ </paper-dialog>+ <paper-dialog modal opened>+ <p>Dialog 2</p>+ </paper-dialog>+ </template>+ </test-fixture>++ <script>+ suite('modal', function() {++ test('backdrop element remains opened when closing top modal, closes when all modals are closed', function(done) {+ var modals = fixture('opened-modals');+ modals[1].addEventListener('iron-overlay-opened', function() {+ assert.isTrue(modals[1].backdropElement.opened, 'backdrop is open');+ modals[1].close();+ });+ modals[1].addEventListener('iron-overlay-closed', function() {+ assert.isTrue(modals[1].backdropElement.opened, 'backdrop is still open');+ modals[0].close();+ });+ modals[0].addEventListener('iron-overlay-closed', function() {+ assert.isFalse(modals[0].backdropElement.opened, 'backdrop is closed');+ done();+ });+ });++ });++ suite('a11y', function() {+ a11ySuite('basic', []);++ a11ySuite('modal', []);++ test('dialog has role="dialog"', function() {+ var dialog = fixture('basic');+ assert.equal(dialog.getAttribute('role'), 'dialog', 'has role="dialog"');+ });++ });+ </script>++</body>++</html>diff --git a/frontend/images/panel/energy_battery.png b/frontend/images/panel/energy_battery.pngnew file mode 100644index 000000000..6a9a13477Binary files /dev/null and b/frontend/images/panel/energy_battery.png differdiff --git a/frontend/images/panel/energy_no_battery.png b/frontend/images/panel/energy_no_battery.pngnew file mode 100644index 000000000..95f7250b7Binary files /dev/null and b/frontend/images/panel/energy_no_battery.png differdiff --git a/frontend/images/panel/star.png b/frontend/images/panel/star.pngnew file mode 100644index 000000000..374592cd5Binary files /dev/null and b/frontend/images/panel/star.png differdiff --git a/frontend/images/panel/ventilation.png b/frontend/images/panel/ventilation.pngnew file mode 100644index 000000000..68f4b4539Binary files /dev/null and b/frontend/images/panel/ventilation.png differdiff --git a/frontend/src/components/input-temperature.html b/frontend/src/components/input-temperature.htmlindex e4af99996..16da646f0 100644--- a/frontend/src/components/input-temperature.html+++ b/frontend/src/components/input-temperature.html@@ -39,6 +39,10 @@--paper-input-container-label: {display:none;}+ --paper-input-container-label:after {+ content: "\00b0"++ }--paper-input-container-underline: {border-color:transparent;}@@ -47,13 +51,16 @@color:transparent;border-color:transparent;}+ .celsius:after{+ content: "\00b0"+ }};</style><paper-dropdown-menu class$="custom {{size}}"><paper-listbox class="dropdown-content" attr-for-selected="label" selected="{{active}}"><template is="dom-repeat" items="{{data}}">- <paper-item label="{{item}}" >{{item}}</paper-item>+ <paper-item label="{{item}}" class="celsius">{{item}}</paper-item></template></paper-listbox></paper-dropdown-menu>diff --git a/frontend/src/components/table-schedule-edit.html b/frontend/src/components/table-schedule-edit.htmlnew file mode 100644index 000000000..17fed9b8b--- /dev/null+++ b/frontend/src/components/table-schedule-edit.html@@ -0,0 +1,67 @@+<html><head></head><body><dom-module id="table-schedule-edit" attributes={"data", "header"}>+ <template>+ <style type="text/css">+ table{+ border:0;+ border-spacing: 0;+ }+ th,td {+ width:20%;+ border-spacing:0px;+ border-bottom: 1px solid #e4e4e4;+ border-right: 1px solid #e4e4e4;+ font-weight: normal;+ text-align: center;+ }+ th {+ background-color: #c0d62e;+ color: white;+ padding:5px 0;+ }+ th:first-child{+ color:#000000;+ background-color: #FFFFFF;+ display:none;+ }+ td:first-child{+ background-color:#e4e4e4;+ border-bottom: 1px solid #FFFFFF;+ padding:10px 0;+ display:none;+ }+ input[type="time"]{+ background-color: transparent;+ border:0;+ font-family: 'Roboto', sans-serif;+ font-size:16px;+ line-height:30px;+ }+ </style>+ <table style="width: 100%" border="0">+ <tbody>+ <tr>+ <template is="dom-repeat" items="{{header}}">+ <th>{{item}}</th>+ </template>+ </tr>+ <template is="dom-repeat" items="{{data}}">+ <tr>+ <template is="dom-repeat" items="{{item}}">+ <td><input type="time" value="{{item}}"></td>+ </template>+ </tr>+ </template>+ </tbody>+ </table>+ </template>++ <script>Polymer({+ is:"table-schedule-edit",+ hideFirst: function(i){+ if(1 != index)+ { return true; }+ else+ { return false; }+ }+ });</script>+</dom-module></body></html>\ No newline at end of filediff --git a/frontend/src/components/table-schedule.html b/frontend/src/components/table-schedule.htmlindex e62b1df40..a4370450e 100644--- a/frontend/src/components/table-schedule.html+++ b/frontend/src/components/table-schedule.html@@ -19,6 +19,7 @@padding:5px 0;}th:first-child{+ color:#000000;background-color: #FFFFFF;}td:first-child{@@ -30,7 +31,6 @@<table style="width: 100%" border="0"><tbody><tr>- <th></th><template is="dom-repeat" items="{{header}}"><th>{{item}}</th></template>diff --git a/frontend/src/components/table-toggles.html b/frontend/src/components/table-toggles.htmlnew file mode 100644index 000000000..591b5c104--- /dev/null+++ b/frontend/src/components/table-toggles.html@@ -0,0 +1,70 @@+<html><head>+<link rel="import" href="../../bower_components/paper-toggle-button/paper-toggle-button.html">+</head><body><dom-module id="table-toggles" attributes={"data", "header"}>+ <template>+ <style type="text/css">+ table{+ border:0;+ border-spacing: 0;+ }+ th,td {+ width:20%;+ border-spacing:0px;+ border-bottom: 1px solid #e4e4e4;+ border-right: 1px solid #e4e4e4;+ font-weight: normal;+ text-align: center;+ }+ th {+ background-color: #c0d62e;+ color: white;+ padding:5px 0;+ }+ th:first-child{+ color:#000000;+ background-color: #FFFFFF;+ }+ td:first-child{+ background-color:#e4e4e4;+ border-bottom: 1px solid #FFFFFF;+ padding:10px 0;+ }+ paper-toggle-button.green {+ margin-left: auto;+ float: right;+ opacity:1;+ --paper-toggle-button-checked-bar-color: #374c4f;+ --paper-toggle-button-checked-button-color: #c0d62e;+ --paper-toggle-button-checked-ink-color: #374c4f;+ }+ </style>+ <table style="width: 100%" border="0">+ <tbody>+ <tr>+ <template is="dom-repeat" items="{{header}}">+ <th>{{item}}</th>+ </template>+ </tr>+ <template is="dom-repeat" items="{{data}}">+ <tr>+ <template is="dom-repeat" items="{{item}}">+ <td><paper-toggle-button checked="[[checkStatus(item)]]" class="green"></paper-toggle-button></td>+ </template>+ </tr>+ </template>+ </tbody>+ </table>+ </template>++ <script>Polymer({+ is:"table-toggles",+ checkStatus: function(status){+ if(status == "true"){+ var s = true;+ }else{+ var s = false;+ }+ return s;+ }+ });</script>+</dom-module></body></html>\ No newline at end of filediff --git a/frontend/src/openremote-app.html b/frontend/src/openremote-app.htmlindex 071105248..2c914810b 100644--- a/frontend/src/openremote-app.html+++ b/frontend/src/openremote-app.html@@ -9,10 +9,10 @@<link rel="import" href="../bower_components/iron-flex-layout/iron-flex-layout.html"><link rel="import" href="../bower_components/iron-icons/iron-icons.html"><link rel="import" href="../bower_components/iron-media-query/iron-media-query.html">+<link rel="import" href="../bower_components/iron-collapse/iron-collapse.html"><link rel="import" href="../bower_components/iron-pages/iron-pages.html"><link rel="import" href="../bower_components/iron-ajax/iron-ajax.html"><link rel="import" href="../bower_components/iron-resizable-behavior/iron-resizable-behavior.html">-<link rel="import" href="../bower_components/paper-icon-button/paper-icon-button.html"><link rel="import" href="../bower_components/paper-item/paper-item.html"><link rel="import" href="../bower_components/paper-button/paper-button.html">@@ -21,6 +21,7 @@<link rel="import" href="../bower_components/paper-tabs/paper-tabs.html"><link rel="import" href="../bower_components/paper-toggle-button/paper-toggle-button.html"><link rel="import" href="../bower_components/paper-spinner/paper-spinner.html">+<link rel="import" href="../bower_components/paper-dialog/paper-dialog.html"><link rel="import" href="../bower_components/paper-styles/color.html"><link rel="import" href="openremote-login.html">@@ -29,6 +30,8 @@<link rel="import" href="components/input-dropdown.html"><link rel="import" href="components/input-switch-blok.html"><link rel="import" href="components/table-schedule.html">+<link rel="import" href="components/table-schedule-edit.html">+<link rel="import" href="components/table-toggles.html"></head><body><dom-module id="openremote-app">@@ -39,6 +42,9 @@a{color:#FFFFFF;text-decoration: none;+ font-weight: 100;+ font-family: 'Roboto', sans-serif;+ font-size:16px;}app-drawer-layout{position: relative;@@ -49,6 +55,9 @@background-color: #374c4f;color:#FFFFFF;}+ .header-layout{+ z-index:999;+ }.main-header {box-shadow: 0px 5px 6px -3px rgba(0, 0, 0, 0.4);}@@ -79,6 +88,7 @@border:0;font-family: 'Roboto', sans-serif;font-size:16px;+ line-height:30px;}paper-tab {@@ -115,15 +125,23 @@--iron-icon-width: 15px;}.normal {- --iron-icon-height: auto;+ --iron-icon-height: 30px;--iron-icon-width: 30px;}+ .normal > ::content img {+ width:auto!important;+ }.big {--iron-icon-height: auto;--iron-icon-width: 72px;margin:auto;display: block;}+ .background-image{+ background-repeat: no-repeat;+ background-position: center;+ background-size:120px auto;+ }.panel paper-toggle-button{margin:5px 0 0 0;}@@ -135,6 +153,9 @@margin: auto;display: block;}+ .right{+ float:right;+ }.row{width:100%;margin:10px 0;@@ -144,10 +165,14 @@@apply(--layout-horizontal);}.container {+ margin:25px 0;position: relative;display: flex;flex-flow: row wrap;}+ .container.no-margin {+ margin:0;+ }.item {box-sizing: border-box;padding: 10px;@@ -156,17 +181,31 @@.container-column {box-sizing: border-box;padding: 0 5px;+ line-height:30px;}+.container-column:first-child{padding-right:20px;}+.container-column:nth-child(2){width:30%;}-+ .container-column.col_2:nth-child(2){+ width:50%;+ }+ .container-column-3{+ width:33.3%;+ }+ .container-column span{+ line-height:30px;+ }.container-column:last-child{margin-left: auto;}+ .celsius:after{+ content: "\00b0"+ }#settings-btn{color:#FFFFFF;}@@ -206,7 +245,7 @@tail="{{subroute}}"></app-route>- <app-header-layout>+ <app-header-layout class="header-layout"><app-header id="header" effects="waterfall" fixed=""><app-toolbar><div main-title="">Smart 61</div>@@ -250,10 +289,14 @@<div name="Home" route="{{subroute}}"><div class="panel"><div class="inner-panel">- <div class="row">- <iron-icon class="normal" src="../images/panel/light_off.png"></iron-icon>- <span>Full Smart 61</span>- <paper-toggle-button data-target="smart.fullsmart" checked="[[checkStatus(data.current_scene.smart.fullsmart)]]" class="green"></paper-toggle-button>+ <div class="container no-margin">+ <div class="container-column">+ <iron-icon class="normal" src="../images/panel/star.png"></iron-icon>+ </div>+ <div class="container-column col_2">Full Smart 61</div>+ <div class="container-column">+ <paper-toggle-button data-target="smart.fullsmart" checked="[[checkStatus(data.current_scene.smart.fullsmart)]]" class="green"></paper-toggle-button>+ </div></div></div></div>@@ -267,10 +310,14 @@<div name="Light" route="{{subroute}}"><div class="panel"><div class="inner-panel">- <div class="row">- <iron-icon class="normal" src="../images/panel/light_off.png"></iron-icon>- <span>Smart 61 - Lighting</span>- <paper-toggle-button data-target="smart.light" checked="[[checkStatus(data.current_scene.smart.light)]]" class="green"></paper-toggle-button>+ <div class="container no-margin">+ <div class="container-column">+ <iron-icon class="normal" src="../images/panel/light_on.png"></iron-icon>+ </div>+ <div class="container-column col_2">Smart 61 - Lighting</div>+ <div class="container-column">+ <paper-toggle-button data-target="smart.light" checked="[[checkStatus(data.current_scene.smart.light)]]" class="green"></paper-toggle-button>+ </div></div></div></div>@@ -283,10 +330,14 @@<div name="Start" route="{{subroute}}"><div class="panel"><div class="inner-panel">- <div class="row">- <iron-icon class="normal" src="../images/panel/home_on.png"></iron-icon>- <span>Smart - Smart Start</span>- <paper-toggle-button data-target="smart.start" checked="[[checkStatus(data.current_scene.smart.start)]]" class="green"></paper-toggle-button>+ <div class="container no-margin">+ <div class="container-column">+ <iron-icon class="normal" src="../images/panel/home_on.png"></iron-icon>+ </div>+ <div class="container-column col_2">Smart - Smart Start</div>+ <div class="container-column">+ <paper-toggle-button data-target="smart.start" checked="[[checkStatus(data.current_scene.smart.start)]]" class="green"></paper-toggle-button>+ </div></div></div></div>@@ -318,6 +369,19 @@<div class="panel"><div class="inner-panel"><span class="center">Energy Monitor</span>+ <div class="row background-image" style="background-image: url(../images/panel/energy_no_battery.png);">+ <div class="container">+ <div class="row">+ <div class="container-column-3 right">{{data.current_scene.energy.solar}}kW<div>Solar & Battery</div></div>+ </div>+ <div class="row">+ <div class="container-column-3 center">{{data.current_scene.energy.usage}}kW<div>Usage</div></div>+ </div>+ <div class="row">+ <div class="container-column-3">{{data.current_scene.energy.main_power}}kW<div>Mains power</div></div>+ </div>+ </div>+ </div></div></div></div>@@ -325,10 +389,14 @@<div name="Safety" route="{{subroute}}"><div class="panel"><div class="inner-panel">- <div class="row">- <iron-icon class="normal" src="../images/panel/alarm_large_off.png"></iron-icon>- <span>Smart - Safety</span>- <paper-toggle-button data-target="smart.safety" checked="[[checkStatus(data.current_scene.smart.safety)]]" class="green"></paper-toggle-button>+ <div class="container no-margin">+ <div class="container-column">+ <iron-icon class="normal" src="../images/panel/alarm_large_off.png"></iron-icon>+ </div>+ <div class="container-column col_2">Smart 61 - Safety</div>+ <div class="container-column">+ <paper-toggle-button data-target="smart.safety" checked="[[checkStatus(data.current_scene.smart.safety)]]" class="green"></paper-toggle-button>+ </div></div></div></div>@@ -346,10 +414,14 @@<div name="Climate" route="{{subroute}}"><div class="panel"><div class="inner-panel">- <div class="row">- <iron-icon class="small" src="../images/panel/temperature_gauge_100.png"></iron-icon>- <span>Smart - Climate</span>- <paper-toggle-button data-target="smart.climate" checked="[[checkStatus(data.current_scene.smart.climate)]]" class="green"></paper-toggle-button>+ <div class="container no-margin">+ <div class="container-column">+ <iron-icon class="normal" src="../images/panel/temperature_gauge_100.png"></iron-icon>+ </div>+ <div class="container-column col_2">Smart 61 - Climate</div>+ <div class="container-column">+ <paper-toggle-button data-target="smart.climate" checked="[[checkStatus(data.current_scene.smart.climate)]]" class="green"></paper-toggle-button>+ </div></div></div></div>@@ -357,7 +429,7 @@<div class="inner-panel"><span class="center">Heating</span><div class="container">- <div class="item"><span style="float:left">Living Room</span><span style="font-size:62px">{{data.current_scene.temperature_actual.living_room}}</span></div>+ <div class="item"><span style="float:left">Living Room</span><span style="font-size:62px" class="celsius">{{data.current_scene.temperature_actual.living_room}}</span></div><div class="item"><input-temperature size="large" data="{{temperatures}}" active="{{data.current_scene.temperature_program.living_room}}"></input-temperature></div>@@ -372,7 +444,7 @@<iron-icon class="small" src="../images/panel/temperature_gauge_100.png"></iron-icon></div><div class="container-column">Bedroom</div>- <div class="container-column">{{data.current_scene.temperature_actual.bedroom}}</div>+ <div class="container-column celsius">{{data.current_scene.temperature_actual.bedroom}}</div><div class="container-column"><input-temperature size="small" data="{{temperatures}}" active="{{data.current_scene.temperature_program.bedroom}}"></input-temperature></div>@@ -382,7 +454,7 @@<iron-icon class="small" src="../images/panel/temperature_gauge_100.png"></iron-icon></div><div class="container-column">Bathroom</div>- <div class="container-column">{{data.current_scene.temperature_actual.bathroom}}</div>+ <div class="container-column celsius">{{data.current_scene.temperature_actual.bathroom}}</div><div class="container-column"><input-temperature size="small" data="{{temperatures}}" active="{{data.current_scene.temperature_program.bathroom}}"></input-temperature></div>@@ -395,9 +467,9 @@<div class="container"><div class="container-column">- <iron-icon class="small" src="../images/panel/temperature_gauge_100.png"></iron-icon>+ <iron-icon class="normal" src="../images/panel/ventilation.png"></iron-icon></div>- <div class="container-column">Air flow speed</div>+ <div class="container-column col_2">Air flow speed</div><div class="container-column"><input-dropdown data="{{ventilation_options}}" active="{{data.current_scene.ventilation}}"></input-dropdown></div>@@ -411,26 +483,58 @@<app-toolbar><paper-icon-button class="back-btn" icon="arrow-back" drawer-toggle=""></paper-icon-button><div main-title="">Smart 61</div>+ <a href="#/Login" on-click="logOut" class="right">Log out</a></app-toolbar><div class="panel">- <div class="inner-panel">+ <div class="inner-panel" on-click="toggleVacation"><span class="center">Vacation Settings</span>+ <iron-collapse id="collapseVacation">+ <p>Vacation</p>+ </iron-collapse></div></div>- <div class="panel">- <div class="inner-panel">+ <div class="panel">+ <div class="inner-panel" on-click="toggleWeek"><span class="center">Predicted Week Schedule:</span>- <table-schedule data="{{data.predicted_schedule.data}}" header="{{data.predicted_schedule.header}}"></table-schedule>+ <iron-collapse id="collapseWeek">+ <table-schedule data="{{data.predicted_schedule.data}}" header="{{data.predicted_schedule.header}}"></table-schedule>+ <a class=""><paper-button class="bg-darkgreen" onclick="actions.open()">EDIT</paper-button></a>+ </iron-collapse></div></div><div class="panel">- <div class="inner-panel">+ <div class="inner-panel" on-click="toggleScenes"><span class="center">Scene settings</span>- <table-schedule data="{{data.scenes.data}}" header="{{data.scenes.header}}"></table-schedule>- <a href="#/Intro"><paper-button class="full_width bg-darkgreen">Scene Wizard</paper-button></a>- </div>+ <iron-collapse id="collapseScenes">+ <div class="row">+ <a href="#/Intro"><paper-button class="full_width bg-darkgreen">Scene Wizard</paper-button></a>+ </div>+ <div class="row">+ <table-toggles data="{{data.alarms.data}}" header="{{data.alarms.header}}"></table-toggles>+ </div>+ <div class="row">+ <table-schedule data="{{data.scenes.data}}" header="{{data.scenes.header}}"></table-schedule>+ </div>+ </div>+ </iron-collapse></div></div>+ <paper-dialog id="scrolling">++ <table-schedule data="{{data.predicted_schedule.data}}" header="{{data.predicted_schedule.header}}"></table-schedule>+ <div class="buttons">+ <paper-button dialog-dismiss>Cancel</paper-button>+ <paper-button dialog-confirm autofocus>OK</paper-button>+ </div>+ </paper-dialog>++ <paper-dialog id="actions" withBackdrop>+ <table-schedule-edit data="{{data.predicted_schedule.data}}" header="{{data.predicted_schedule.header}}"></table-schedule-edit>+ <div class="buttons">+ <paper-button dialog-dismiss>Cancel</paper-button>+ <paper-button dialog-confirm autofocus>Save</paper-button>+ </div>+ </paper-dialog></div></iron-pages>@@ -462,6 +566,18 @@Polymer.IronOverlayBehavior,],},+ toggleVacation: function() {+ this.$.collapseVacation.toggle();+ },+ toggleWeek: function() {+ this.$.collapseWeek.toggle();+ },+ toggleScenes: function() {+ this.$.collapseScenes.toggle();+ },+ logOut: function(){+ localStorage.clear();+ },setValueToDict: function(value, stringPath){var path = stringPath.split(".");if(path.length == 1){