Commit 7bb50a28 authored by nanahira's avatar nanahira

add clear replay

parent e1450be8
...@@ -29,17 +29,17 @@ ...@@ -29,17 +29,17 @@
共有<span id="num">0</span>场决斗 共有<span id="num">0</span>场决斗
</div> </div>
</div> </div>
<!--div class="row"> <div class="row">
<div class="col-lg-2">
<button class="btn btn-default" id="empty_button" data-toggle="tooltip" title="这个功能鸽了">清空记录</button>
</div>
<div class="col-lg-2"> <div class="col-lg-2">
<button class="btn btn-default" id="pack_button" data-toggle="tooltip" title="这个功能也鸽了">打包下载录像</button> <button class="btn btn-default" id="empty_button">清空记录</button>
</div> </div>
<!--div class="col-lg-2">
<button class="btn btn-default" id="pack_button">打包下载录像</button>
</div-->
<div class="col-lg-2"> <div class="col-lg-2">
<span id="message_callback"></span> <span id="message_callback"></span>
</div> </div>
</div--> </div>
</div> </div>
<div class="container"> <div class="container">
<hr> <hr>
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
$(function(){ $(function(){
$("body").tooltip({selector: "[data-toggle='tooltip']", trigger: "hover"}); $("body").tooltip({selector: "[data-toggle='tooltip']", trigger: "hover"});
$("#open_button").click(loadreplays); $("#open_button").click(loadreplays);
$("#empty_button").click(clearreplays);
//$("#welcome_button").click(welcome); //$("#welcome_button").click(welcome);
var params=parseQueryString(); var params=parseQueryString();
$("#ip").val(params["ip"]); $("#ip").val(params["ip"]);
...@@ -92,6 +93,12 @@ function loadreplays() { ...@@ -92,6 +93,12 @@ function loadreplays() {
$("#open_button").removeClass("btn-success"); $("#open_button").removeClass("btn-success");
} }
function clearreplays() {
var url=$("#http").val() + "://" + $("#ip").val() + ":" + $("#port").val() + "/api/clearlog?callback=?"+ ($("#password").val() ? "&pass="+$("#password").val() : "");
$.getJSON(url, listreplay);
$("#open_button").removeClass("btn-success");
}
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