improved code formatting
This commit is contained in:
parent
91c9a68b1d
commit
19f9e2493b
1 changed files with 68 additions and 61 deletions
|
@ -1,5 +1,4 @@
|
|||
|
||||
|
||||
$(window).unload(function() {
|
||||
$(".progress").show()
|
||||
});
|
||||
|
@ -21,6 +20,7 @@ function reload(){
|
|||
change_url(loc)
|
||||
}
|
||||
}
|
||||
|
||||
function update_view() {
|
||||
if (request_type == "summary")
|
||||
$(".navbar-search").hide();
|
||||
|
@ -28,31 +28,33 @@ function update_view(){
|
|||
$(".navbar-search").show();
|
||||
|
||||
$(".navbar li").removeClass('active');
|
||||
|
||||
$(".proto a#"+proto).parent().addClass('active');
|
||||
$(".hosts a[id='"+hosts+"']").parent().addClass('active');
|
||||
$(".request_type a#"+request_type).parent().addClass('active');
|
||||
|
||||
command = $(".request_type a#"+request_type).text().split("...");
|
||||
$(".request_type a:first").html(command[0] + '<b class="caret"></b>');
|
||||
if (command[1] != undefined ) {
|
||||
|
||||
if (command[1] != undefined)
|
||||
$(".navbar li:last").html(" "+command[1]);
|
||||
} else {
|
||||
else
|
||||
$(".navbar li:last").html("");
|
||||
}
|
||||
|
||||
request_args = $(".request_args").val();
|
||||
$(".request_args").focus();
|
||||
$(".request_args").select();
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$(".history a").click(function (event) {
|
||||
event.preventDefault();
|
||||
change_url(this.href)
|
||||
});
|
||||
|
||||
$(".modal .modal-footer .btn").click(function() {
|
||||
$(".modal").modal('hide');
|
||||
});
|
||||
|
||||
$("a.whois").click(function (event) {
|
||||
event.preventDefault();
|
||||
link = $(this).attr('href');
|
||||
|
@ -68,38 +70,43 @@ $(function(){
|
|||
$(this).parent().addClass("active")
|
||||
});
|
||||
|
||||
|
||||
$(".hosts a").click(function() {
|
||||
hosts = $(this).attr('id');
|
||||
update_view();
|
||||
reload();
|
||||
});
|
||||
|
||||
$(".proto a").click(function() {
|
||||
proto = $(this).attr('id');
|
||||
update_view();
|
||||
reload();
|
||||
});
|
||||
|
||||
$(".request_type ul a").click(function() {
|
||||
if (request_type.split("_")[0] != $(this).attr('id').split("_")[0]) {
|
||||
request_args = ""
|
||||
$(".request_args").val("");
|
||||
}
|
||||
|
||||
request_type = $(this).attr('id');
|
||||
update_view();
|
||||
reload();
|
||||
});
|
||||
|
||||
$("form").submit(function() {
|
||||
update_view();
|
||||
reload();
|
||||
});
|
||||
|
||||
$('.request_args').val(request_args);
|
||||
update_view();
|
||||
|
||||
t = $('.table-summary')
|
||||
if (t) t.dataTable( {
|
||||
|
||||
if (t)
|
||||
t.dataTable({
|
||||
"bPaginate": false,
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue