UNPKG

iobroker.solarwetter

Version:

Prognostizier Solarstrom Tagesertrag (von solar-wetter.com)

198 lines (174 loc) 7.74 kB
<html> <!-- these 4 files always have to be included --> <link rel="stylesheet" type="text/css" href="../../lib/css/themes/jquery-ui/redmond/jquery-ui.min.css"/> <link rel="stylesheet" type="text/css" href="../../lib/css/jquery.multiselect-1.13.css"/> <script type="text/javascript" src="../../lib/js/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="../../socket.io/socket.io.js"></script> <script type="text/javascript" src="../../lib/js/jquery-ui-1.10.3.full.min.js"></script> <!-- these two file always have to be included --> <link rel="stylesheet" type="text/css" href="../../css/adapter.css"/> <script type="text/javascript" src="../../js/translate.js"></script> <script type="text/javascript" src="../../js/adapter-settings.js"></script> <!-- Lists of Postcodes and Cities--> <script type="text/javascript" src="plz.js"></script> <script type="text/javascript" src="cities.js"></script> <style> .description { font-size: smaller; } .headline { padding-top: 20px; padding-left: 10px; } .subline { } .inputvalue { width: 20%; text-align: right; } .info { padding: 5px 0 0 0; color: gray; font-style: italic; font-size: 60%; text-align: right; width: 50%; } </style> <script type="text/javascript"> systemDictionary = { "solarwetter Adapter settings": { "en": "solarwetter Adapter settings", "de": "solarwetter Adapter Einstellungen", "ru": "Настройки solarwetter Adapter" }, "Postcode": { "en": "Location", "de": "Standort", "ru": "Translate to russian, please: Location" }, "Description": { "en": "Choose your area by selecting the post code", "de": "Gewünschter Postleitzahlenbereich", "ru": "Translate to ru please: Choose your area by selecting the post code" }, "Copyright": { "en": "Data provided by solar-wetter.com", "de": "Daten von solar-wetter.com", "ru": "Translate to ru please: Data provided by solar-wetter.com" }, "Device": { "en": "Solar plant", "de": "Solaranlage", "ru": "Translate to ru please: Solar plant" }, "Device_power": { "en": "Power of your device", "de": "Geben Sie die Gesamtleistung Ihrer Anlage ein", "ru": "Translate to ru please: Geben Sie die Gesamtleistung Ihrer Anlage ein" }, "Choose a city": { "en": "Choose a city", "de": "Wählen Sie eine Stadt", "ru": "Translate to ru please: Choose a city" }, "Username": { "en": "Username", "de": "Benutzername", "ru": "Username" }, "Password": { "en": "Password", "de": "Passwort", "ru": "Password" } }; function load(settings, onChange) { // Postleitzahlen $('#location').val(settings.location).change(onChange).keyup(onChange); // Wertelist aus plz einbauen var text = ''; for (var p in plz) { text += '<option value="' + plz[p] + '">' + plz[p] + '</option>\n'; } $('#areacodelist').append(text); // Show correct Area Code when already defined $('#location').val(settings.location).change(onChange) // 4-tages-prognose $('#city').val(settings.prognoseort).change(onChange).keyup(onChange); // Insert to HTML Code from cities.js $('#city').append(city); // Show correct Area Code when already defined $('#city').val(settings.prognoseort).change(onChange) // Strom $('#power').val(settings.power).change(onChange).keyup(onChange); // Login $('#solaruser').val(settings.solarusername).change(onChange).keyup(onChange); $('#solarpass').val(settings.solarpassword).change(onChange).keyup(onChange); onChange(false); } function save(callback) { callback({ location: $('#location').val(), power: $('#power').val().replace(/,/, "."), prognoseort: $('#city').val(), solarusername: $('#solaruser').val(), solarpassword: $('#solarpass').val() }); // nicht nur . statt , später auch Plausibilität } </script> <div id="adapter-container"> <table style="width: 100%"> <tr> <td><img src="solarwetter.png"></td> <td class="headline"><h3 class="translate">solarwetter Adapter settings</h3></td> </tr> </table> <h4 class="translate subline" style="width: calc(100% - 10px)">Login</h4> <table id="owndevice" style="margin-top: 20px; width: calc(100% - 5px)"> <tr> <td class="translate description">Username</td> <td class="inputvalue"><input type="text" id="solaruser" class="value" size="20" maxlength ="25" style="text-align: right"/></td> </tr> <tr> <td class="translate description">Password</td> <td class="inputvalue"><input type="password" id="solarpass" class="value" size="20" maxlength ="25" style="text-align: right"/></td> </tr> </table> <h4 class="translate subline" style="width: calc(100% - 10px)">Postcode</h4> <table style="width: calc(100% - 5px)"> <tr> <td class="translate description">Description</td> <td class="translate inputvalue"> <select class="value" id="location"> <optgroup label="Region" id="areacodelist"> <!-- areacodelist from plz.js will be pasted here by skript --> </optgroup> </select> </td> </tr> <tr> <td></td> <td class="info translate">Copyright</td> </tr> </table> <h4 class="translate subline" style="width: calc(100% - 10px)">Device</h4> <table id="owndevice" style="margin-top: 20px; width: calc(100% - 5px)"> <tr> <td class="translate description">Device_power</td> <td class="inputvalue"><input type="text" id="power" class="value" size="10" style="text-align: right"/> kWp</td> </tr> </table> <h4 class="translate subline" style="width: calc(100% - 10px)">4-Tage-Vorhersage</h4> <table style="width: calc(100% - 5px)"> <tr> <td class="translate description">Choose a city</td> <td class="translate inputvalue"> <select class="value" id="city"> <!-- citylist from cities.js will be pasted here by skript --> </select> </td> </tr> </table> </div> </html>