-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
500 lines (470 loc) · 16.6 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
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
<!DOCTYPE html>
<html lang="it" dir="ltr">
<head>
<meta charset="utf-8" />
<title>Utility</title>
<meta name="mobile-web-app-capable" content="yes" />
<meta name="theme-color" content="rgb(255, 184, 65)" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0" />
<meta name="description" content="DESCRIZONE" />
<meta http-equiv="keywords" content="" />
<meta name="author" content="Alessandro Frasconi" />
<meta name="copyright" content="alessandrofrasconi.com" />
<!-- style-->
<link rel="stylesheet" href="style.css?v=0.0.0.1" />
<!--codes-->
<script lang="text/javascript" src="utility.js"></script>
<!--Collegamento jQuery -->
<script src="http://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
<!--bootstrap-->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous" />
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-b5kHyXgcpbZJO/tY9Ul7kGkf1S0CWuKcCD38l8YkeH8z8QjE0GmW1gYU5S9FOnJ0"
crossorigin="anonymous"></script>
</head>
<body>
<header></header>
<div id="body">
<div id="leftSide">
<div id="menu">
<table class="table table-light table-striped">
<tr>
<td><a href="#button">button</a></td>
</tr>
<tr>
<td>headNavBar</td>
</tr>
<tr>
<td> <a href="#loginUI">loginUI</a></td>
</tr>
<tr>
<td><a href="#confirm_message">confirm_message</a></td>
</tr>
<tr>
<td>message</td>
</tr>
<tr>
<td>month</td>
</tr>
<tr>
<td>createButton()</td>
</tr>
<tr>
<td>objectToArray()</td>
</tr>
<tr>
<td>convertWeekDay()</td>
</tr>
<tr>
<td>showInParent</td>
</tr>
<tr>
<td>scrollTo</td>
</tr>
<tr>
<td><a href="#getCurrentDate">getCurrentDate</a> </td>
</tr>
<tr>
<td><a href="#getCurrentTime">getCurrentTime</a> </td>
</tr>
<tr>
<td><a href="#addZeroLessTen">addZeroLessTen</a> </td>
</tr>
</table>
</div>
</div>
<div id="rightSide">
<div class="classItem">
<div>
<h3 class="classHeader classHitem"><a name="button"></a>button</h3>
</div>
<div>
<div class="constructorDiv">
<h5 class="typeGroup">Constructor</h5>
new Button ([text of button], [classes style], [onClick function],
[display mode])
<br /><small style="font-size: 10px">
[display mode] = 'block', 'inline', ...</small>
</div>
<div class="constructorDiv">
<h5 class="typeGroup">Methods</h5>
<table class="table table-light table-striped table_methods_description">
<tr>
<td>.getButton()</td>
<td>Return the button</td>
<td>HTML Element</td>
</tr>
<tr>
<td>.getClass()</td>
<td>Return the button's class</td>
<td>string</td>
</tr>
<tr>
<td>.getText()</td>
<td>Return the button's text</td>
<td>string</td>
</tr>
<tr>
<td>.getFunction()</td>
<td>Return the function of the button</td>
<td>string</td>
</tr>
<tr>
<td>.setText([text])</td>
<td>Set the text ([text]) of the button</td>
<td>null</td>
</tr>
<tr>
<td>.setClass([class])</td>
<td>Set the classes ([class]) of the button</td>
<td>null</td>
</tr>
<tr>
<td>.setFunction([function])</td>
<td>Set the function on click ([function]) of the button</td>
<td>null</td>
</tr>
<tr>
<td>.setAttribute([attribute], [value])</td>
<td>Set an attribute in the button</td>
<td>null</td>
</tr>
<tr>
<td>.appendIn([selector])</td>
<td>
Append the button in [selector] (must be a string ex: 'body'
or '.divClass')
</td>
<td>null</td>
</tr>
<tr>
<td>.hide()</td>
<td>Hide the button</td>
<td>null</td>
</tr>
<tr>
<td>.show()</td>
<td>Show the button</td>
<td>null</td>
</tr>
<tr>
<td>.enable()</td>
<td>Set the button enable</td>
<td>null</td>
</tr>
<tr>
<td>.disable()</td>
<td>Show the button disabled</td>
<td>null</td>
</tr>
<tr>
<td>.addClass([class])</td>
<td>Add class [class] in the classList of the button</td>
<td>null</td>
</tr>
<tr>
<td>.deleteClass([class])</td>
<td>Delete class [class] in the classList of the button</td>
<td>null</td>
</tr>
</table>
</div>
</div>
</div>
<div class="classItem">
<div>
<h3 class="classHeader classHitem">headNavBar</h3>
</div>
<div>
<div class="constructorDiv">
<h5 class="typeGroup">Constructor</h5>
new headNavBar ([theme], [brand], [items], [img], [where]*)
<br />
<small style="font-size: 10px">
[theme] = 'light', 'dark'.
</small>
<br />
<small style="font-size: 10px"> [items] = ex: 'bho'.</small>
<br />
<small style="font-size: 10px"> [img] = link of an image.</small>
<br />
<small style="font-size: 10px">
[where] = 'header', '#homepage'.</small>
</div>
<div class="constructorDiv">
<h5 class="typeGroup">Methods</h5>
<table class="table table-light table-striped table_methods_description">
<tr>
<td>No methods</td>
</tr>
</table>
</div>
</div>
</div>
<div class="classItem">
<div>
<a name="loginUI">
<h3 class="classHeader classHitem">loginUI</h3>
</a>
</div>
<div>
<div class="constructorDiv">
<h5 class="typeGroup">Constructor</h5>
new loginUI ([where], [options])
<br /><small style="font-size: 10px">
[where] = 'body', '#loginDiv', ...</small>
<br><small style="font-size: 10px">
[options] = let dati = {<br>
'linkCondizioniUso': '',<br>
'linkCondizioniGenerali': '',<br>
'linkPrivacy': '',<br>
'function_login': '',<br>
'function_register': '',<br>
'show_register': true,<br>
'show_passwordDimenticata': false,<br>
'function_confermaPasswordDimenticata': '',<br>
'show_accediSocial': false,<br>
'extra_input_registrazione': [],<br>
'linkLoginGoogle': '',<br>
'linkLoginFacebook': ''<br>
}</small>
</div>
<div class="constructorDiv">
<h5 class="typeGroup">Methods</h5>
<table class="table table-light table-striped table_methods_description">
<tr>
<td>.setLoginFunction()</td>
<td>Set the login function</td>
<td>null</td>
</tr>
<tr>
<td>.setRegisterFunction()</td>
<td>Set the register function</td>
<td>null</td>
</tr>
<tr>
<td>.sessoRegistrazione()</td>
<td>Show selected sex in registration</td>
<td>string</td>
</tr>
<tr>
<td>.show()</td>
<td>Show the login UI</td>
<td>null</td>
</tr>
<tr>
<td>.hide()</td>
<td>Hide the login UI</td>
<td>null</td>
</tr>
</table>
</div>
<div class="constructorDiv">
<h5 class="typeGroup">Example</h5>
<code>
let dati = {<br>
'linkCondizioniUso': '',<br>
'linkCondizioniGenerali': '',<br>
'linkPrivacy': '',<br>
'function_login': '',<br>
'function_register': '',<br>
'show_register': true,<br>
'show_passwordDimenticata': false,<br>
'function_confermaPasswordDimenticata': '',<br>
'show_accediSocial': false,<br>
'extra_input_registrazione': [],<br>
'linkLoginGoogle': '',<br>
'linkLoginFacebook': ''<br>
}<br><br>
let lg = new loginUI(dati);<br><br>
let username = $('#email')[0].value;<br>
let password = $('#password')[0].value;<br><br>
let nome = $('#nome')[0].value;<br>
let cognome = $('#cognome')[0].value;<br>
let email = $('#email_rg')[0].value;<br>
let sesso = lg.sessoRegistrazione(); //(m, f, a)<br>
let password1 = $('#password_rg')[0].value;<br>
let password1 = $('#password2_rg')[0].value;<br>
</code>
</div>
</div>
</div>
<div class="classItem">
<div>
<h3 class="classHeader classHitem"><a name="confirm_message"></a>confirm_message</h3>
</div>
<div>
<div class="constructorDiv">
<h5 class="typeGroup">Constructor</h5>
let cm = new confirm_message([title], [message], [array of buttons], [where to show]);
<br /><small style="font-size: 10px">
[array of buttons] = array of buttons made by <a href="#createButton">createButton()</a> function<br>
[where to show] = '#message_div', 'body', ...
</small>
</div>
<div class="constructorDiv">
<h5 class="typeGroup">Methods</h5>
<table class="table table-light table-striped table_methods_description">
<tr>
<td>.setTitle([title])</td>
<td>Set title of confirm message</td>
<td>null</td>
</tr>
<tr>
<td>.setMessage([message])</td>
<td>Set message of confirm message</td>
<td>null</td>
</tr>
<tr>
<td>.setButtons([array of buttons])</td>
<td>Set buttons of confirm message</td>
<td>null</td>
</tr>
<tr>
<td>.hide()</td>
<td>Hide confirm message</td>
<td>null</td>
</tr>
<tr>
<td>.show()</td>
<td>Show confirm message</td>
<td>null</td>
</tr>
<tr>
<td>.remove()</td>
<td>Remove confirm message</td>
<td>null</td>
</tr>
</table>
</div>
<div class="constructorDiv">
<h5 class="typeGroup">Example</h5>
<code>
let cm = new confirm_message('Confirm', `Are you sure to continue?`, [createButton('btn-message', 'Continue', 'cm.hide()', ''), createButton('btn-message', 'Send', '', '')], 'body');
cm.show();
</code>
</div>
</div>
</div>
<div class="classItem">
<div>
<h3 class="classHeader classHitem">message</h3>
</div>
<div>
<div class="constructorDiv">
<h5 class="typeGroup">Constructor</h5>
new message ([message], [btnText],[onSubmit],[where])
<br /><small style="font-size: 10px">
[message] = message to show</small>
<br /><small style="font-size: 10px">
[btnText] = text of the button</small>
<br /><small style="font-size: 10px">
[onSubmit] = function on click the button</small>
<br /><small style="font-size: 10px">
[where] = 'body', '#loginDiv', ...</small>
</div>
<div class="constructorDiv">
<h5 class="typeGroup">Methods</h5>
<table class="table table-light table-striped table_methods_description">
<tr>
<td>No methods</td>
</tr>
</table>
</div>
</div>
</div>
<div class="classItem">
<div>
<h3 class="classHeader classHitem">month</h3>
</div>
<div>
<div class="constructorDiv">
<h5 class="typeGroup">Constructor</h5>
new month ([month])
<br /><small style="font-size: 10px">
[month] = '0', 'gennaio'</small>
</div>
<div class="constructorDiv">
<h5 class="typeGroup">Methods</h5>
<table class="table table-light table-striped table_methods_description">
<tr>
<td>.toInt()</td>
<td>
Get number [0-11] of the month from a text ('febbraio' ->
return 1)
</td>
<td>number</td>
</tr>
<tr>
<td>.toFullName()</td>
<td>
Get month in letter from a number (1 -> return 'febbraio')
</td>
<td>string</td>
</tr>
<tr>
<td>.getAllMonths())</td>
<td>Return all month as Array</td>
<td>string array</td>
</tr>
</table>
</div>
</div>
</div>
<div class="functionItem">
<div>
<h3 class="classHeader classHitem">
createButton([classes], [text], [onclick], [id])
</h3>
</div>
</div>
<div class="functionItem">
<div>
<h3 class="classHeader classHitem">objectToArray([array])</h3>
</div>
</div>
<div class="functionItem">
<div>
<h3 class="classHeader classHitem">convertWeekDay([day])</h3>
</div>
</div>
<div class="functionItem">
<div>
<h3 class="classHeader classHitem">
showInParent([where], [what], [clear*])
</h3>
</div>
</div>
<div class="functionItem">
<div>
<h3 class="classHeader classHitem">scrollTo([where])</h3>
</div>
</div>
<div class="functionItem">
<div>
<a name="getCurrentDate">
<h3 class="classHeader classHitem">getCurrentDate([format], [monthInLetter]) </h3>
</a>
</div>
</div>
<div class="functionItem">
<div>
<a name="getCurrentTime">
<h3 class="classHeader classHitem">getCurrentTime() </h3>
</a>
</div>
</div>
<div class="functionItem">
<div>
<a name="addZeroLessTen">
<h3 class="classHeader classHitem">addZeroLessTen([number]) </h3>
</a>
</div>
</div>
</div>
</div>
</body>
</html>