Added confirmation dialog and removed dbg
这个提交包含在:
父节点
e01a7a3ae4
当前提交
4c9b752436
共有 2 个文件被更改,包括 13 次插入 和 12 次删除
|
|
@ -36,7 +36,7 @@
|
|||
</li>
|
||||
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-star"></i></a>
|
||||
<a class="nav-link dropdown-toggle" id="fav_item" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-star"></i></a>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#" id="fav_add"><?php echo lang('fav_add'); ?></a>
|
||||
<div class="dropdown-divider"></div>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ var favs={};
|
|||
});
|
||||
|
||||
$(document).on("click", "#fav_recall", function (event) {
|
||||
console.log(favs[this.innerText]);
|
||||
$('#sat_name').val(favs[this.innerText].sat_name);
|
||||
$('#sat_mode').val(favs[this.innerText].sat_mode);
|
||||
$('#band_rx').val(favs[this.innerText].band_rx);
|
||||
|
|
@ -25,16 +24,18 @@ var favs={};
|
|||
|
||||
|
||||
function del_fav(name) {
|
||||
$.ajax({
|
||||
url: base_url+'index.php/user_options/del_fav',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify({ "option_name": name }),
|
||||
success: function(result) {
|
||||
get_fav();
|
||||
}
|
||||
});
|
||||
if (confirm("Are you sure to delete Fav?")) {
|
||||
$.ajax({
|
||||
url: base_url+'index.php/user_options/del_fav',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify({ "option_name": name }),
|
||||
success: function(result) {
|
||||
get_fav();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function get_fav() {
|
||||
|
|
|
|||
正在加载…
在新工单中引用