update
This commit is contained in:
@@ -255,7 +255,7 @@
|
||||
if (resp.code !== 0) {
|
||||
return
|
||||
}
|
||||
// clear
|
||||
// clear container-fluid
|
||||
$('main .container-fluid').empty()
|
||||
|
||||
// 解析结果
|
||||
@@ -301,10 +301,15 @@
|
||||
type: "delete",
|
||||
url: "delete",
|
||||
headers: {"X-CSRFToken": $.cookie("csrftoken")},
|
||||
data: {'id': mind_id},
|
||||
data: {'id': mind_id, 'source': 'dashboard'},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
console.log(data)
|
||||
if (data.code === 0) {
|
||||
primary_alert_(data.msg)
|
||||
$('#' + card_id).remove()
|
||||
} else {
|
||||
common_alert_(data.msg)
|
||||
}
|
||||
},
|
||||
async: false
|
||||
});
|
||||
|
||||
@@ -15,4 +15,8 @@ function common_alert_(text, class_str) {
|
||||
setTimeout(function () {
|
||||
$('.alert').alert('close')
|
||||
}, 1500)
|
||||
}
|
||||
|
||||
function primary_alert_(text) {
|
||||
common_alert_(text, 'alert-primary')
|
||||
}
|
||||
Reference in New Issue
Block a user