esphome-docs/_static
Andrew Zaborowski 7be6c6536a
Add webserver-v1.js click handlers for Cover buttons (#521)
Add js click handlers for the web UI buttons added in
b1f9c9a6e0a3dce73507e6b60782987ee2459f48 in the esphome repository.
Since this change doesn't make the .js file incompatible with esphome
versions before the referenced commit I guess there's no need to
rename the file to -v2.

There are probably better ways to write those click handlers, for
example we could have a common function to launch the POST request to a
URL that it reads from the button object like this:

var button_onclick = function(evt) {
    const xhr = new XMLHttpRequest();
    xhr.open("POST", evt.target.onlick_post_url, true);
    xhr.send();
};

row.children[2].children[0].addEventListener('click', button_onlick);
row.children[2].children[0].onclick_post_url = '/light/' + id.substr(6) + '/toggle';

The only problem with this is that iirc ``evt.target`` is
browser-specific.
2020-04-09 11:12:21 -03:00
..
.keep Initial commit 🎉 2018-05-13 11:37:02 +02:00
apple-touch-icon.png Netlify (#153) 2019-02-07 13:54:45 +01:00
browserconfig.xml Netlify (#153) 2019-02-07 13:54:45 +01:00
changelog-1.9.0.png SEO Optimization (#82) 2018-11-14 22:12:27 +01:00
changelog-1.10.0.png Update 2019-01-09 16:26:12 +01:00
changelog-1.11.0.png Add changelog image 2019-02-22 22:20:14 +01:00
changelog-1.12.0.png Add screenshot 2019-03-17 21:53:29 +01:00
changelog-1.13.0.png Create changelog-1.13.0.png 2019-05-30 13:12:24 +02:00
changelog-1.14.0.png 1.14 Changelog (#393) 2019-11-01 18:28:26 +01:00
custom.css Add supporters page 2019-03-11 19:59:52 +01:00
disqus.js Revert "Remove disqus" 2019-03-06 11:02:03 +01:00
favicon-16x16.png Netlify (#153) 2019-02-07 13:54:45 +01:00
favicon-32x32.png Netlify (#153) 2019-02-07 13:54:45 +01:00
favicon-128x128.png SEO and speed improvements 2019-02-17 12:28:53 +01:00
favicon-192x192.png Fix favicons 2019-02-18 10:34:45 +01:00
favicon-256x256.png Fix favicons 2019-02-18 10:34:45 +01:00
favicon-512x512.png SEO and speed improvements 2019-02-17 12:28:53 +01:00
favicon.ico Netlify (#153) 2019-02-07 13:54:45 +01:00
mstile-150x150.png Netlify (#153) 2019-02-07 13:54:45 +01:00
safari-pinned-tab.svg Netlify (#153) 2019-02-07 13:54:45 +01:00
site.webmanifest Fix favicons 2019-02-18 10:34:45 +01:00
version Bump version to v1.14.2 2019-11-03 00:20:38 +01:00
webserver-v1.css Fix some typos (#65) 2018-10-20 15:10:26 +02:00
webserver-v1.js Add webserver-v1.js click handlers for Cover buttons (#521) 2020-04-09 11:12:21 -03:00
webserver-v1.min.css Initial commit 🎉 2018-05-13 11:37:02 +02:00
webserver-v1.min.js Add webserver-v1.js click handlers for Cover buttons (#521) 2020-04-09 11:12:21 -03:00