-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmain.js
61 lines (51 loc) · 1.44 KB
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
var hInterval = 0;
$(document).ready(function()
{
$('li[data-content]').bind('click', function(event) {
var url = $(this).attr('data-content');
clearInterval(hInterval);
$('#content').empty();
$.ajax( {
url: url,
dataType: "html",
cache : false,
success: function(data) {
$('#content').html(data);
}
});
//$('li[data-content]').removeClass("menu_selected");
//$(this).addClass("menu_selected");
});
$('#content').empty().load("content/overview.html");
});
function updateStatus(mode)
{
var statusSU = document.getElementById("statusSU");
if(statusSU) {
//$("#statusSU").html($("#example1")[0].smartupdaterStatus.state);
$("#statusSU").html($("#example1").smartupdater("getState"));
} else {
clearInterval(hInterval);
}
}
function updateTimeoutStatus(mode)
{
var statusSU = document.getElementById("statusSU");
if(statusSU) {
//$("#statusSU").html($("#example1")[0].smartupdaterStatus.timeout);
$("#statusSU").html($("#example1").smartupdater("getTimeout"));
} else {
clearInterval(hInterval);
}
}
function toggleApiDetails(obj) {
var re = /closed/;
var state = $(obj).css("background-image");
if (state.search(re) != -1) {
$(obj).css("background-image",'url("img/demo-spindown-open.gif")');
$(obj).children(".apiDetails").css("display","block");
} else {
$(obj).css("background-image",'url("img/demo-spindown-closed.gif")');
$(obj).children(".apiDetails").css("display","none");
}
}