forked from Ciambellaro/wmi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpopup.html
142 lines (133 loc) · 5.22 KB
/
popup.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!DOCTYPE html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<title>PopUp</title>
<script src="popup.js"></script>
<script language="javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
</head>
<style>
.modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}
/* Modal Content/Box */
.modal-content {
background-color: #fefefe;
margin: 15% auto; /* 15% from the top and centered */
padding: 20px;
border: 1px solid #888;
width: 80%; /* Could be more or less, depending on screen size */
}
/* The Close Button */
.close {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: black;
text-decoration: none;
cursor: pointer;
}
</style>
<body>
<button id="myBtn">Open Modal</button>
<!-- The Modal -->
<div id="myModal" class="modal">
<!-- Modal content -->
<div class="modal-content">
<span class="close">×</span>
<form>
<div class="row">
<div class="col">
<input type="text" class="form-control" placeholder="Nome">
</div>
<div class="col">
<input type="text" class="form-control" placeholder="Cognome">
</div>
</div>
</form>
<div class="form-group">
<textarea class="form-control" rows="5" id="comment" placeholder="Descrizione"></textarea>
</div>
<div>
<label>Scopo </label>
<label class="radio-inline"><input type="radio" name="optradio" checked value="what">What</label>
<label class="radio-inline"><input type="radio" name="optradio" value="where">Where</label>
<label class="radio-inline"><input type="radio" name="optradio" value="how">How</label>
</div>
<div class="btn-group">
<select class="form-control">
<option>Categoria</option>
<option value="none">Nessuna</option>
<option value="nat">Natura</option>
<option value="art">Arte</option>
<option value="his">Storia</option>
<option value="flk">Folklore</option>
<option value="mod">Cultura moderna</option>
<option value="rel">Religione</option>
<option value="cui">Cucina e drink</option>
<option value="spo">Sport</option>
<option value="mus">Musica</option>
<option value="mov">Film</option>
<option value="fas">Moda</option>
<option value="shp">Shopping</option>
<option value="tec">Tecnologia</option>
<option value="pop">Cultura pop e gossip</option>
<option value="prs">Esperienze personali</option>
<option value="oth">Altro</option>
</select>
<select class="form-control">
<option>Pubblico</option>
<option value="gen">Generico</option>
<option value="pre">Pre-scuola</option>
<option value="elm">Scuola primaria</option>
<option value="mid">Scuola media</option>
<option value="scl">Specialisti del settore</option>
</select>
<select class="form-control">
<option>Dettaglio</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
</div>
<button class="btn btn-primary" type="submit" class="caricaClip" style="width: 50%" >Carica clip</button>
</div>
</div>
</div>
<script>
var modal = document.getElementById("myModal");
// Get the button that opens the modal
var btn = document.getElementById("myBtn");
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
// When the user clicks on the button, open the modal
btn.onclick = function() {
modal.style.display = "block";
}
// When the user clicks on <span> (x), close the modal
span.onclick = function() {
modal.style.display = "none";
}
// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
</script>
</body>