mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-08 20:47:08 +03:00
add FW search
This commit is contained in:
@@ -343,17 +343,36 @@ $(document).ready(function(){
|
|||||||
"</tr>"
|
"</tr>"
|
||||||
);
|
);
|
||||||
$('#showallbutton').on("click", function(){
|
$('#showallbutton').on("click", function(){
|
||||||
console.log('show all');
|
|
||||||
$("tr.hide").removeClass("hide");
|
$("tr.hide").removeClass("hide");
|
||||||
$("tr#showall").addClass("hide");
|
$("tr#showall").addClass("hide");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
$("#searchfw").css("display", "inline");
|
||||||
})
|
})
|
||||||
.fail(function() {
|
.fail(function() {
|
||||||
alert("failed to fetch release history!");
|
alert("failed to fetch release history!");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('input#searchinput').on("input", function(){
|
||||||
|
var s = $('input#searchinput').val();
|
||||||
|
var re = new RegExp(s, "gi");
|
||||||
|
if (s.length == 0) {
|
||||||
|
$("tr.release").removeClass("hide");
|
||||||
|
} else if (s.length < 3) {
|
||||||
|
$("tr.release").addClass("hide");
|
||||||
|
} else {
|
||||||
|
$("tr.release").addClass("hide");
|
||||||
|
$("tr.release").each(function(tr){
|
||||||
|
$(this).find('td').each (function() {
|
||||||
|
if ($(this).html().match(re)) {
|
||||||
|
$(this).parent().removeClass('hide');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
//first time the page loads: attempt to get the connection status and start the wifi scan
|
//first time the page loads: attempt to get the connection status and start the wifi scan
|
||||||
refreshAP();
|
refreshAP();
|
||||||
getConfig();
|
getConfig();
|
||||||
|
|||||||
@@ -270,6 +270,9 @@
|
|||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<input type="button" id="fwcheck" class="btn btn-info" value="Check for updates" />
|
<input type="button" id="fwcheck" class="btn btn-info" value="Check for updates" />
|
||||||
</div>
|
</div>
|
||||||
|
<div id="searchfw" class="form-group">
|
||||||
|
<input class="form-control form-control-sm" id="searchinput" type="text" placeholder="search releases" id="inputSmall">
|
||||||
|
</div>
|
||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -356,3 +356,8 @@ div#message {
|
|||||||
tr.hide {
|
tr.hide {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#searchfw {
|
||||||
|
float: right;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user