forked from eSlider/vis-ui.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
128 lines (117 loc) · 5.27 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>VIS UI - Demo</title>
<link media="all" type="text/css" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link media="all" type="text/css" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link media="all" type="text/css" rel="stylesheet" href="src/styles/base.css">
<!-- jQuery -->
<script
src="https://code.jquery.com/jquery-1.12.4.min.js"
integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ="
crossorigin="anonymous"></script>
<script
src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"
integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU="
crossorigin="anonymous"></script>
<script src="https://cdn.datatables.net/r/dt/dt-1.10.8/datatables.min.js" type="text/javascript"></script>
<script src="https://cdn.rawgit.com/ROMB/jquery-dialogextend/master/build/jquery.dialogextend.min.js" type="text/javascript"></script>
<link media="all" type="text/css" rel="stylesheet" href="https://raw.githubusercontent.com/jquery/jquery-ui/master/themes/base/resizable.css">
<!-- Underscore -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js" type="text/javascript"></script>
<script src="src/js/utils/fn.formData.js" type="text/javascript"></script>
<script src="src/js/elements/date.selector.js" type="text/javascript"></script>
<script src="src/js/elements/popup.dialog.js" type="text/javascript"></script>
<script src="src/js/jquery.form.generator.js" type="text/javascript"></script>
<script type="application/javascript">
$(function() {
var nameFields = [{
type: "select",
name: 'title',
title: "Title",
options: [
{
label: "Mr.",
value: "mr"
},
{
label: "Ms.",
value: "ms"
}
],
css: {width: "20%"}
}, {
type: "input",
name: 'firstname',
title: "Name",
placeholder: "Please enter name",
mandatory: true,
css: {width: "40%"}
}, {
type: "input",
name: "secondname",
title: "Second name",
placeholder: "Please enter secondname",
css: {width: "40%"}
}, {
type: "date",
name: 'birthday',
title: "Birthday"
}];
// Form test
var $div = $("<div/>");
var agreementElements = [{
type: "checkbox",
name: 'agb',
title: "AGB"
}, {
type: "radio",
name: 'ato',
value: 1,
title: "Yes"
}, {
type: "radio",
name: 'ato',
value: 0,
title: "No"
}];
$div.generateElements({
children: [{
type: 'fieldSet',
children: nameFields
}, {type: "breakLine"}, {
type: "textArea",
name: 'description',
title: "Description",
placeholder: "Something..."
}, {
type: "fieldSet",
children: agreementElements
}]
});
$div.popupDialog({
title: "Demo",
maximizable: true,
width: "500px",
buttons: [{
text: "OK",
click: function(e) {
console.log($div.formData());
}
}]
});
});
</script>
<style type="text/css" media="all">
html, body {
height: 100%;
overflow: hidden;
}
</style>
</head>
<body>
</body>
</html>