Files
EdgeAdmin/web/views/@default/servers/iplists/index.js

30 lines
596 B
JavaScript
Raw Normal View History

2021-06-23 13:12:33 +08:00
Tea.context(function () {
2021-11-17 19:50:52 +08:00
this.updateItem = function (itemId) {
teaweb.popup(Tea.url(".updateIPPopup", {itemId: itemId}), {
height: "30em",
2021-11-17 19:50:52 +08:00
callback: function () {
2021-06-23 13:12:33 +08:00
teaweb.success("保存成功", function () {
2021-11-17 19:50:52 +08:00
teaweb.reload()
2021-06-23 13:12:33 +08:00
})
}
})
}
2021-11-17 19:50:52 +08:00
this.deleteItem = function (itemId) {
2021-06-23 13:12:33 +08:00
let that = this
2021-11-17 19:50:52 +08:00
teaweb.confirm("确定要删除这个IP吗", function () {
that.$post(".deleteIP")
2021-06-23 13:12:33 +08:00
.params({
2021-11-17 19:50:52 +08:00
"itemId": itemId
2021-06-23 13:12:33 +08:00
})
2021-11-17 19:50:52 +08:00
.refresh()
2021-06-23 13:12:33 +08:00
})
}
this.readAllItems = function () {
this.$post(".readAll")
.success(function () {
teaweb.reload()
})
}
2021-06-23 13:12:33 +08:00
})