summaryrefslogtreecommitdiffstats
path: root/src/html/test.html
blob: ae8aecee8c386be9a8642a6e7497dc1dc56a8377 (plain) (blame)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<link href="/css/ui-lightness/jquery-ui-1.8.10.custom.css" rel="stylesheet" type="text/css"/>
<script src="/js/jquery-1.5.1.min.js"></script>
<script src="/js/jquery-ui-1.8.10.custom.min.js"></script>
<script type="text/javascript">
var progress;
function getMAC(){
  var tmp = fbgui.getSysInfo("mac");
  document.formular.fbgui_out_mac.value = tmp;
}
function getIP(){
  var tmp = fbgui.getSysInfo("ip");
  document.formular.fbgui_out_ip.value = tmp;
}
function testjson(){
  var tmp = fbgui.getSysInfo("json");
  var t = eval('(' + tmp + ')');
  alert(t[0].name);
}
function quit(){
  fbgui.quit();
}
function downloadFile(){
  var tmp=document.formular.downloadFilename.value;
  fbgui.setCallbackOnDlQueueFinished("foo();");
  fbgui.startDownload(tmp);
}
function foo(){
  alert("yay");
}
function updateProgress(p, s, u){
  if (p >= 0 && p <= 100)
    $("#progressbar").progressbar({ value: p });
  else
    $("#progressbar").progressbar({ value: 0 });
}
function downloadInfo(name, size){
  alert('Downloading: ' + name + '(Total: ' + size + ')');
}
function notify(msg){
  alert(msg);
}
</script>
</head>

<body>
<p><center>
fbgui test page
</center></p>
<form name="formular">
  <p>
    <input type="button" name="quitFbgui" value="quit"
      onclick="quit()">
    <input type="button" name="testJSon" value="test JSon"
      onclick="testjson()">
  </p>
  <p>
    <input type="button" name="getMACButton" value="eth0 MAC:"
      onclick="getMAC()">
    <input type="text" name="fbgui_out_mac">
  </p>
  <p>
    <input type="button" name="getIPButton" value="eth0 IPv4:"
      onclick="getIP()">
    <input type="text" name="fbgui_out_ip">
  </p>
  <p>
    <input type="button" name="downloadButton" value="Download file"
     onclick="downloadFile()">
    <input type="text" name="downloadFilename">
  </p>

  <p>
    <input type="button" name="qrcAlertButton" value="Fire qrc Alert" onclick="qrcAlert()">
 </p>
  
  <script>
    $(document).ready(function() {
    $("#progressbar").progressbar({ value: 0 });
  });
  </script>
<div id="progressbar" style="height: 15px;"></div>
</body>
</html>