-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
150 lines (123 loc) · 5.14 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>UI Kit | Babelscape Bootcamp</title>
<link rel="stylesheet" type="text/css" href="bootcamp-ui-kit.min.css" />
<script src="./vendors/jquery.min.js" type="text/javascript"></script>
<script src="./bootcamp-ui-kit.min.js" type="text/javascript"></script>
</head>
<body>
<div id="modal"></div>
<div style='display: flex; flex-direction: row; justify-content: center;'>
<div id="autocomplete1"></div>
<div id="autocomplete2"></div>
</div>
<div style='display: flex; flex-direction: row; justify-content: center; align-items: center;'>
<div id="toggle1"></div>
<div id="toggle2"></div>
</div>
<div style='display: flex; flex-direction: row; justify-content: center;'>
<div id="dropdown1"></div>
<div id="dropdown2"></div>
</div>
<div id="table1"></div>
<div id="table2"></div>
<div id="button1"></div>
<div id="button2"></div>
<div id="button3"></div>
<div id="button4"></div>
<div id="button5"></div>
<div id="message1"></div>
<div id="message2"></div>
<div id="message3"></div>
<div id="message4"></div>
<div id="logo-dimension"></div>
<div id="logo"></div>
</body>
<script type="text/javascript">
// configuration Logo
var logoConfiguration = {
url : "http://babelscape.com/img/svg/babelscape-logo.svg",
width: 206,
align: "CENTER"
};
// instantiate plugin Logo
var logoPlugin = $("#logo").logo(logoConfiguration);
// call public method Logo.getDimension
var logoDimension = logoPlugin.logo("getDimension");
var messageConfiguration1 =
{
message: "Messaggio di test INFO",
width: 500,
alignText: "CENTER"
}
var messageConfiguration2 =
{
message: "Messaggio di test SUCCESS",
type: "success",
alignText: "CENTER"
}
var messageConfiguration3 =
{
message: "Messaggio di test WARNING",
type: "warning",
alignText: "CENTER"
}
var messageConfiguration4 =
{
message: "Messaggio di test DANGER",
type: "danger",
alignText: "CENTER"
}
$("#message1").message(messageConfiguration1);
$("#message2").message(messageConfiguration2);
$("#message3").message(messageConfiguration3);
$("#message4").message(messageConfiguration4);
$("#button1").button({text: "READY", icon: "<i class='fas fa-play'></i>", onClick: function(event) { console.log(event); alert('click') }})
$("#button2").button({text: "DISABLED", initialState: "disabled"})
$("#button3").button({text: "ERROR", initialState: "error"})
$("#button4").button({text: "PENDING", initialState: "pending"})
$("#button5").button({icon: "<i class='fab fa-accessible-icon'></i>", initialState: "ready", width: 100, height: 50})
$("#button5").button("setState", "Pending");
$("#table1").table({firstRowHeader: true, data: [['Header1', 'Header2', 'Header3', 'HeaderNumerico'], ['mele','buone',3,44], ['arance', 'cattive', 4, 12], ['test' ,'colonna2' , 'a', 5]]})
$("#table2").table({firstRowHeader: false, data: [['noHeader1', 'noHeader2', 'noHeader3', 'noHeaderNumerico'], ['mele','buone',3,44], ['arance', 'cattive', 4, 12], ['test' ,'colonna2' , 'a', 5]]})
var dropdownConfig1 =
{
placeholder: 'SingleDropdown',
selected: ['1'],
data: [
{id: 1, nome:"Javascript", img: "http://myhost.com/javascript.png"},
{id: 2, nome:"Java", img: "http://myhost.com/java-icon.png"},
{id: 3, nome:"C++", img: "http://myhost.com/c-plus-plus.png"}],
width: 150,
dataMapper: function(t){ return { key: t.id.toString(), value: t.nome }; },
labelMapper: function(values){ return values.map((el) => el.value).join(", ") },
}
var dropdownConfig2 =
{
type: 'multi',
selected: ['2'],
placeholder: 'MultiDropdown',
data: [
{id: 1, nome:"Javascript", img: "http://myhost.com/javascript.png"},
{id: 2, nome:"Java", img: "http://myhost.com/java-icon.png"},
{id: 3, nome:"C++", img: "http://myhost.com/c-plus-plus.png"}],
width: 250,
dataMapper: function(t){ return { key: t.id.toString(), value: t.nome }; },
onChange: function(values){ console.log("Lista valori dropdown2: " + values.map((el) => el.value).join(", ")); }
}
$("#dropdown1").dropdown(dropdownConfig1);
$("#dropdown2").dropdown(dropdownConfig2);
$("#dropdown2").dropdown("setValues", ['1','3']);
$("#dropdown1").dropdown("show");
$("#toggle1").toggle({height: 50, value1: { id: 'on', label: 'ON'}, value2: { id: 'off', label: 'OFF' }, dataMapper: function(v){ return { key: v.id, value: v.label }; }});
$("#toggle2").toggle({color2: 'red', value1: { id: 'on', label: 'ON'}, value2: { id: 'off', label: 'OFF' }, dataMapper: function(v){ return { key: v.id, value: v.label }; }});
console.log($("#toggle1").toggle('getValue'))
$("#autocomplete1").autocomplete({width: 200, restURL: new URL('http://localhost:30000/autocomplete?word=')});
$("#autocomplete2").autocomplete({placeholder: 'Autocompletamento..', minTextLength: 5, restURL: new URL('http://localhost:30000/autocomplete?word=')});
$("#modal").modal({body: "Vedi che bello questo Modal", type: 'confirm'});
</script>
</html>