-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
75 lines (65 loc) · 1.64 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MeuWebApp</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" href="bibliotecas/bootstrap/css/bootstrap.css">
<style>
#instalador {
position: absolute;
visibility: hidden;
}
#progresso {
width: 100%;
display: none;
}
#botaoAbrir {
display: none;
}
</style>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-xs-12"><h1>Meu WebApp Instalável</h1></div>
</div>
<div class="row">
<div class="col-xs-1">
<button class="btn btn-primary" id="botaoInstalar">Instalar</button>
<a class="btn btn-primary" id="botaoAbrir" href="app.html">Abrir</a>
</div>
<div class="col-xs-12">
<h2>Progresso da instalação</h2>
<progress id="progresso" value="0" max="100">0</progress>
<ol id="log"></ol>
</div>
</div>
</div>
<!-- <iframe id="instalador" src="instalador.html" frameborder="0"></iframe>
-->
<script src="bibliotecas/js/jquery.js"></script>
<script src="bibliotecas/bootstrap/js/bootstrap.js"></script>
<script>
$("#botaoInstalar").on("click", function(event){
$("#progresso").show();
$("#instalador").remove();
$("#log").empty();
$("<iframe>")
.attr('src', 'instalador.html')
.attr('id', 'instalador')
.attr('frameborder', '0')
.appendTo(document.body);
});
function progresso(valor) {
$("#progresso").attr('value', valor).text(valor);
if(valor == 100) {
$("#botaoAbrir, #botaoInstalar").toggle();
}
}
function log(texto) {
$("<li>").text(texto).appendTo("#log");
}
</script>
</body>
</html>