-
Notifications
You must be signed in to change notification settings - Fork 70
/
index.html
184 lines (178 loc) · 6.66 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
<!DOCTYPE html>
<html ng-app="angularMaterialFormBuilder" ng-strict-di layout="column">
<head>
<meta charset="utf-8" />
<title>Angular Material Form Builder</title>
<meta
name="description"
content="AngularJS dynamic form builder with material design implementation"
/>
<meta
name="keywords"
content="angular, angularjs, google material, material design, form builder, form generator"
/>
<meta name="viewport" content="width=device-width" />
<link rel="icon" href="./favicon.ico" />
<!-- Dependencies -->
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
/>
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<link rel="stylesheet" href="./node_modules/angular/angular-csp.css" />
<link
rel="stylesheet"
href="./node_modules/mdi/css/materialdesignicons.min.css"
/>
<link
rel="stylesheet"
href="./node_modules/angular-material/angular-material.min.css"
/>
<link rel="stylesheet" href="./dist/angular-material-form-builder.css" />
</head>
<body ng-controller="MainController as main" class="main-view">
<!--[if lt IE 10]>
<p class="browsehappy">
You are using an <strong>outdated</strong> browser. Please
<a href="http://browsehappy.com/">upgrade your browser</a> to improve
your experience.
</p>
<![endif]-->
<div class="content" layout="row" layout-padding layout-margin layout-fill>
<div flex layout="column" class="builder">
<h2>Form Builder</h2>
<div layout="column">
<form-item
ng-repeat="item in main.form.items track by $index"
type="{{item.type}}"
item="item"
index="$index"
on-delete="main.delete(item, index)"
on-up="main.up(item, index)"
on-down="main.down(item, index)"
>
</form-item>
</div>
</div>
<div flex layout="column" class="view">
<h2>Preview</h2>
<form name="myForm">
<form-view form="main.form"></form-view>
</form>
</div>
<div flex="20" layout="column" class="json">
<h2>Json</h2>
<pre>{{main.form | json}}</pre>
</div>
</div>
<md-fab-speed-dial
md-open="main.isOpen"
md-direction="up"
class="md-fab-bottom-right md-scale"
>
<md-fab-trigger>
<md-button aria-label="..." class="md-fab md-warn">
<md-icon class="material-icons medium">add</md-icon>
</md-button>
</md-fab-trigger>
<md-fab-actions>
<!-- 9 upload -->
<md-button
aria-label="..."
class="md-fab md-raised md-mini"
ng-click="main.addItem('upload')"
>
<md-icon class="material-icons">upload</md-icon>
<md-tooltip md-direction="left" md-autohide>Upload</md-tooltip>
</md-button>
<!-- 8 agreement -->
<md-button
aria-label="..."
class="md-fab md-raised md-mini"
ng-click="main.addItem('agreement')"
>
<md-icon class="material-icons">pan_tool</md-icon>
<md-tooltip md-direction="left" md-autohide>Agree Box</md-tooltip>
</md-button>
<!-- 7 Label -->
<md-button
aria-label="..."
class="md-fab md-raised md-mini"
ng-click="main.addItem('label')"
>
<md-icon class="material-icons">label</md-icon>
<md-tooltip md-direction="left" md-autohide>Label</md-tooltip>
</md-button>
<!-- 6 Select -->
<md-button
aria-label="..."
class="md-fab md-raised md-mini"
ng-click="main.addItem('chooseFromList')"
>
<md-icon class="material-icons">playlist_add_check</md-icon>
<md-tooltip md-direction="left" md-autohide>Select</md-tooltip>
</md-button>
<!-- 5 MATRIX -->
<md-button
aria-label="..."
class="md-fab md-raised md-mini"
ng-click="main.addItem('matrix')"
>
<md-icon class="material-icons">grid_on</md-icon>
<md-tooltip md-direction="left" md-autohide>Matrix</md-tooltip>
</md-button>
<!-- 4 Text Area -->
<md-button
aria-label="..."
class="md-fab md-raised md-mini"
ng-click="main.addItem('textarea')"
>
<md-icon class="material-icons">keyboard</md-icon>
<md-tooltip md-direction="left" md-autohide>Text-Area</md-tooltip>
</md-button>
<!-- 3 Text Input -->
<md-button
aria-label="..."
class="md-fab md-raised md-mini"
ng-click="main.addItem('input')"
>
<md-icon class="material-icons">text_format</md-icon>
<md-tooltip md-direction="left" md-autohide>Text-Input</md-tooltip>
</md-button>
<!-- 2 Radio -->
<md-button
aria-label="..."
class="md-fab md-raised md-mini"
ng-click="main.addItem('multipleChoices')"
>
<md-icon class="material-icons">radio_button_checked</md-icon>
<md-tooltip md-direction="left" md-autohide>Radio-Buttons</md-tooltip>
</md-button>
<!-- 1 Checkboxes -->
<md-button
aria-label="..."
class="md-fab md-raised md-mini"
ng-click="main.addItem('checkboxes')"
>
<md-icon class="material-icons">check_box</md-icon>
<md-tooltip md-direction="left" md-autohide>Checkboxes</md-tooltip>
</md-button>
</md-fab-actions>
</md-fab-speed-dial>
<a href="https://github.com/vlio20/angular-material-form-builder"
><img
style="position: absolute; top: 0; right: 0; border: 0"
src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67"
alt="Fork me on GitHub"
data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"
/></a>
<!-- Dependencies -->
<script src="./node_modules/angular/angular.js"></script>
<script src="./node_modules/angular-animate/angular-animate.js"></script>
<script src="./node_modules/angular-aria/angular-aria.js"></script>
<script src="./node_modules/angular-material/angular-material.js"></script>
<script src="./node_modules/angular-messages/angular-messages.js"></script>
<script src="./node_modules/angular-sortable-view/src/angular-sortable-view.js"></script>
<script src="./dist/angular-material-form-builder.js"></script>
</body>
</html>