mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-09 21:17:18 +03:00
allow sorting for branch
This commit is contained in:
@@ -460,6 +460,19 @@ $(document).ready(function(){
|
||||
$("#releaseTable").html("");
|
||||
$.getJSON(releaseURL, function(data) {
|
||||
var i=0;
|
||||
var branches = [];
|
||||
data.forEach(function(release) {
|
||||
var [ver, idf, cfg, branch] = release.name.split('#');
|
||||
if (!branches.includes(branch)) {
|
||||
branches.push(branch);
|
||||
}
|
||||
});
|
||||
var fwb;
|
||||
branches.forEach(function(branch) {
|
||||
fwb += '<option value="' + branch + '">' + branch + '</option>';
|
||||
});
|
||||
$("#fwbranch").append(fwb);
|
||||
|
||||
data.forEach(function(release) {
|
||||
var url = '';
|
||||
release.assets.forEach(function(asset) {
|
||||
@@ -524,6 +537,20 @@ $(document).ready(function(){
|
||||
}
|
||||
});
|
||||
|
||||
$("#fwbranch").change(function(e) {
|
||||
var branch = this.value;
|
||||
var re = new RegExp('^'+branch+'$', "gi");
|
||||
$("tr.release").addClass("hide");
|
||||
$("tr.release").each(function(tr){
|
||||
$(this).find('td').each (function() {
|
||||
console.log($(this).html());
|
||||
if ($(this).html().match(re)) {
|
||||
$(this).parent().removeClass('hide');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$('#boot-button').on("click", function(){
|
||||
enableStatusTimer = true;
|
||||
});
|
||||
|
||||
@@ -254,6 +254,10 @@
|
||||
<input type="button" id="fwcheck" class="btn btn-info" value="Check for updates" />
|
||||
</div>
|
||||
<div id="searchfw" class="form-group">
|
||||
<select class="custom-select" id="fwbranch">
|
||||
<option selected="">Choose FW branch</option>
|
||||
</select>
|
||||
|
||||
<input class="form-control form-control-sm" id="searchinput" type="text" placeholder="search releases" id="inputSmall">
|
||||
</div>
|
||||
<table class="table table-hover">
|
||||
|
||||
Reference in New Issue
Block a user