Commit 3685f198 authored by nanahira's avatar nanahira

fix

parent 3cb2d061
...@@ -96,11 +96,18 @@ function loadreplays() { ...@@ -96,11 +96,18 @@ function loadreplays() {
function clearreplays() { function clearreplays() {
if (confirm("确实要清空记录吗?")) { if (confirm("确实要清空记录吗?")) {
var url=$("#http").val() + "://" + $("#ip").val() + ":" + $("#port").val() + "/api/clearlog?callback=?"+ ($("#password").val() ? "&pass="+$("#password").val() : ""); var url=$("#http").val() + "://" + $("#ip").val() + ":" + $("#port").val() + "/api/clearlog?callback=?"+ ($("#password").val() ? "&pass="+$("#password").val() : "");
$.getJSON(url, listreplay); $.getJSON(url, clearreplays_success);
$("#open_button").removeClass("btn-success"); $("#empty_button").removeClass("btn-success");
} }
} }
function clearreplays_success() {
$("#empty_button").addClass("btn-success");
$("#num").text(0);
$("#rooms tbody").remove();
$("#rooms").append($("<tbody></tbody>"));
}
function listreplay(data) { function listreplay(data) {
$("#open_button").addClass("btn-success"); $("#open_button").addClass("btn-success");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment