Browse Source

Fixes for Explorer

fastled
Xose Pérez 7 years ago
parent
commit
029526532e
4 changed files with 2462 additions and 2463 deletions
  1. BIN
      code/espurna/data/index.html.gz
  2. +2448
    -2448
      code/espurna/static/index.html.gz.h
  3. +7
    -6
      code/html/custom.js
  4. +7
    -9
      code/html/index.html

BIN
code/espurna/data/index.html.gz View File


+ 2448
- 2448
code/espurna/static/index.html.gz.h
File diff suppressed because it is too large
View File


+ 7
- 6
code/html/custom.js View File

@ -73,7 +73,9 @@ function checkPassword(str) {
}
function zeroPad(number, positions) {
return ("0".repeat(positions) + number).slice(-positions);
var zeros = '';
for (var i = 0; i < positions; i++) zeros += "0";
return (zeros + number).slice(-positions);
}
function validateForm(form) {
@ -696,8 +698,6 @@ function processData(data) {
Object.keys(data).forEach(function(key) {
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Web mode
// ---------------------------------------------------------------------
@ -864,7 +864,8 @@ function processData(data) {
}
// Enable options
if (key.endsWith("Visible")) {
var position = key.indexOf("Visible");
if (position > 0 && position == key.length - 7) {
var module = key.slice(0,-7);
$(".module-" + module).show();
return;
@ -989,11 +990,11 @@ function connect(host) {
if (typeof host === 'undefined') {
host = window.location.href.replace('#', '');
} else {
if (!host.startsWith("http")) {
if (host.indexOf("http") != 0) {
host = 'http://' + host + '/';
}
}
if (!host.startsWith("http")) return;
if (host.indexOf("http") != 0) return;
webhost = host;
wshost = host.replace('http', 'ws') + 'ws';


+ 7
- 9
code/html/index.html View File

@ -320,14 +320,12 @@
<div class="pure-g module module-multirelay">
<label class="pure-u-1 pure-u-lg-1-4">Switch sync mode</label>
<div class="pure-u-1 pure-u-lg-3-4">
<select name="relaySync" class="pure-u-3-4" tabindex="3">
<option value="0">No synchonisation</option>
<option value="1">Zero or one switches active</option>
<option value="2">One and just one switch active</option>
<option value="3">All synchonised</option>
</select>
</div>
<select name="relaySync" class="pure-u-1 pure-u-3-4" tabindex="3">
<option value="0">No synchonisation</option>
<option value="1">Zero or one switches active</option>
<option value="2">One and just one switch active</option>
<option value="3">All synchonised</option>
</select>
<div class="pure-u-0 pure-u-lg-1-4"></div>
<div class="pure-u-1 pure-u-lg-3-4 hint">Define how the different switches should be synchronized.</div>
</div>
@ -886,7 +884,7 @@
</div> <!-- layout -->
<!-- Templates -------------------------------------------------------->
<!-- Templates -->
<div id="rfbNodeTemplate" class="template">


Loading…
Cancel
Save