diff --git a/static/js/tracker.js b/static/js/tracker.js index d2945ec..1e8f7e5 100644 --- a/static/js/tracker.js +++ b/static/js/tracker.js @@ -8,21 +8,11 @@ function validate(what, text) { $(document).ready(function () { $(".show-modal").click(function () { $("#alias_exclamation").hide(); - $("#smsnumber_exclamation").hide(); var alias = $(this).prev().html(); var deveui = $(this).prev().attr('id').replace("alias_", ""); $('#deveui').html(deveui); - var alarmactive = $('#alarmactive_' + deveui).html(); - var smsnumber = $('#smsnumber_' + deveui).html(); $("#alias").val(alias); - console.log(alarmactive); - if (alarmactive == "1") { - $('#checkbox').prop('checked', true); - } else { - $('#checkbox').prop('checked', false); - } - $("#smsnumber").val(smsnumber); $("#modal").addClass("is-active"); }); @@ -118,11 +108,6 @@ $(document).ready(function () { }); $("#modal-save").click(function () { - var alarmactive = "0"; - if ($('#checkbox').prop('checked')) { - alarmactive = "1"; - } - // Validation Code var is_valid = true; if (!validate('alias', $('#alias').val())) { @@ -141,7 +126,7 @@ $(document).ready(function () { } $.ajax({ - url: "save_scale_settings", + url: "save_tracker_settings", type: "get", //send it through get method dataType: "json", data: { @@ -294,7 +279,6 @@ var woBischIcon = L.icon({ var maps = []; $(document).ready(function () { $(".tracker").each(function (index) { - console.log('Draw Map (' + index + "): " + $(this).find(".alias").html()); deveui = $(this).find("div").first().attr("id"); lat = $(this).find("#lat").html(); @@ -322,4 +306,4 @@ $(document).ready(function () { }); -}); \ No newline at end of file +});