mirror of
https://github.com/magicbug/Cloudlog
synced 2024-11-22 17:52:16 +00:00
Now delete is working, too
This commit is contained in:
parent
b56c39db6f
commit
aca01fabb5
@ -7,6 +7,10 @@ var favs={};
|
||||
save_fav();
|
||||
});
|
||||
|
||||
$(document).on("click", "#fav_del", function (event) {
|
||||
del_fav($(this).attr('name'));
|
||||
});
|
||||
|
||||
$(document).on("click", "#fav_recall", function (event) {
|
||||
console.log(favs[this.innerText]);
|
||||
$('#sat_name').val(favs[this.innerText].sat_name);
|
||||
@ -26,7 +30,7 @@ var favs={};
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: { "option_name": name },
|
||||
data: JSON.stringify({ "option_name": name }),
|
||||
success: function(result) {
|
||||
get_fav();
|
||||
}
|
||||
@ -42,7 +46,7 @@ var favs={};
|
||||
success: function(result) {
|
||||
$("#fav_menu").empty();
|
||||
for (const key in result) {
|
||||
$("#fav_menu").append('<a class="dropdown-item" href="#" id="fav_recall">'+key+'</a>');
|
||||
$("#fav_menu").append('<label class="dropdown-item"><span id="fav_del" name="'+key+'"><i class="fas fa-trash-alt"></i></span> <span id="fav_recall">'+key+'</span></label>');
|
||||
}
|
||||
favs=result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user