Skip to content

Commit 33d3482

Browse files
committed
Simple select deselect all in file browser
- implements #282
1 parent f5045c0 commit 33d3482

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/configServer.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1767,6 +1767,13 @@ static void handleSd(HTTPRequest *req, HTTPResponse *res) {
17671767
}
17681768
}
17691769
file.close();
1770+
if (counter > 0) {
1771+
html += "<hr/>";
1772+
html += "<li class=\"file\"><input class='small' type='checkbox' id='select-all' "
1773+
"onclick='Array.prototype.slice.call(document.getElementsByClassName(\"small\")).filter("
1774+
"e=>!e.disabled).forEach(e=>e.checked=checked)"
1775+
"'> select/deselect all</li>";
1776+
}
17701777
html += "</ul>";
17711778

17721779
if (path != "/") {

0 commit comments

Comments
 (0)