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
Add files via upload
Robin133742f13db54b8c
diff --git a/frontend/README.md b/frontend/README.mdindex 28d9c84be..b5cd6aadf 100644--- a/frontend/README.md+++ b/frontend/README.md@@ -1,3 +1,39 @@-# OpenRemote v3 - Frontend+## LIVE DEMO ##+http://blok61.stofloos.nl/++- Add to Homescreen for optimal performance.+++## Polymer Instructions ##+# Viewing the Application++```+$ polymer serve+```++# Building the Application++```+$ polymer build+```++This will create a `build/` folder with `bundled/` and `unbundled/` sub-folders+containing a bundled (Vulcanized) and unbundled builds, both run through HTML,+CSS, and JS optimizers.++-Images folder needs to be included in the build folders.++You can serve the built versions by giving `polymer serve` a folder to serve+from:++```+$ polymer serve build/bundled+```++# Running Tests++```+$ polymer test+```+-Development of 'Example Home' frontend code/UI.\ No newline at end of filediff --git a/frontend/images/bg-image.jpeg b/frontend/images/bg-image.jpegnew file mode 100644index 000000000..61a6705c2Binary files /dev/null and b/frontend/images/bg-image.jpeg differdiff --git a/frontend/images/panel/alarm_large_off.png b/frontend/images/panel/alarm_large_off.pngnew file mode 100644index 000000000..08b0233f8Binary files /dev/null and b/frontend/images/panel/alarm_large_off.png differdiff --git a/frontend/images/panel/alarm_large_on.png b/frontend/images/panel/alarm_large_on.pngnew file mode 100644index 000000000..267cf2faaBinary files /dev/null and b/frontend/images/panel/alarm_large_on.png differdiff --git a/frontend/images/panel/alarm_off.png b/frontend/images/panel/alarm_off.pngnew file mode 100644index 000000000..b865a523bBinary files /dev/null and b/frontend/images/panel/alarm_off.png differdiff --git a/frontend/images/panel/alarm_on.png b/frontend/images/panel/alarm_on.pngnew file mode 100644index 000000000..7cb62d78fBinary files /dev/null and b/frontend/images/panel/alarm_on.png differdiff --git a/frontend/images/panel/home_on.png b/frontend/images/panel/home_on.pngnew file mode 100644index 000000000..955131fcdBinary files /dev/null and b/frontend/images/panel/home_on.png differdiff --git a/frontend/images/panel/light_off.png b/frontend/images/panel/light_off.pngnew file mode 100644index 000000000..10eab3ec1Binary files /dev/null and b/frontend/images/panel/light_off.png differdiff --git a/frontend/images/panel/light_on.png b/frontend/images/panel/light_on.pngnew file mode 100644index 000000000..8e7a188e9Binary files /dev/null and b/frontend/images/panel/light_on.png differdiff --git a/frontend/images/panel/minus.png b/frontend/images/panel/minus.pngnew file mode 100644index 000000000..423e033c1Binary files /dev/null and b/frontend/images/panel/minus.png differdiff --git a/frontend/images/panel/minus_pressed.png b/frontend/images/panel/minus_pressed.pngnew file mode 100644index 000000000..d3dae62baBinary files /dev/null and b/frontend/images/panel/minus_pressed.png differdiff --git a/frontend/images/panel/plus.png b/frontend/images/panel/plus.pngnew file mode 100644index 000000000..95970221dBinary files /dev/null and b/frontend/images/panel/plus.png differdiff --git a/frontend/images/panel/plus_pressed.png b/frontend/images/panel/plus_pressed.pngnew file mode 100644index 000000000..d1a367a00Binary files /dev/null and b/frontend/images/panel/plus_pressed.png differdiff --git a/frontend/images/panel/temperature_gauge_00.png b/frontend/images/panel/temperature_gauge_00.pngnew file mode 100644index 000000000..a57841696Binary files /dev/null and b/frontend/images/panel/temperature_gauge_00.png differdiff --git a/frontend/images/panel/temperature_gauge_100.png b/frontend/images/panel/temperature_gauge_100.pngnew file mode 100644index 000000000..95e635462Binary files /dev/null and b/frontend/images/panel/temperature_gauge_100.png differdiff --git a/frontend/images/panel/temperature_gauge_25.png b/frontend/images/panel/temperature_gauge_25.pngnew file mode 100644index 000000000..8325183a1Binary files /dev/null and b/frontend/images/panel/temperature_gauge_25.png differdiff --git a/frontend/images/panel/temperature_gauge_50.png b/frontend/images/panel/temperature_gauge_50.pngnew file mode 100644index 000000000..7e2f9bedcBinary files /dev/null and b/frontend/images/panel/temperature_gauge_50.png differdiff --git a/frontend/images/panel/temperature_gauge_75.png b/frontend/images/panel/temperature_gauge_75.pngnew file mode 100644index 000000000..9f2ae1351Binary files /dev/null and b/frontend/images/panel/temperature_gauge_75.png differdiff --git a/frontend/images/panel/theme.css b/frontend/images/panel/theme.cssnew file mode 100644index 000000000..d99126ab5--- /dev/null+++ b/frontend/images/panel/theme.css@@ -0,0 +1,209 @@+@font-face {+ font-family: 'robotoregular';+ /* TODO webcomponent.js bug fixed in 0.6 */+ src: url('Roboto-Regular-webfont.woff') format('woff'), url('panels/demo/Roboto-Regular-webfont.woff') format('woff');+}++@font-face {+ font-family: 'robotoregular';+ /* TODO webcomponent.js bug fixed in 0.6 */+ src: url('Roboto-Bold-webfont.woff') format('woff'), url('panels/demo/Roboto-Bold-webfont.woff') format('woff');+ font-weight: bold;+}++@font-face {+ font-family: "robotocondensed";+ /* TODO webcomponent.js bug fixed in 0.6 */+ src: url("RobotoCondensed-Regular-webfont.woff") format("woff"), url("panels/demo/RobotoCondensed-Regular-webfont.woff") format("woff");+}++@font-face {+ font-family: "robotocondensed";+ /* TODO webcomponent.js bug fixed in 0.6 */+ src: url("RobotoCondensed-Bold-webfont.woff") format("woff"), url("panels/demo/RobotoCondensed-Bold-webfont.woff") format("woff");+ font-weight: bold;+}++or-console-frontend {+ font-family: robotoregular, sans-serif;+ background-color: white;+ color: #333333;+}++or-console-frontend /deep/ core-drawer-panel core-header-panel {+ background-color: #374C4F;+ color: white;+}++or-console-frontend /deep/ core-drawer-panel core-toolbar {+ font-family: robotocondensed, sans-serif;+ background-color: #C0D62E;+ color: #333333;+}++or-console-frontend /deep/ .menu .panelItem {+}++or-console-frontend /deep/ .menu .groupItem {+}++or-console-frontend /deep/ .menu .screenItem {+}++or-console-frontend /deep/ .menu .selected {+ color: #C0D62E;+ font-weight: bold;+}++or-console-frontend /deep/ paper-tabs {+ font-family: robotoregular, sans-serif;+ font-weight: bold;+ background-color: #F2F2F2;+ color: #666666;+}++or-console-frontend /deep/ paper-tabs::shadow #selectionBar {+ background-color: #C0D62E;+}++or-console-frontend /deep/ paper-tabs paper-tab::shadow #ink {+ color: #C0D62E;+}++or-console-frontend /deep/ .screens {+ font-family: robotoregular, sans-serif;+ background-color: white;+ color: black;+}++or-console-frontend /deep/ .unfocused-underline {+ background-color: #cccccc;+ height: 2px;+}++or-console-frontend /deep/ .focused-underline {+ background-color: #C0D62E;+ height: 2px;+}++or-console-frontend /deep/ paper-ripple {+ color: #C0D62E;+}++or-console-frontend /deep/ paper-slider::shadow #sliderBar::shadow #activeProgress {+ background-color: #C0D62E;+}++or-console-frontend /deep/ paper-slider::shadow #sliderKnobInner {+ background-color: #C0D62E;+}++or-console-frontend /deep/ paper-slider::shadow .ring > #sliderKnob > #sliderKnobInner {+ border-color: #C0D62E;+ background-color: #C0D62E;+}++or-console-frontend /deep/ paper-slider::shadow #sliderKnobInner::before {+ background-color: #333333;+}++or-console-frontend /deep/ paper-slider::shadow #sliderKnob > #sliderKnobInner::after {+ color: white;+}++or-console-frontend /deep/ paper-slider::shadow #sliderBar::shadow #progressContainer {+ background-color: #374C4F;+}++or-console-frontend /deep/ paper-slider::shadow paper-input::shadow paper-input-decorator {+ padding: 0.5em 0;+}++or-console-frontend /deep/ paper-slider::shadow /deep/ .unfocused-underline {+ display: none;+}++or-console-frontend /deep/ paper-toggle-button::shadow .toggle-bar {+ background-color: black;+}++or-console-frontend /deep/ paper-toggle-button::shadow .toggle-button {+ background-color: #666666;+}++or-console-frontend /deep/ paper-toggle-button::shadow [checked] .toggle-bar {+ background-color: black;+}++or-console-frontend /deep/ paper-toggle-button::shadow [checked] .toggle-button {+ background-color: #C0D62E;+}++or-console-frontend /deep/ paper-toggle-button::shadow .toggle-ink {+ color: #C0D62E;+}++or-console-frontend /deep/ paper-toggle-button::shadow [checked] .toggle-ink {+ color: #374C4F;+}++or-console-frontend /deep/ paper-radio-button::shadow #onRadio {+ background-color: #C0D62E;+}++or-console-frontend /deep/ paper-radio-button[checked]::shadow #offRadio {+ border-color: #C0D62E;+ background-color: white;+}++or-console-frontend /deep/ paper-radio-button::shadow #offRadio {+ border-color: #333333;+ background-color: white;+}++or-console-frontend /deep/ paper-radio-button::shadow #ink[checked] {+ color: #C0D62E;+}++or-console-frontend /deep/ paper-radio-button::shadow #ink {+ color: #374C4F;+}++or-console-frontend /deep/ paper-checkbox::shadow #ink[checked] {+ color: #C0D62E;+}++or-console-frontend /deep/ paper-checkbox::shadow #checkbox.checked {+ background-color: #C0D62E;+ border-color: #C0D62E;+}++or-console-frontend /deep/ paper-checkbox::shadow #checkbox {+ border-color: #333333;+}++or-console-frontend /deep/ paper-checkbox::shadow #ink {+ color: #374C4F;+}++or-console-frontend /deep/ or-console-label::shadow .on {+ color: #C0D62E;+}++or-console-frontend /deep/ or-console-label::shadow .off {+ color: #374C4F;+}++or-console-frontend /deep/ .box {+ height: 100%;+}++or-console-frontend /deep/ .box.border {+ border: 1px solid #666666;+}++or-console-frontend /deep/ .box.solid {+ background-color: #CCCCCC;+}++diff --git a/frontend/index.html b/frontend/index.htmlnew file mode 100644index 000000000..9e277aebf--- /dev/null+++ b/frontend/index.html@@ -0,0 +1,46 @@+<!doctype html>++<html>+<head>++ <title>Blok 61</title>++ <meta charset="utf-8">+ <meta name="apple-mobile-web-app-capable" content="yes">+ <meta name="mobile-web-app-capable" content="yes">++ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">+ <script src="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>++ <link rel="import" href="src/openremote-app.html">+ <style>+ html{+ height:100%;+ background: url(images/bg-image.jpeg) no-repeat center center fixed;+ -webkit-background-size: cover;+ -moz-background-size: cover;+ -o-background-size: cover;+ background-size: cover;+ }+ body {+ height:100%;+ font-family: 'Roboto', sans-serif;+ margin: 0;+ }+ input,+ textarea,+ button,+ select,+ a {+ -webkit-tap-highlight-color: rgba(0,0,0,0);+ }+ .paper-toggle-button-0[checked]:not([disabled]) .toggle-bar.paper-toggle-button{+ opacity: 1;+ }+ </style>++</head>+<body>+ <openremote-app></openremote-app>+</body>+</html>\ No newline at end of filediff --git a/frontend/manifest.json b/frontend/manifest.jsonnew file mode 100644index 000000000..d7290e51e--- /dev/null+++ b/frontend/manifest.json@@ -0,0 +1,6 @@+{+ "name": "Blok61",+ "short_name": "Blok61",+ "start_url": "/",+ "display": "standalone"+}diff --git a/frontend/src/components/input-switch-blok.html b/frontend/src/components/input-switch-blok.htmlnew file mode 100644index 000000000..29c33baf9--- /dev/null+++ b/frontend/src/components/input-switch-blok.html@@ -0,0 +1,85 @@++<!--+@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="../../bower_components/paper-radio-button/paper-radio-button.html">+<link rel="import" href="../../bower_components/paper-radio-group/paper-radio-group.html">+<dom-module id="input-switch-blok">+ <template>+ <style type="text/css">+ paper-radio-group.square-group{+ position:relative;+ display:block;+ height: 220px;+ margin: 20px auto;+ width:240px;+ }+ paper-radio-button{+ position: relative;+ width: 120px;+ height: 120px;+ float: left;+ display: block;+ padding: 0+ }+ paper-radio-group paper-radio-button.square > ::content #radioContainer{+ width:100px;+ height:100px;+ margin:10px;+ }+ paper-radio-group paper-radio-button.square > ::content #radioContainer #offRadio{+ background-color:#374c4f;+ border:0;+ }+ paper-radio-group paper-radio-button.square > ::content #radioContainer #onRadio{+ -webkit-transform: scale(1);+ transform: scale(1);+ opacity: 0;+ background-color:#c0d62e;++ transition: opacity ease 0.28s;+ }+ paper-radio-group paper-radio-button.square[checked] > ::content #radioContainer #onRadio{+ opacity: 1;+ }+ paper-radio-group paper-radio-button.square > ::content #radioContainer .paper-radio-button{+ border-radius: 0;+ }+ paper-radio-group paper-radio-button.square.break{+ clear:both;+ }+ paper-radio-group paper-radio-button.square > ::content #radioLabel.paper-radio-button{+ color:#FFFFFF;+ line-height: 100px;+ text-align: center;+ position: absolute;+ left: 0;+ top: 10px;+ width: 100px;+ }+ </style>+ <paper-radio-group selected="morning" class="square-group" allow-empty-selection>+ <content>+ <paper-radio-button class="square" name="morning">Morning</paper-radio-button>+ <paper-radio-button class="square" name="away">Away</paper-radio-button>+ <paper-radio-button class="square break" name="evening">Evening</paper-radio-button>+ <paper-radio-button class="square" name="night">Night</paper-radio-button>+ </content>+ </paper-radio-group>+ </template>++ <script>++ Polymer({+ is: 'input-switch-blok'+ });++ </script>+</dom-module>\ No newline at end of filediff --git a/frontend/src/components/input-temperature.html b/frontend/src/components/input-temperature.htmlnew file mode 100644index 000000000..8504ddb19--- /dev/null+++ b/frontend/src/components/input-temperature.html@@ -0,0 +1,78 @@++<!--+@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="../../bower_components/paper-item/paper-item.html">+<link rel="import" href="../../bower_components/paper-listbox/paper-listbox.html">+<link rel="import" href="../../bower_components/paper-dropdown-menu/paper-dropdown-menu.html">+<dom-module id="input-temperature">+ <template>+ <style type="text/css">+ paper-dropdown-menu.custom{+ background-color: #374c4f;+ padding: 20px;+ }+ paper-dropdown-menu.custom {+ --paper-input-container-label: {+ color: #FFFFFF;+ font-size+ }+ --paper-input-container-input: {+ font-size:36px;+ color:#FFFFFF;+ }++ --paper-input-container-underline: {+ border-color:#c0d62e;+ }++ --paper-input-container-focus-color:{+ color:#c0d62e;+ border-color:#c0d62e;+ }+ };++ </style>+ <paper-dropdown-menu class="custom" label="Set">+ <paper-listbox class="dropdown-content">+ <paper-item>15.0</paper-item>+ <paper-item>15.5</paper-item>+ <paper-item>16.0</paper-item>+ <paper-item>16.5</paper-item>+ <paper-item>17.0</paper-item>+ <paper-item>17.5</paper-item>+ <paper-item>18.0</paper-item>+ <paper-item>18.5</paper-item>+ <paper-item>19.0</paper-item>+ <paper-item>19.5</paper-item>+ <paper-item>20.0</paper-item>+ <paper-item>20.5</paper-item>+ <paper-item>21.0</paper-item>+ <paper-item>21.5</paper-item>+ <paper-item>22.0</paper-item>+ <paper-item>22.5</paper-item>+ <paper-item>23.0</paper-item>+ <paper-item>23.5</paper-item>+ <paper-item>24.0</paper-item>+ <paper-item>24.5</paper-item>+ <paper-item>25.0</paper-item>+ <paper-item>25.5</paper-item>+ </paper-listbox>+ </paper-dropdown-menu>+ </template>++ <script>++ Polymer({+ is: 'input-temperature'+ });++ </script>+</dom-module>\ No newline at end of filediff --git a/frontend/src/components/table-schedule.html b/frontend/src/components/table-schedule.htmlnew file mode 100644index 000000000..49ca3c932--- /dev/null+++ b/frontend/src/components/table-schedule.html@@ -0,0 +1,105 @@++<!--+@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+-->++<dom-module id="table-schedule">+ <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;++ text-align: center;+ }+ th {+ background-color: #c0d62e;+ color: white;+ }+ td:first-child{+ background-color:#e4e4e4;+ border-bottom: 1px solid #FFFFFF;+ }+ </style>+ <table style="width: 100%;" border="0">+ <tbody>+ <tr>+ <th> </th>+ <th>Morning</th>+ <th>Away</th>+ <th>Evening</th>+ <th>Night</th>+ </tr>+ <tr>+ <td>Mon</td>+ <td> </td>+ <td> </td>+ <td> </td>+ <td> </td>+ </tr>+ <tr>+ <td>Tue</td>+ <td> </td>+ <td> </td>+ <td> </td>+ <td> </td>+ </tr>+ <tr>+ <td>Wed</td>+ <td> </td>+ <td> </td>+ <td> </td>+ <td> </td>+ </tr>+ <tr>+ <td>Thu</td>+ <td> </td>+ <td> </td>+ <td> </td>+ <td> </td>+ </tr>+ <tr>+ <td>Fri</td>+ <td> </td>+ <td> </td>+ <td> </td>+ <td> </td>+ </tr>+ <tr>+ <td>Sat</td>+ <td> </td>+ <td> </td>+ <td> </td>+ <td> </td>+ </tr>+ <tr>+ <td>Sun</td>+ <td> </td>+ <td> </td>+ <td> </td>+ <td> </td>+ </tr>+ </tbody>+ </table>+ </template>++ <script>++ Polymer({+ is: 'table-schedule'+ });++ </script>+</dom-module>\ No newline at end of filediff --git a/frontend/src/openremote-app.html b/frontend/src/openremote-app.htmlnew file mode 100644index 000000000..02bad9d18--- /dev/null+++ b/frontend/src/openremote-app.html@@ -0,0 +1,420 @@++<!--+@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="../bower_components/app-layout/app-drawer-layout/app-drawer-layout.html">+<link rel="import" href="../bower_components/app-layout/app-drawer/app-drawer.html">+<link rel="import" href="../bower_components/app-layout/app-header/app-header.html">+<link rel="import" href="../bower_components/app-layout/app-header-layout/app-header-layout.html">+<link rel="import" href="../bower_components/app-layout/app-toolbar/app-toolbar.html">+<link rel="import" href="../bower_components/app-route/app-route.html">++<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-pages/iron-pages.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">+<link rel="import" href="../bower_components/paper-checkbox/paper-checkbox.html">+<link rel="import" href="../bower_components/paper-menu/paper-menu.html">+<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-styles/color.html">++<link rel="import" href="openremote-login.html">+<link rel="import" href="components/input-temperature.html">+<link rel="import" href="components/input-switch-blok.html">+<link rel="import" href="components/table-schedule.html">++<dom-module id="openremote-app">++ <template>+ <style>+ app-drawer-layout{+ position: relative;+ z-index: 9999;++ }+ app-toolbar {+ background-color: #374c4f;+ color:#FFFFFF;+ }+ .main-header {+ box-shadow: 0px 5px 6px -3px rgba(0, 0, 0, 0.4);+ }+ .page-overlay{+ position: absolute;+ width:100%;+ height:100%;+ top:0;+ z-index: 999999;+ }+ .page-overlay-inner{+ background-color: #f2f2f2;+ top:0;+ width:100%;+ height:100%;+ position: absolute;+ overflow-y:scroll;+ }++ paper-tabs {+ --paper-tabs-selection-bar-color: #c0d62e;+ color:black;+ background-color: rgba(255,255,255,1);+ height:54px;+ }++ paper-tab {+ --paper-tab-ink: #c0d62e;+ }+ [hidden] {+ display: none !important;+ }+ 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;+ }+ paper-toggle-button.center.green {+ float:none;+ margin:auto;+ }+ .panel{+ background-color:rgba(255,255,255,0.87);+ margin:10px;+ border-radius: 5px;+ }+ .inner-panel{+ padding:15px;+ }+ .small {+ --iron-icon-height: auto;+ --iron-icon-width: 15px;+ }+ .normal {+ --iron-icon-height: auto;+ --iron-icon-width: 30px;+ }+ .big {+ --iron-icon-height: auto;+ --iron-icon-width: 72px;+ margin:auto;+ display: block;+ }+ .panel paper-toggle-button{+ margin:5px 0 0 0;+ }+ .panel .row span{+ margin-left: 20px;+ }+ .center{+ text-align: center;+ margin: auto;+ display: block;+ }+ .row{+ width:100%;+ margin:10px 0;+ clear:both;+ }+ .container {+ position: relative;+ display: flex;+ flex-flow: row wrap;+ }+ .item {+ box-sizing: border-box;+ padding: 10px;+ flex: 1;+ }+ }+ </style>+ <app-location route="{{route}}"></app-location>+ <app-route+ route="{{route}}"+ pattern="/:view"+ data="{{selected}}"></app-route>++ <app-drawer-layout force-narrow>+ <app-drawer>+ <paper-item name="full-smart"> <span>Full Smart</span><paper-toggle-button class="green"></paper-toggle-button></paper-item>+ <hr />+ <paper-menu selected="{{selected}}" attr-for-selected="name">+ <template is="dom-repeat" items="{{items}}">+ <paper-item name="{{item}}">{{item}}</paper-item>+ </template>+ <hr />+ <paper-item name="Account">Account</paper-item>+ <paper-item name="log-out">Log out</paper-item>+ </paper-menu>+ </app-drawer>+ <app-header-layout>+ <app-header id="header" effects="waterfall" fixed>+ <app-toolbar>+ <paper-icon-button icon="menu" drawer-toggle></paper-icon-button>+ <div main-title>Home</div>+ <a id="settings-btn">+ <paper-icon-button icon="settings"></paper-icon-button>+ </a>+ </app-toolbar>++ <paper-tabs selected="{{selected}}" attr-for-selected="name">+ <template is="dom-repeat" items="{{items}}">+ <paper-tab name="{{item}}">{{item}}</paper-tab>+ </template>+ </paper-tabs>++ </app-header>+ </app-header-layout>+ </app-drawer-layout>+ <iron-pages id="pages" selected="{{selected}}" attr-for-selected="name">+ <div name="Login" class="page-overlay">+ <div class="page-overlay-inner">+ <app-toolbar>+ <div main-title>Home</div>+ </app-toolbar>+ <div class="panel">+ <div class="inner-panel">+ <openremote-login></openremote-login>+ </div>+ </div>+ </div>+ </div>++ <div name="Light">+ <div class="panel">+ <div class="inner-panel">+ <div class="row">+ <iron-icon class="normal" src="../images/panel/light_off.png"></iron-icon>+ <span >Smart - Lightning</span>+ <paper-toggle-button class="green"></paper-toggle-button>+ </div>+ </div>+ </div>+ <div class="panel">+ <div class="inner-panel">+ <label class="center" id="lightning">Lightning Scenes</label>+ <input-switch-blok></input-switch-blok>+ </div>+ </div>+ </div>++ <div name="Start">+ <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 class="green"></paper-toggle-button>+ </div>+ </div>+ </div>+ <div class="panel">+ <div class="inner-panel">+ <span class="center">Smart Start Devices</span>+ <div class="row">+ <iron-icon class="normal" src="../images/panel/home_on.png"></iron-icon>+ <span >Dishwasher</span>+ <paper-toggle-button class="green"></paper-toggle-button>+ </div>+ <div class="row">+ <iron-icon class="normal" src="../images/panel/home_on.png"></iron-icon>+ <span >Washing</span>+ <paper-toggle-button class="green"></paper-toggle-button>+ </div>+ </div>+ </div>++ <div class="panel">+ <div class="inner-panel">+ <span class="center">Energy Monitor</span>+ </div>+ </div>+ </div>++ <div name="Safety">+ <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 class="green"></paper-toggle-button>+ </div>+ </div>+ </div>+ <div class="panel">+ <div class="inner-panel">+ <span class="center">Alarm</span>+ <div class="row">+ <iron-icon class="big" src="../images/panel/alarm_large_off.png"></iron-icon>+ <paper-toggle-button class="green center"></paper-toggle-button>+ </div>+ </div>+ </div>+ <div class="panel">+ <div class="inner-panel">+ <div class="row">+ <iron-icon class="normal" src="../images/panel/home_on.png"></iron-icon>+ <span >Windows</span>+ <span class="right">Open</span>+ </div>+ </div>+ </div>+ </div>++ <div name="Climate">+ <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 class="green"></paper-toggle-button>+ </div>+ </div>+ </div>+ <div class="panel">+ <div class="inner-panel">+ <div class="container">+ <div class="item"><span style="font-size:52px;">18.0</div>+ <div class="item">+ <input-temperature></input-temperature>+ </div>+ </div>+ </div>+ </div>+ <div class="panel">+ <div class="inner-panel">+ <span class="center">Heating scenes</span>+ <div class="row">+ <iron-icon class="small" src="../images/panel/temperature_gauge_100.png"></iron-icon>+ <span >Day</span>+ <span >21</span>+ <paper-toggle-button class="green"></paper-toggle-button>+ </div>+ <div class="row">+ <iron-icon class="small" src="../images/panel/temperature_gauge_100.png"></iron-icon>+ <span >Night</span>+ <span >18</span>+ <paper-toggle-button class="green"></paper-toggle-button>+ </div>+ </div>+ </div>+ <div class="panel">+ <div class="inner-panel">+ <span class="center">Ventilation</span>+ <div class="row">+ <iron-icon class="small" src="../images/panel/temperature_gauge_100.png"></iron-icon>+ <span >Auto-ventilation</span>+ <span >home</span>+ <paper-toggle-button class="green"></paper-toggle-button>+ </div>+ </div>+ </div>+ </div>++ <div name="Account" class="page-overlay">+ <div class="page-overlay-inner">+ <app-toolbar>+ <paper-icon-button class="back-btn" icon="arrow-back" drawer-toggle></paper-icon-button>+ <div main-title>Home</div>+ </app-toolbar>+ <div class="panel">+ <div class="inner-panel">+ <span class="center">Account</span>+ </div>+ </div>+ </div>+ </div>++ <div name="Settings" class="page-overlay">+ <div class="page-overlay-inner">+ <app-toolbar>+ <paper-icon-button class="back-btn" icon="arrow-back" drawer-toggle></paper-icon-button>+ <div main-title>Home</div>+ </app-toolbar>+ <div class="panel">+ <div class="inner-panel">+ <span class="center">Vacation Settings</span>+ </div>+ </div>+ <div class="panel">+ <div class="inner-panel">+ <span class="center">Current predicted weekschedule:</span>+ <table-schedule></table-schedule>+ </div>+ </div>+ </div>+ </div>++ </iron-pages>+ </div>+ </template>++ <script>+ Polymer({+ ready: function () {+ var pages = document.querySelector("#pages");+ var settings = document.querySelector("#settings-btn");+ settings.addEventListener("click", function(){+ pages.selected = 'Settings';+ });++ var backFunction = function() {+ pages.selectPrevious();+ }+ var backbtn = document.getElementsByClassName("back-btn");+ for (var i = 0; i < backbtn.length; i++) {+ backbtn[i].addEventListener('click', backFunction, false);+ }+ },+ is: 'openremote-app',++ properties: {+ selected: {+ type: String,+ value: 'Login'+ },++ wideLayout: {+ type: Boolean,+ value: false,+ observer: 'onLayoutChange',+ },+ behaviors: [+ Polymer.IronOverlayBehavior+ ],+ items: {+ type: Array,+ value: function() {+ return ['Light', 'Start', 'Safety', 'Climate'];+ }+ }+ },++ onLayoutChange: function(wide) {+ var drawer = this.$.drawer;++ if (wide && drawer.opened) {+ drawer.opened = false;+ }+ }+ });++ </script>++</dom-module>\ No newline at end of filediff --git a/frontend/src/openremote-login.html b/frontend/src/openremote-login.htmlnew file mode 100644index 000000000..1a3577098--- /dev/null+++ b/frontend/src/openremote-login.html@@ -0,0 +1,93 @@++<!--+@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="../bower_components/iron-form/iron-form.html">++<dom-module id="openremote-login">+ <template>+ <style is="custom-style">+ .output {+ margin-top: 20px;+ word-wrap: break-word;+ @apply(--paper-font-common-code);+ }+ form > paper-button {+ width: 45%;+ margin-top: 20px;+ }+ form > paper-button:not([disabled]) {+ background: #c0d62e;+ color: white;+ }+ button {+ margin-top: 20px;+ }+ paper-spinner {+ width: 14px;+ height: 14px;+ margin-right: 20px;+ border:none;+ }++ paper-dropdown-menu {+ display: block;+ }+ demo-snippet {+ --demo-snippet-code: {+ max-height: 300px;+ };+ }+ </style>++ <form is="iron-form" method="get" action="/" id="eventsDemo">+ <paper-input name="name" label="Name" required auto-validate></paper-input>+ <paper-input name="password" label="Password" type="password" required auto-validate></paper-input>+ <paper-checkbox name="read" required>You must check this box</paper-checkbox><br>+ <paper-button raised onclick="_delayedSubmit(event)" disabled id="eventsDemoSubmit">+ <paper-spinner id="spinner" hidden></paper-spinner>Submit</paper-button>+ <paper-button raised onclick="_reset(event)">Reset</paper-button>+ <div class="output"></div>+ </form>+ <script>+ eventsDemo.addEventListener('change', function(event) {+ eventsDemoSubmit.disabled = !eventsDemo.validate();+ });+ function _delayedSubmit(event) {+ spinner.active = true;+ spinner.hidden = false;+ eventsDemoSubmit.disabled = true;+ setTimeout(function() {+ var pages = document.querySelector("#pages");+ pages.selected = 'Light';+ }, 1000);+ }+ function _reset(event) {+ var form = Polymer.dom(event).localTarget.parentElement+ form.reset();+ form.querySelector('.output').innerHTML = '';+ }+ document.getElementById('eventsDemo').addEventListener('iron-form-submit', function(event) {+ spinner.active = false;+ spinner.hidden = true;+ eventsDemoSubmit.disabled = false;+ this.querySelector('.output').innerHTML = JSON.stringify(event.detail);+ });+ </script>+ </template>++ <script>++ Polymer({+ is: 'openremote-login'+ });++ </script>+</dom-module>\ No newline at end of file