mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-09 13:07:03 +03:00
error handling for autoexec1
This commit is contained in:
@@ -173,7 +173,7 @@ $(document).ready(function(){
|
|||||||
$( "#wifi" ).slideDown( "fast", function() {})
|
$( "#wifi" ).slideDown( "fast", function() {})
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#autoexec-cb").on("click", function() {
|
$("input#autoexec-cb").on("click", function() {
|
||||||
autoexec = (this.checked)?1:0;
|
autoexec = (this.checked)?1:0;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/config.json',
|
url: '/config.json',
|
||||||
@@ -194,7 +194,7 @@ $(document).ready(function(){
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#save-autoexec1").on("click", function() {
|
$("input#save-autoexec1").on("click", function() {
|
||||||
autoexec1 = $("#autoexec1").val();
|
autoexec1 = $("#autoexec1").val();
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@@ -203,12 +203,16 @@ $(document).ready(function(){
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
cache: false,
|
cache: false,
|
||||||
headers: { "X-Custom-autoexec1": autoexec1 },
|
headers: { "X-Custom-autoexec1": autoexec1 },
|
||||||
data: { 'timestamp': Date.now() }
|
data: { 'timestamp': Date.now() },
|
||||||
|
error: function (xhr, ajaxOptions, thrownError) {
|
||||||
|
console.log(xhr.status);
|
||||||
|
console.log(thrownError);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
console.log('sent config JSON with headers:', autoexec1);
|
console.log('sent config JSON with headers:', autoexec1);
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#save-gpio").on("click", function() {
|
$("input#save-gpio").on("click", function() {
|
||||||
var headers = {};
|
var headers = {};
|
||||||
$("input.gpio").each(function() {
|
$("input.gpio").each(function() {
|
||||||
var id = $(this)[0].id;
|
var id = $(this)[0].id;
|
||||||
|
|||||||
Reference in New Issue
Block a user