zet-lib 1.3.41 → 1.3.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +15 -15
- package/lib/ErrorWithCode.js +6 -6
- package/lib/Form.js +1020 -1020
- package/lib/Mail.js +68 -68
- package/lib/Modal.js +95 -95
- package/lib/Pool.js +437 -437
- package/lib/UI.js +7 -7
- package/lib/Util.js +1571 -1384
- package/lib/access.js +6 -6
- package/lib/cache.js +3 -3
- package/lib/connection.js +409 -409
- package/lib/debug.js +22 -22
- package/lib/index.js +36 -36
- package/lib/io.js +44 -44
- package/lib/languages/lang_en.js +125 -125
- package/lib/languages/lang_fr.js +125 -125
- package/lib/languages/lang_id.js +126 -126
- package/lib/languages/lang_jp.js +125 -125
- package/lib/moduleLib.js +661 -661
- package/lib/tableForm.js +10 -10
- package/lib/views/generator.ejs +598 -598
- package/lib/views/generator_layout.ejs +224 -224
- package/lib/views/generatorjs.ejs +927 -927
- package/lib/zAppRouter.js +1637 -1637
- package/lib/zCache.js +301 -301
- package/lib/zComponent.js +27 -27
- package/lib/zFn.js +58 -58
- package/lib/zFunction.js +20 -20
- package/lib/zGeneratorRouter.js +1641 -1641
- package/lib/zMenuRouter.js +556 -556
- package/lib/zPage.js +188 -188
- package/lib/zReport.js +982 -982
- package/lib/zRole.js +256 -256
- package/lib/zRoleRouter.js +609 -609
- package/lib/zRoute.js +5787 -5025
- package/lib/zTester.js +93 -93
- package/lib/zapp.js +65 -65
- package/lib/zdataTable.js +330 -330
- package/package.json +56 -56
package/lib/views/generator.ejs
CHANGED
|
@@ -1,599 +1,599 @@
|
|
|
1
|
-
<section class="mt-4">
|
|
2
|
-
<!--Grid row-->
|
|
3
|
-
<div class="row">
|
|
4
|
-
<!--Grid column-->
|
|
5
|
-
<div class="col-md-12 mb-2">
|
|
6
|
-
<!--Generator-->
|
|
7
|
-
<div class="card mb-3 wow fadeIn">
|
|
8
|
-
<div class="card-header bg-success text-white font-weight-bold">Generator</div>
|
|
9
|
-
<div class="card-body">
|
|
10
|
-
<!-- Default form reply -->
|
|
11
|
-
<form id="formgenerator" method="post" action="/crud">
|
|
12
|
-
<div class="form-group">
|
|
13
|
-
<label for="table">Module Name</label>
|
|
14
|
-
<select name="table" id="table" class="form-control">
|
|
15
|
-
<option value="">Please Select</option>
|
|
16
|
-
<% for(var key in rows) { var row=rows[key]; var selected=row.table==table
|
|
17
|
-
? " selected " : "" ; if(row.table !='zrole' ) { %>
|
|
18
|
-
<option value="<%= row.table %>" <%=selected %> ><%= row.table %>
|
|
19
|
-
</option>
|
|
20
|
-
<% }} %>
|
|
21
|
-
</select>
|
|
22
|
-
</div>
|
|
23
|
-
|
|
24
|
-
<% if(table) {%>
|
|
25
|
-
<div class="form-group">
|
|
26
|
-
<label for="route">Title</label>
|
|
27
|
-
<input type="text" class="form-control" id="title" name="title"
|
|
28
|
-
value="<%- datas.name%>" />
|
|
29
|
-
</div>
|
|
30
|
-
<div class="form-group">
|
|
31
|
-
<label for="route">Route</label>
|
|
32
|
-
<input type="text" class="form-control" readonly id="route" name="route"
|
|
33
|
-
value="<%- route%>" />
|
|
34
|
-
</div>
|
|
35
|
-
|
|
36
|
-
<!-- Default checkbox -->
|
|
37
|
-
<div class="form-group">
|
|
38
|
-
<div class="form-check">
|
|
39
|
-
<input class="form-check-input" type="checkbox" value="1" <%- checkDummy %>
|
|
40
|
-
name="json[dummy]" id="dummy" />
|
|
41
|
-
<label class="form-check-label" for="flexCheckDefault">As Dummy</label>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
<div class="form-group">
|
|
46
|
-
<label for="route">Tabs</label>
|
|
47
|
-
<div class="input-group mb-3">
|
|
48
|
-
<input type="text" class="form-control" id="tabname" placeholder="Enter tab name"
|
|
49
|
-
aria-label="Enter tab name" aria-describedby="button-addon2">
|
|
50
|
-
<div class="input-group-append">
|
|
51
|
-
<button class="btn btn-md btn-secondary m-0 px-3" type="button" id="add"><i
|
|
52
|
-
class="fa fa-plus"></i></button>
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
<div class="storetabs">
|
|
57
|
-
<ul id="tabs" class="sortable-list"></ul>
|
|
58
|
-
</div>
|
|
59
|
-
<%} %>
|
|
60
|
-
|
|
61
|
-
<%if(lock==0) {%>
|
|
62
|
-
<div class="text-center mt-4">
|
|
63
|
-
<% if(table) {%>
|
|
64
|
-
<button class="btn btn-danger text-white" id="delete_module"
|
|
65
|
-
type="button"><i class="fa fa-trash"></i> Delete Module</button>
|
|
66
|
-
<%}%>
|
|
67
|
-
<button class="btn btn-success text-white" data-toggle="modal"
|
|
68
|
-
data-target="#add_table" type="button"><i class="fa fa-plus"></i>
|
|
69
|
-
Add Module</button>
|
|
70
|
-
<% if(table) {%>
|
|
71
|
-
<button class="btn btn-info" id="savetab" type="button"><i
|
|
72
|
-
class="fa fa-paper-plane"></i> Save</button>
|
|
73
|
-
<a class="btn btn-warning " href="/<%- table%>" target="__blank"
|
|
74
|
-
type="button"><i class="fa fa-plane"></i> Go To <%- table%></a>
|
|
75
|
-
<%}%>
|
|
76
|
-
</div>
|
|
77
|
-
<%} else {%>
|
|
78
|
-
<button class="btn btn-danger text-white" type="button"><i
|
|
79
|
-
class="fa fa-warning"></i> This table has been locked!!!</button>
|
|
80
|
-
|
|
81
|
-
<%} %>
|
|
82
|
-
</form>
|
|
83
|
-
<!-- Default form reply -->
|
|
84
|
-
</div>
|
|
85
|
-
</div>
|
|
86
|
-
<!--Generator-->
|
|
87
|
-
<div class="card mb-3 wow fadeIn" id="divfields" style="display: none">
|
|
88
|
-
<div class="card-header secondary-color-dark text-white font-weight-bold">Fields</div>
|
|
89
|
-
<div class="card-body">
|
|
90
|
-
<!-- Default form reply -->
|
|
91
|
-
<form id="formfields" method="post" action="/generator/fields">
|
|
92
|
-
<div id="divtablist" class="row"></div>
|
|
93
|
-
<div id="contentfields"></div>
|
|
94
|
-
<% if(lock==0) {%>
|
|
95
|
-
<div class="text-center mt-4">
|
|
96
|
-
<button class="btn btn-danger btn-reset text-white mr-2" type="button"><i
|
|
97
|
-
class="fas fa-drum"></i> Reset </button>
|
|
98
|
-
<button class="btn btn-primary dropdown-toggle mr-2" type="button"
|
|
99
|
-
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i
|
|
100
|
-
class="fas fa-columns"></i> Layout <%- sorting%></button>
|
|
101
|
-
<div class="dropdown-menu">
|
|
102
|
-
<a class="dropdown-item layout21" href="#">2 : 1</a>
|
|
103
|
-
<a class="dropdown-item layout12" href="#">1 : 2</a>
|
|
104
|
-
</div>
|
|
105
|
-
<!-- Basic dropdown -->
|
|
106
|
-
<button class="btn btn-warning m-0 px-3 waves-effect waves-light mr-2"
|
|
107
|
-
data-toggle="modal" data-target="#modal_joins" type="button"><i
|
|
108
|
-
class="fas fa-dice"></i> Join Modules</button>
|
|
109
|
-
<button class="btn m-0 px-3 waves-effect waves-light mr-2" data-toggle="modal"
|
|
110
|
-
data-target="#modal_container" type="button"><i class="fa fa-plus"></i> Add
|
|
111
|
-
Container</button>
|
|
112
|
-
<button class="btn btn-success px-3 text-white mr-2" data-toggle="modal"
|
|
113
|
-
data-target="#modal_add_field" type="button"><i class="fa fa-plus"></i> Add
|
|
114
|
-
Field</button>
|
|
115
|
-
<button class="btn secondary-color-dark px-3 text-white mr-2" id="save"
|
|
116
|
-
type="button"><i class="fa fa-paper-plane"></i> Save & Generate</button>
|
|
117
|
-
</div>
|
|
118
|
-
<%}%>
|
|
119
|
-
</form>
|
|
120
|
-
<!-- Default form reply -->
|
|
121
|
-
</div>
|
|
122
|
-
</div>
|
|
123
|
-
<!--/Generator-->
|
|
124
|
-
|
|
125
|
-
<div class="card mb-4 wow fadeIn card-script">
|
|
126
|
-
<div class="card-header font-weight-bold">
|
|
127
|
-
<span> Join Modules</span>
|
|
128
|
-
</div>
|
|
129
|
-
<div class="card-body">
|
|
130
|
-
<div id="divjoinmodules">
|
|
131
|
-
<form id="formjoin">
|
|
132
|
-
<div class="row" id="joinlist"></div>
|
|
133
|
-
</form>
|
|
134
|
-
</div>
|
|
135
|
-
<hr>
|
|
136
|
-
|
|
137
|
-
</div>
|
|
138
|
-
</div>
|
|
139
|
-
|
|
140
|
-
<!-- Card -->
|
|
141
|
-
<div class="card mb-4 wow fadeIn card-script" style="display: none">
|
|
142
|
-
<div class="card-header font-weight-bold">
|
|
143
|
-
<span> Files Content</span>
|
|
144
|
-
</div>
|
|
145
|
-
<div class="card-body">
|
|
146
|
-
<h5 class="card-title">Files Generator <span class="badge badge-danger"><small>Using EJS template
|
|
147
|
-
engine, Let it blank</small></span></h5>
|
|
148
|
-
|
|
149
|
-
<hr>
|
|
150
|
-
|
|
151
|
-
<ul class="nav nav-tabs" id="tabfiles" role="tablist">
|
|
152
|
-
<li class="nav-item">
|
|
153
|
-
<a class="nav-link active" data-toggle="tab" href="#tabrouter" role="tab"
|
|
154
|
-
aria-controls="router" aria-selected="true">Router</a>
|
|
155
|
-
</li>
|
|
156
|
-
<li class="nav-item">
|
|
157
|
-
<a class="nav-link " data-toggle="tab" href="#tabindex" role="tab" aria-controls="index"
|
|
158
|
-
aria-selected="true">Index</a>
|
|
159
|
-
</li>
|
|
160
|
-
<li class="nav-item">
|
|
161
|
-
<a class="nav-link" data-toggle="tab" href="#tabform" role="tab" aria-controls="form"
|
|
162
|
-
aria-selected="false">Form</a>
|
|
163
|
-
</li>
|
|
164
|
-
<li class="nav-item">
|
|
165
|
-
<a class="nav-link" data-toggle="tab" href="#tabview" role="tab" aria-controls="view"
|
|
166
|
-
aria-selected="false">View</a>
|
|
167
|
-
</li>
|
|
168
|
-
</ul>
|
|
169
|
-
<div class="tab-content" id="mytabfiles">
|
|
170
|
-
<div class="tab-pane fade show active" id="tabrouter" role="tabpanel"
|
|
171
|
-
aria-labelledby="tab-router">
|
|
172
|
-
<br>
|
|
173
|
-
<div class="row">
|
|
174
|
-
<div class="col-md-9">
|
|
175
|
-
<div class="form-group ">
|
|
176
|
-
<label for="javascript">Router</label>
|
|
177
|
-
<div class="ide_editor" id="router"><%- datas.router%></div>
|
|
178
|
-
</div>
|
|
179
|
-
</div>
|
|
180
|
-
|
|
181
|
-
</div>
|
|
182
|
-
</div>
|
|
183
|
-
|
|
184
|
-
<div class="tab-pane fade" id="tabindex" role="tabpanel" aria-labelledby="index-tab">
|
|
185
|
-
<br>
|
|
186
|
-
<div class="row">
|
|
187
|
-
<div class="col-md-6">
|
|
188
|
-
<div class="form-group ">
|
|
189
|
-
<label for="index.ejs">index.ejs</label>
|
|
190
|
-
<div class="ide_editor" id="index_ejs"></div>
|
|
191
|
-
</div>
|
|
192
|
-
</div>
|
|
193
|
-
|
|
194
|
-
<div class="col-md-6">
|
|
195
|
-
<div class="form-group ">
|
|
196
|
-
<label for="indexcss_ejs">indexcss.ejs</label>
|
|
197
|
-
<div class="ide_editor_200" id="indexcss_ejs"><%- datas.indexcss_ejs%></div>
|
|
198
|
-
</div>
|
|
199
|
-
<div class="form-group ">
|
|
200
|
-
<label for="indexjs_ejs">indexjs.ejs</label>
|
|
201
|
-
<div class="ide_editor_200" id="indexjs_ejs"></div>
|
|
202
|
-
</div>
|
|
203
|
-
</div>
|
|
204
|
-
</div>
|
|
205
|
-
|
|
206
|
-
</div>
|
|
207
|
-
|
|
208
|
-
<div class="tab-pane fade" id="tabform" role="tabpanel" aria-labelledby="form-tab">
|
|
209
|
-
<br>
|
|
210
|
-
|
|
211
|
-
<div class="row">
|
|
212
|
-
<div class="col-md-6">
|
|
213
|
-
<div class="form-group ">
|
|
214
|
-
<label for="form.ejs">_form.ejs</label>
|
|
215
|
-
<div class="ide_editor" id="form_ejs"></div>
|
|
216
|
-
</div>
|
|
217
|
-
</div>
|
|
218
|
-
<div class="col-md-6">
|
|
219
|
-
<div class="form-group ">
|
|
220
|
-
<label for="create_ejs">create.ejs</label>
|
|
221
|
-
<div class="ide_editor_200" id="create_ejs"></div>
|
|
222
|
-
</div>
|
|
223
|
-
<div class="form-group ">
|
|
224
|
-
<label for="createjs_ejs">createjs.ejs</label>
|
|
225
|
-
<div class="ide_editor_200" id="createjs_ejs"></div>
|
|
226
|
-
</div>
|
|
227
|
-
</div>
|
|
228
|
-
</div>
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
<div class="row">
|
|
232
|
-
<div class="col-md-6">
|
|
233
|
-
<div class="form-group ">
|
|
234
|
-
<label for="update_ejs">update.ejs</label>
|
|
235
|
-
<div class="ide_editor_200" id="update_ejs"></div>
|
|
236
|
-
</div>
|
|
237
|
-
<div class="form-group ">
|
|
238
|
-
<label for="updatejs_ejs">updatejs.ejs</label>
|
|
239
|
-
<div class="ide_editor_200" id="updatejs_ejs"></div>
|
|
240
|
-
</div>
|
|
241
|
-
</div>
|
|
242
|
-
|
|
243
|
-
<div class="col-md-6">
|
|
244
|
-
<div class="form-group ">
|
|
245
|
-
<label for="import_ejs">import.ejs</label>
|
|
246
|
-
<div class="ide_editor_200" id="import_ejs"></div>
|
|
247
|
-
</div>
|
|
248
|
-
<div class="form-group ">
|
|
249
|
-
<label for="importjs_ejs">importjs.ejs</label>
|
|
250
|
-
<div class="ide_editor_200" id="importjs_ejs"></div>
|
|
251
|
-
</div>
|
|
252
|
-
</div>
|
|
253
|
-
</div>
|
|
254
|
-
|
|
255
|
-
</div>
|
|
256
|
-
<div class="tab-pane fade" id="tabview" role="tabpanel" aria-labelledby="view-tab">
|
|
257
|
-
<br>
|
|
258
|
-
<div class="row">
|
|
259
|
-
<div class="col-md-9">
|
|
260
|
-
<div class="form-group ">
|
|
261
|
-
<label for="view_ejs">view.ejs</label>
|
|
262
|
-
<div class="ide_editor" id="view_ejs"></div>
|
|
263
|
-
</div>
|
|
264
|
-
</div>
|
|
265
|
-
<div class="col-md-6"></div>
|
|
266
|
-
</div>
|
|
267
|
-
</div>
|
|
268
|
-
</div>
|
|
269
|
-
</div>
|
|
270
|
-
</div>
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
<!--Card-->
|
|
274
|
-
<div class="card mb-4 wow fadeIn card-script" style="display: none">
|
|
275
|
-
<div class="card-header font-weight-bold">
|
|
276
|
-
<span>Additional Settings</span>
|
|
277
|
-
</div>
|
|
278
|
-
|
|
279
|
-
<div class="card-body">
|
|
280
|
-
<hr>
|
|
281
|
-
|
|
282
|
-
<div class="col-md-12">
|
|
283
|
-
<% if(zForms.obj.hasOwnProperty("is_approval")) {%>
|
|
284
|
-
<label for="approval">Approval Systems</label>
|
|
285
|
-
<!-- Default checked -->
|
|
286
|
-
<%- zForms.build["is_approval"] %>
|
|
287
|
-
<div class="divzapprovals" <%- approvalDatas.is_approval ? '' : 'style="display: none"'
|
|
288
|
-
%> >
|
|
289
|
-
<%- zForms.build["template"] %>
|
|
290
|
-
<div class="row">
|
|
291
|
-
<div class="col-md-6">
|
|
292
|
-
<div class="form-group divTitle mb-3">
|
|
293
|
-
<label>Title</label>
|
|
294
|
-
<input type="text" class="form-control" id="approval_title"
|
|
295
|
-
name="approval_title" value="<%- approvalDatas.title %>">
|
|
296
|
-
</div>
|
|
297
|
-
</div>
|
|
298
|
-
<div class="col-md-6">
|
|
299
|
-
<%- zForms.build["type"] %>
|
|
300
|
-
</div>
|
|
301
|
-
</div>
|
|
302
|
-
|
|
303
|
-
<div class="row">
|
|
304
|
-
<div class="col-md-12">
|
|
305
|
-
<%- zForms.build["approvers"] %>
|
|
306
|
-
<%- zForms.build["knowings"] %>
|
|
307
|
-
</div>
|
|
308
|
-
</div>
|
|
309
|
-
</div>
|
|
310
|
-
<%}%>
|
|
311
|
-
</div>
|
|
312
|
-
</div>
|
|
313
|
-
</div>
|
|
314
|
-
</div>
|
|
315
|
-
<!--/.Card-->
|
|
316
|
-
</div>
|
|
317
|
-
</div>
|
|
318
|
-
<!--Grid row-->
|
|
319
|
-
</section>
|
|
320
|
-
<!--Section: Post-->
|
|
321
|
-
|
|
322
|
-
<!-- Modal -->
|
|
323
|
-
<div class="modal fade" id="add_table" tabindex="-1" aria-labelledby="add_table" aria-hidden="true">
|
|
324
|
-
<div class="modal-dialog">
|
|
325
|
-
<div class="modal-content">
|
|
326
|
-
<div class="modal-header">
|
|
327
|
-
<h5 class="modal-title" id="exampleModalLabel">Add Table</h5>
|
|
328
|
-
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fa fa-times"></i>
|
|
329
|
-
</button>
|
|
330
|
-
</div>
|
|
331
|
-
<div class="modal-body">
|
|
332
|
-
<form id="modal-form" method="post" action="/generator">
|
|
333
|
-
<div class="form-group">
|
|
334
|
-
<label for="table">Module Name</label>
|
|
335
|
-
<input type="text" class="form-control" id="modal-table" name="table" />
|
|
336
|
-
</div>
|
|
337
|
-
|
|
338
|
-
<div class="form-group">
|
|
339
|
-
<label for="route">Route</label>
|
|
340
|
-
<input type="text" class="form-control" id="modal-route" name="route" />
|
|
341
|
-
</div>
|
|
342
|
-
</form>
|
|
343
|
-
</div>
|
|
344
|
-
<div class="modal-footer">
|
|
345
|
-
<button type="button" class="btn btn-secondary" data-dismiss="modal"><i class="fa fa-times"></i>
|
|
346
|
-
Close</button>
|
|
347
|
-
<button type="button" id="modal-save" class="btn btn-primary"><i class="fa fa-paper-plane"></i>
|
|
348
|
-
Save</button>
|
|
349
|
-
</div>
|
|
350
|
-
</div>
|
|
351
|
-
</div>
|
|
352
|
-
</div>
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
<div class="modal fade" id="modal_add_field" tabindex="-1" aria-labelledby="add_table" aria-hidden="true">
|
|
356
|
-
<div class="modal-dialog">
|
|
357
|
-
<div class="modal-content">
|
|
358
|
-
<div class="modal-header">
|
|
359
|
-
<h5 class="modal-title">Add Field</h5>
|
|
360
|
-
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fa fa-times"></i>
|
|
361
|
-
</button>
|
|
362
|
-
</div>
|
|
363
|
-
<div class="modal-body">
|
|
364
|
-
|
|
365
|
-
<form id="modal-form" method="post" action="/<%- routeName%>">
|
|
366
|
-
<div class="form-group">
|
|
367
|
-
<label for="table">Name</label>
|
|
368
|
-
<div class="input-group">
|
|
369
|
-
<div class="input-group-prepend">
|
|
370
|
-
<select id="modal_position" class="form-control">
|
|
371
|
-
<option value="LEFT">Left</option>
|
|
372
|
-
<option value="RIGHT">Right</option>
|
|
373
|
-
<option value="ONE_COLUMN">One Column</option>
|
|
374
|
-
</select>
|
|
375
|
-
</div>
|
|
376
|
-
<input type="text" class="form-control" id="modal_name" placeholder="Field Name"
|
|
377
|
-
name="name" />
|
|
378
|
-
</div>
|
|
379
|
-
</div>
|
|
380
|
-
|
|
381
|
-
<div class="form-group">
|
|
382
|
-
<label for="route">Type</label>
|
|
383
|
-
<select class="form-control" id="modal_type">
|
|
384
|
-
<% for(var key in selects){%>
|
|
385
|
-
<option value="<%- key%>"><%- selects[key]%></option>
|
|
386
|
-
<%}%>
|
|
387
|
-
</select>
|
|
388
|
-
</div>
|
|
389
|
-
|
|
390
|
-
<div class="row divrelation" style="display:none">
|
|
391
|
-
<div class="col-md-6">
|
|
392
|
-
<div class="form-group">
|
|
393
|
-
<label for="route">Module Name</label>
|
|
394
|
-
<select class="form-control" id="relationtable"></select>
|
|
395
|
-
</div>
|
|
396
|
-
</div>
|
|
397
|
-
|
|
398
|
-
<div class="col-md-6 divrelationfield">
|
|
399
|
-
<div class="form-group ">
|
|
400
|
-
<label for="route">Label</label>
|
|
401
|
-
<select class="form-control" id="relationfield"></select>
|
|
402
|
-
</div>
|
|
403
|
-
</div>
|
|
404
|
-
|
|
405
|
-
<div class="col-md-12 divconcat">
|
|
406
|
-
<div class="form-group ">
|
|
407
|
-
<label for="route">Concat</label>
|
|
408
|
-
<input type="text" class="form-control" id="relationconcat"
|
|
409
|
-
placeholder='CONCAT(fullname, " (email) : ", email)'>
|
|
410
|
-
</div>
|
|
411
|
-
</div>
|
|
412
|
-
|
|
413
|
-
</div>
|
|
414
|
-
</form>
|
|
415
|
-
|
|
416
|
-
</div>
|
|
417
|
-
<div class="modal-footer">
|
|
418
|
-
<button type="button" class="btn btn-secondary" data-dismiss="modal"><i class="fa fa-times"></i>
|
|
419
|
-
Close</button>
|
|
420
|
-
<button type="button" id="modal-add" class="btn btn-primary"><i class="fa fa-plus"></i> Add</button>
|
|
421
|
-
</div>
|
|
422
|
-
</div>
|
|
423
|
-
</div>
|
|
424
|
-
</div>
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
<div class="modal fade" id="modal_setting" tabindex="-1" aria-labelledby="modal_setting" aria-hidden="true">
|
|
428
|
-
<div class="modal-dialog">
|
|
429
|
-
<div class="modal-content">
|
|
430
|
-
<div class="modal-header">
|
|
431
|
-
<h5 class="modal-title" id="modal_setting_label">Setting</h5>
|
|
432
|
-
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fa fa-times"></i>
|
|
433
|
-
</button>
|
|
434
|
-
</div>
|
|
435
|
-
<div class="modal-body">
|
|
436
|
-
<form id="modal-setting-form" method="post" action="/<%- routeName%>/save_setting">
|
|
437
|
-
<div id="body_content"></div>
|
|
438
|
-
</form>
|
|
439
|
-
</div>
|
|
440
|
-
<div class="modal-footer">
|
|
441
|
-
<button class="btn btn-danger text-white" id="delete_field" type="button"><i class="fa fa-trash"></i>
|
|
442
|
-
Delete</button>
|
|
443
|
-
<button type="button" class="btn btn-secondary" data-dismiss="modal"><i class="fa fa-times"></i>
|
|
444
|
-
Close</button>
|
|
445
|
-
<button type="button" id="modal-setting-save" class="btn btn-primary"><i class="fa fa-paper-plane"></i>
|
|
446
|
-
Save</button>
|
|
447
|
-
</div>
|
|
448
|
-
</div>
|
|
449
|
-
</div>
|
|
450
|
-
</div>
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
<div class="modal fade" id="modal_tab" tabindex="-1" aria-labelledby="modal_setting" aria-hidden="true">
|
|
454
|
-
<div class="modal-dialog">
|
|
455
|
-
<div class="modal-content">
|
|
456
|
-
<div class="modal-header">
|
|
457
|
-
<h5 class="modal-title" id="modal_setting_label">Tab</h5>
|
|
458
|
-
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fa fa-times"></i>
|
|
459
|
-
</button>
|
|
460
|
-
</div>
|
|
461
|
-
<div class="modal-body">
|
|
462
|
-
<form>
|
|
463
|
-
<input type="text" id="edittab" class="form-control">
|
|
464
|
-
</form>
|
|
465
|
-
</div>
|
|
466
|
-
<div class="modal-footer">
|
|
467
|
-
<button type="button" class="btn btn-secondary" data-dismiss="modal"><i class="fa fa-times"></i>
|
|
468
|
-
Close</button>
|
|
469
|
-
<button type="button" id="modal-tab-save" class="btn btn-primary"><i class="fa fa-paper-plane"></i>
|
|
470
|
-
Save</button>
|
|
471
|
-
</div>
|
|
472
|
-
</div>
|
|
473
|
-
</div>
|
|
474
|
-
</div>
|
|
475
|
-
|
|
476
|
-
<div class="modal fade" id="modal-file" tabindex="-1" aria-labelledby="add_table" aria-hidden="true">
|
|
477
|
-
<div class="modal-dialog">
|
|
478
|
-
<div class="modal-content">
|
|
479
|
-
<div class="modal-header">
|
|
480
|
-
<h5 class="modal-title">Import zfield File</h5>
|
|
481
|
-
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fa fa-times"></i>
|
|
482
|
-
</button>
|
|
483
|
-
</div>
|
|
484
|
-
<div class="modal-body">
|
|
485
|
-
<form id="modal-form-file" method="post" action="/zgenerator/import">
|
|
486
|
-
<input type="hidden" name="_csrf" value="<%= csrfToken %>">
|
|
487
|
-
<div class="form-group">
|
|
488
|
-
<label for="table">File</label>
|
|
489
|
-
<input type="file" class="form-control" id="import-file" name="import-file" required />
|
|
490
|
-
</div>
|
|
491
|
-
</form>
|
|
492
|
-
</div>
|
|
493
|
-
<div class="modal-footer">
|
|
494
|
-
<button type="button" class="btn btn-secondary" data-dismiss="modal"><i class="fa fa-times"></i>
|
|
495
|
-
Close</button>
|
|
496
|
-
<button type="submit" id="submit-import" class="btn btn-primary"><i class="fa fa-paper-plane"></i>
|
|
497
|
-
Submit</button>
|
|
498
|
-
</div>
|
|
499
|
-
</div>
|
|
500
|
-
</div>
|
|
501
|
-
</div>
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
<div class="modal fade" id="modal_container" tabindex="-1" aria-labelledby="add_container" aria-hidden="true">
|
|
505
|
-
<div class="modal-dialog">
|
|
506
|
-
<div class="modal-content">
|
|
507
|
-
<div class="modal-header">
|
|
508
|
-
<h5 class="modal-title">Add Container</h5>
|
|
509
|
-
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fa fa-times"></i>
|
|
510
|
-
</button>
|
|
511
|
-
</div>
|
|
512
|
-
<div class="modal-body">
|
|
513
|
-
<form>
|
|
514
|
-
<div class="form-group">
|
|
515
|
-
<label for="route">Column</label>
|
|
516
|
-
<select class="form-control form-select" id="column-count">
|
|
517
|
-
<option value="1">1</option>
|
|
518
|
-
<option value="2" selected>2</option>
|
|
519
|
-
<option value="3">3</option>
|
|
520
|
-
<option value="4">4</option>
|
|
521
|
-
<option value="6">6</option>
|
|
522
|
-
</select>
|
|
523
|
-
</div>
|
|
524
|
-
</form>
|
|
525
|
-
</div>
|
|
526
|
-
<div class="modal-footer">
|
|
527
|
-
<button type="button" class="btn btn-secondary btn-modal-container-close" data-dismiss="modal"><i
|
|
528
|
-
class="fa fa-times"></i> Close</button>
|
|
529
|
-
<button type="button" id="modal-container-save" class="btn btn-primary"><i
|
|
530
|
-
class="fa fa-plus-circle"></i> Add</button>
|
|
531
|
-
</div>
|
|
532
|
-
</div>
|
|
533
|
-
</div>
|
|
534
|
-
</div>
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
<div class="modal fade" id="modal_joins" tabindex="-1" aria-labelledby="add_container" aria-hidden="true">
|
|
538
|
-
<div class="modal-dialog">
|
|
539
|
-
<div class="modal-content">
|
|
540
|
-
<div class="modal-header">
|
|
541
|
-
<h5 class="modal-title">Join Module</h5>
|
|
542
|
-
<button type="button" class="close" id="closejoin" data-dismiss="modal" aria-label="Close"><i
|
|
543
|
-
class="fa fa-times"></i>
|
|
544
|
-
</button>
|
|
545
|
-
</div>
|
|
546
|
-
<div class="modal-body">
|
|
547
|
-
<form>
|
|
548
|
-
<div class="form-group">
|
|
549
|
-
<label for="route">Module</label>
|
|
550
|
-
<select class="form-control form-select" id="select_module_joins">
|
|
551
|
-
<option value="">Please Select</option>
|
|
552
|
-
<% for(var key in rows) { var row=rows[key]; var selected=row.table==table ? " selected "
|
|
553
|
-
: "" ; if(row.table !='zrole' ) { %>
|
|
554
|
-
<option value="<%= row.table %>" <%=selected %> ><%= row.table %>
|
|
555
|
-
</option>
|
|
556
|
-
<% }} %>
|
|
557
|
-
</select>
|
|
558
|
-
</div>
|
|
559
|
-
</form>
|
|
560
|
-
</div>
|
|
561
|
-
<div class="modal-footer">
|
|
562
|
-
<button type="button" class="btn btn-secondary btn-modal-container-close" data-dismiss="modal"><i
|
|
563
|
-
class="fa fa-times"></i> Close</button>
|
|
564
|
-
<button type="button" id="modal-joins-save" class="btn btn-primary"><i class="fa fa-plus-circle"></i>
|
|
565
|
-
Add</button>
|
|
566
|
-
</div>
|
|
567
|
-
</div>
|
|
568
|
-
</div>
|
|
569
|
-
</div>
|
|
570
|
-
|
|
571
|
-
<!-- Modal insert data into container --->
|
|
572
|
-
<div class="modal fade" id="modal_container_into" tabindex="-1" aria-labelledby="modal_container_into"
|
|
573
|
-
aria-hidden="true">
|
|
574
|
-
<div class="modal-dialog">
|
|
575
|
-
<div class="modal-content">
|
|
576
|
-
<div class="modal-header">
|
|
577
|
-
<h5 class="modal-title" id="exampleModalLabel">Move <span class="badge badge-danger">fields </span> into
|
|
578
|
-
container</h5>
|
|
579
|
-
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fa fa-times"></i>
|
|
580
|
-
</button>
|
|
581
|
-
</div>
|
|
582
|
-
<div class="modal-body">
|
|
583
|
-
<form>
|
|
584
|
-
<div class="form-group">
|
|
585
|
-
<label for="route">Into Container</label>
|
|
586
|
-
<select class="form-control form-select" id="container-select">
|
|
587
|
-
</select>
|
|
588
|
-
</div>
|
|
589
|
-
</form>
|
|
590
|
-
</div>
|
|
591
|
-
<div class="modal-footer">
|
|
592
|
-
<button type="button" class="btn btn-secondary btncontainer-close" data-dismiss="modal"><i
|
|
593
|
-
class="fa fa-times"></i> Close</button>
|
|
594
|
-
<button type="button" id="moveintocontainer" class="btn btn-primary"><i class="fa fa-plus-circle"></i>
|
|
595
|
-
Move</button>
|
|
596
|
-
</div>
|
|
597
|
-
</div>
|
|
598
|
-
</div>
|
|
1
|
+
<section class="mt-4">
|
|
2
|
+
<!--Grid row-->
|
|
3
|
+
<div class="row">
|
|
4
|
+
<!--Grid column-->
|
|
5
|
+
<div class="col-md-12 mb-2">
|
|
6
|
+
<!--Generator-->
|
|
7
|
+
<div class="card mb-3 wow fadeIn">
|
|
8
|
+
<div class="card-header bg-success text-white font-weight-bold">Generator</div>
|
|
9
|
+
<div class="card-body">
|
|
10
|
+
<!-- Default form reply -->
|
|
11
|
+
<form id="formgenerator" method="post" action="/crud">
|
|
12
|
+
<div class="form-group">
|
|
13
|
+
<label for="table">Module Name</label>
|
|
14
|
+
<select name="table" id="table" class="form-control">
|
|
15
|
+
<option value="">Please Select</option>
|
|
16
|
+
<% for(var key in rows) { var row=rows[key]; var selected=row.table==table
|
|
17
|
+
? " selected " : "" ; if(row.table !='zrole' ) { %>
|
|
18
|
+
<option value="<%= row.table %>" <%=selected %> ><%= row.table %>
|
|
19
|
+
</option>
|
|
20
|
+
<% }} %>
|
|
21
|
+
</select>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<% if(table) {%>
|
|
25
|
+
<div class="form-group">
|
|
26
|
+
<label for="route">Title</label>
|
|
27
|
+
<input type="text" class="form-control" id="title" name="title"
|
|
28
|
+
value="<%- datas.name%>" />
|
|
29
|
+
</div>
|
|
30
|
+
<div class="form-group">
|
|
31
|
+
<label for="route">Route</label>
|
|
32
|
+
<input type="text" class="form-control" readonly id="route" name="route"
|
|
33
|
+
value="<%- route%>" />
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<!-- Default checkbox -->
|
|
37
|
+
<div class="form-group">
|
|
38
|
+
<div class="form-check">
|
|
39
|
+
<input class="form-check-input" type="checkbox" value="1" <%- checkDummy %>
|
|
40
|
+
name="json[dummy]" id="dummy" />
|
|
41
|
+
<label class="form-check-label" for="flexCheckDefault">As Dummy</label>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<div class="form-group">
|
|
46
|
+
<label for="route">Tabs</label>
|
|
47
|
+
<div class="input-group mb-3">
|
|
48
|
+
<input type="text" class="form-control" id="tabname" placeholder="Enter tab name"
|
|
49
|
+
aria-label="Enter tab name" aria-describedby="button-addon2">
|
|
50
|
+
<div class="input-group-append">
|
|
51
|
+
<button class="btn btn-md btn-secondary m-0 px-3" type="button" id="add"><i
|
|
52
|
+
class="fa fa-plus"></i></button>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
<div class="storetabs">
|
|
57
|
+
<ul id="tabs" class="sortable-list"></ul>
|
|
58
|
+
</div>
|
|
59
|
+
<%} %>
|
|
60
|
+
|
|
61
|
+
<%if(lock==0) {%>
|
|
62
|
+
<div class="text-center mt-4">
|
|
63
|
+
<% if(table) {%>
|
|
64
|
+
<button class="btn btn-danger text-white" id="delete_module"
|
|
65
|
+
type="button"><i class="fa fa-trash"></i> Delete Module</button>
|
|
66
|
+
<%}%>
|
|
67
|
+
<button class="btn btn-success text-white" data-toggle="modal"
|
|
68
|
+
data-target="#add_table" type="button"><i class="fa fa-plus"></i>
|
|
69
|
+
Add Module</button>
|
|
70
|
+
<% if(table) {%>
|
|
71
|
+
<button class="btn btn-info" id="savetab" type="button"><i
|
|
72
|
+
class="fa fa-paper-plane"></i> Save</button>
|
|
73
|
+
<a class="btn btn-warning " href="/<%- table%>" target="__blank"
|
|
74
|
+
type="button"><i class="fa fa-plane"></i> Go To <%- table%></a>
|
|
75
|
+
<%}%>
|
|
76
|
+
</div>
|
|
77
|
+
<%} else {%>
|
|
78
|
+
<button class="btn btn-danger text-white" type="button"><i
|
|
79
|
+
class="fa fa-warning"></i> This table has been locked!!!</button>
|
|
80
|
+
|
|
81
|
+
<%} %>
|
|
82
|
+
</form>
|
|
83
|
+
<!-- Default form reply -->
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
<!--Generator-->
|
|
87
|
+
<div class="card mb-3 wow fadeIn" id="divfields" style="display: none">
|
|
88
|
+
<div class="card-header secondary-color-dark text-white font-weight-bold">Fields</div>
|
|
89
|
+
<div class="card-body">
|
|
90
|
+
<!-- Default form reply -->
|
|
91
|
+
<form id="formfields" method="post" action="/generator/fields">
|
|
92
|
+
<div id="divtablist" class="row"></div>
|
|
93
|
+
<div id="contentfields"></div>
|
|
94
|
+
<% if(lock==0) {%>
|
|
95
|
+
<div class="text-center mt-4">
|
|
96
|
+
<button class="btn btn-danger btn-reset text-white mr-2" type="button"><i
|
|
97
|
+
class="fas fa-drum"></i> Reset </button>
|
|
98
|
+
<button class="btn btn-primary dropdown-toggle mr-2" type="button"
|
|
99
|
+
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i
|
|
100
|
+
class="fas fa-columns"></i> Layout <%- sorting%></button>
|
|
101
|
+
<div class="dropdown-menu">
|
|
102
|
+
<a class="dropdown-item layout21" href="#">2 : 1</a>
|
|
103
|
+
<a class="dropdown-item layout12" href="#">1 : 2</a>
|
|
104
|
+
</div>
|
|
105
|
+
<!-- Basic dropdown -->
|
|
106
|
+
<button class="btn btn-warning m-0 px-3 waves-effect waves-light mr-2"
|
|
107
|
+
data-toggle="modal" data-target="#modal_joins" type="button"><i
|
|
108
|
+
class="fas fa-dice"></i> Join Modules</button>
|
|
109
|
+
<button class="btn m-0 px-3 waves-effect waves-light mr-2" data-toggle="modal"
|
|
110
|
+
data-target="#modal_container" type="button"><i class="fa fa-plus"></i> Add
|
|
111
|
+
Container</button>
|
|
112
|
+
<button class="btn btn-success px-3 text-white mr-2" data-toggle="modal"
|
|
113
|
+
data-target="#modal_add_field" type="button"><i class="fa fa-plus"></i> Add
|
|
114
|
+
Field</button>
|
|
115
|
+
<button class="btn secondary-color-dark px-3 text-white mr-2" id="save"
|
|
116
|
+
type="button"><i class="fa fa-paper-plane"></i> Save & Generate</button>
|
|
117
|
+
</div>
|
|
118
|
+
<%}%>
|
|
119
|
+
</form>
|
|
120
|
+
<!-- Default form reply -->
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
<!--/Generator-->
|
|
124
|
+
|
|
125
|
+
<div class="card mb-4 wow fadeIn card-script">
|
|
126
|
+
<div class="card-header font-weight-bold">
|
|
127
|
+
<span> Join Modules</span>
|
|
128
|
+
</div>
|
|
129
|
+
<div class="card-body">
|
|
130
|
+
<div id="divjoinmodules">
|
|
131
|
+
<form id="formjoin">
|
|
132
|
+
<div class="row" id="joinlist"></div>
|
|
133
|
+
</form>
|
|
134
|
+
</div>
|
|
135
|
+
<hr>
|
|
136
|
+
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
|
|
140
|
+
<!-- Card -->
|
|
141
|
+
<div class="card mb-4 wow fadeIn card-script" style="display: none">
|
|
142
|
+
<div class="card-header font-weight-bold">
|
|
143
|
+
<span> Files Content</span>
|
|
144
|
+
</div>
|
|
145
|
+
<div class="card-body">
|
|
146
|
+
<h5 class="card-title">Files Generator <span class="badge badge-danger"><small>Using EJS template
|
|
147
|
+
engine, Let it blank</small></span></h5>
|
|
148
|
+
|
|
149
|
+
<hr>
|
|
150
|
+
|
|
151
|
+
<ul class="nav nav-tabs" id="tabfiles" role="tablist">
|
|
152
|
+
<li class="nav-item">
|
|
153
|
+
<a class="nav-link active" data-toggle="tab" href="#tabrouter" role="tab"
|
|
154
|
+
aria-controls="router" aria-selected="true">Router</a>
|
|
155
|
+
</li>
|
|
156
|
+
<li class="nav-item">
|
|
157
|
+
<a class="nav-link " data-toggle="tab" href="#tabindex" role="tab" aria-controls="index"
|
|
158
|
+
aria-selected="true">Index</a>
|
|
159
|
+
</li>
|
|
160
|
+
<li class="nav-item">
|
|
161
|
+
<a class="nav-link" data-toggle="tab" href="#tabform" role="tab" aria-controls="form"
|
|
162
|
+
aria-selected="false">Form</a>
|
|
163
|
+
</li>
|
|
164
|
+
<li class="nav-item">
|
|
165
|
+
<a class="nav-link" data-toggle="tab" href="#tabview" role="tab" aria-controls="view"
|
|
166
|
+
aria-selected="false">View</a>
|
|
167
|
+
</li>
|
|
168
|
+
</ul>
|
|
169
|
+
<div class="tab-content" id="mytabfiles">
|
|
170
|
+
<div class="tab-pane fade show active" id="tabrouter" role="tabpanel"
|
|
171
|
+
aria-labelledby="tab-router">
|
|
172
|
+
<br>
|
|
173
|
+
<div class="row">
|
|
174
|
+
<div class="col-md-9">
|
|
175
|
+
<div class="form-group ">
|
|
176
|
+
<label for="javascript">Router</label>
|
|
177
|
+
<div class="ide_editor" id="router"><%- datas.router%></div>
|
|
178
|
+
</div>
|
|
179
|
+
</div>
|
|
180
|
+
|
|
181
|
+
</div>
|
|
182
|
+
</div>
|
|
183
|
+
|
|
184
|
+
<div class="tab-pane fade" id="tabindex" role="tabpanel" aria-labelledby="index-tab">
|
|
185
|
+
<br>
|
|
186
|
+
<div class="row">
|
|
187
|
+
<div class="col-md-6">
|
|
188
|
+
<div class="form-group ">
|
|
189
|
+
<label for="index.ejs">index.ejs</label>
|
|
190
|
+
<div class="ide_editor" id="index_ejs"></div>
|
|
191
|
+
</div>
|
|
192
|
+
</div>
|
|
193
|
+
|
|
194
|
+
<div class="col-md-6">
|
|
195
|
+
<div class="form-group ">
|
|
196
|
+
<label for="indexcss_ejs">indexcss.ejs</label>
|
|
197
|
+
<div class="ide_editor_200" id="indexcss_ejs"><%- datas.indexcss_ejs%></div>
|
|
198
|
+
</div>
|
|
199
|
+
<div class="form-group ">
|
|
200
|
+
<label for="indexjs_ejs">indexjs.ejs</label>
|
|
201
|
+
<div class="ide_editor_200" id="indexjs_ejs"></div>
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
|
|
206
|
+
</div>
|
|
207
|
+
|
|
208
|
+
<div class="tab-pane fade" id="tabform" role="tabpanel" aria-labelledby="form-tab">
|
|
209
|
+
<br>
|
|
210
|
+
|
|
211
|
+
<div class="row">
|
|
212
|
+
<div class="col-md-6">
|
|
213
|
+
<div class="form-group ">
|
|
214
|
+
<label for="form.ejs">_form.ejs</label>
|
|
215
|
+
<div class="ide_editor" id="form_ejs"></div>
|
|
216
|
+
</div>
|
|
217
|
+
</div>
|
|
218
|
+
<div class="col-md-6">
|
|
219
|
+
<div class="form-group ">
|
|
220
|
+
<label for="create_ejs">create.ejs</label>
|
|
221
|
+
<div class="ide_editor_200" id="create_ejs"></div>
|
|
222
|
+
</div>
|
|
223
|
+
<div class="form-group ">
|
|
224
|
+
<label for="createjs_ejs">createjs.ejs</label>
|
|
225
|
+
<div class="ide_editor_200" id="createjs_ejs"></div>
|
|
226
|
+
</div>
|
|
227
|
+
</div>
|
|
228
|
+
</div>
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
<div class="row">
|
|
232
|
+
<div class="col-md-6">
|
|
233
|
+
<div class="form-group ">
|
|
234
|
+
<label for="update_ejs">update.ejs</label>
|
|
235
|
+
<div class="ide_editor_200" id="update_ejs"></div>
|
|
236
|
+
</div>
|
|
237
|
+
<div class="form-group ">
|
|
238
|
+
<label for="updatejs_ejs">updatejs.ejs</label>
|
|
239
|
+
<div class="ide_editor_200" id="updatejs_ejs"></div>
|
|
240
|
+
</div>
|
|
241
|
+
</div>
|
|
242
|
+
|
|
243
|
+
<div class="col-md-6">
|
|
244
|
+
<div class="form-group ">
|
|
245
|
+
<label for="import_ejs">import.ejs</label>
|
|
246
|
+
<div class="ide_editor_200" id="import_ejs"></div>
|
|
247
|
+
</div>
|
|
248
|
+
<div class="form-group ">
|
|
249
|
+
<label for="importjs_ejs">importjs.ejs</label>
|
|
250
|
+
<div class="ide_editor_200" id="importjs_ejs"></div>
|
|
251
|
+
</div>
|
|
252
|
+
</div>
|
|
253
|
+
</div>
|
|
254
|
+
|
|
255
|
+
</div>
|
|
256
|
+
<div class="tab-pane fade" id="tabview" role="tabpanel" aria-labelledby="view-tab">
|
|
257
|
+
<br>
|
|
258
|
+
<div class="row">
|
|
259
|
+
<div class="col-md-9">
|
|
260
|
+
<div class="form-group ">
|
|
261
|
+
<label for="view_ejs">view.ejs</label>
|
|
262
|
+
<div class="ide_editor" id="view_ejs"></div>
|
|
263
|
+
</div>
|
|
264
|
+
</div>
|
|
265
|
+
<div class="col-md-6"></div>
|
|
266
|
+
</div>
|
|
267
|
+
</div>
|
|
268
|
+
</div>
|
|
269
|
+
</div>
|
|
270
|
+
</div>
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
<!--Card-->
|
|
274
|
+
<div class="card mb-4 wow fadeIn card-script" style="display: none">
|
|
275
|
+
<div class="card-header font-weight-bold">
|
|
276
|
+
<span>Additional Settings</span>
|
|
277
|
+
</div>
|
|
278
|
+
|
|
279
|
+
<div class="card-body">
|
|
280
|
+
<hr>
|
|
281
|
+
|
|
282
|
+
<div class="col-md-12">
|
|
283
|
+
<% if(zForms.obj.hasOwnProperty("is_approval")) {%>
|
|
284
|
+
<label for="approval">Approval Systems</label>
|
|
285
|
+
<!-- Default checked -->
|
|
286
|
+
<%- zForms.build["is_approval"] %>
|
|
287
|
+
<div class="divzapprovals" <%- approvalDatas.is_approval ? '' : 'style="display: none"'
|
|
288
|
+
%> >
|
|
289
|
+
<%- zForms.build["template"] %>
|
|
290
|
+
<div class="row">
|
|
291
|
+
<div class="col-md-6">
|
|
292
|
+
<div class="form-group divTitle mb-3">
|
|
293
|
+
<label>Title</label>
|
|
294
|
+
<input type="text" class="form-control" id="approval_title"
|
|
295
|
+
name="approval_title" value="<%- approvalDatas.title %>">
|
|
296
|
+
</div>
|
|
297
|
+
</div>
|
|
298
|
+
<div class="col-md-6">
|
|
299
|
+
<%- zForms.build["type"] %>
|
|
300
|
+
</div>
|
|
301
|
+
</div>
|
|
302
|
+
|
|
303
|
+
<div class="row">
|
|
304
|
+
<div class="col-md-12">
|
|
305
|
+
<%- zForms.build["approvers"] %>
|
|
306
|
+
<%- zForms.build["knowings"] %>
|
|
307
|
+
</div>
|
|
308
|
+
</div>
|
|
309
|
+
</div>
|
|
310
|
+
<%}%>
|
|
311
|
+
</div>
|
|
312
|
+
</div>
|
|
313
|
+
</div>
|
|
314
|
+
</div>
|
|
315
|
+
<!--/.Card-->
|
|
316
|
+
</div>
|
|
317
|
+
</div>
|
|
318
|
+
<!--Grid row-->
|
|
319
|
+
</section>
|
|
320
|
+
<!--Section: Post-->
|
|
321
|
+
|
|
322
|
+
<!-- Modal -->
|
|
323
|
+
<div class="modal fade" id="add_table" tabindex="-1" aria-labelledby="add_table" aria-hidden="true">
|
|
324
|
+
<div class="modal-dialog">
|
|
325
|
+
<div class="modal-content">
|
|
326
|
+
<div class="modal-header">
|
|
327
|
+
<h5 class="modal-title" id="exampleModalLabel">Add Table</h5>
|
|
328
|
+
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fa fa-times"></i>
|
|
329
|
+
</button>
|
|
330
|
+
</div>
|
|
331
|
+
<div class="modal-body">
|
|
332
|
+
<form id="modal-form" method="post" action="/generator">
|
|
333
|
+
<div class="form-group">
|
|
334
|
+
<label for="table">Module Name</label>
|
|
335
|
+
<input type="text" class="form-control" id="modal-table" name="table" />
|
|
336
|
+
</div>
|
|
337
|
+
|
|
338
|
+
<div class="form-group">
|
|
339
|
+
<label for="route">Route</label>
|
|
340
|
+
<input type="text" class="form-control" id="modal-route" name="route" />
|
|
341
|
+
</div>
|
|
342
|
+
</form>
|
|
343
|
+
</div>
|
|
344
|
+
<div class="modal-footer">
|
|
345
|
+
<button type="button" class="btn btn-secondary" data-dismiss="modal"><i class="fa fa-times"></i>
|
|
346
|
+
Close</button>
|
|
347
|
+
<button type="button" id="modal-save" class="btn btn-primary"><i class="fa fa-paper-plane"></i>
|
|
348
|
+
Save</button>
|
|
349
|
+
</div>
|
|
350
|
+
</div>
|
|
351
|
+
</div>
|
|
352
|
+
</div>
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
<div class="modal fade" id="modal_add_field" tabindex="-1" aria-labelledby="add_table" aria-hidden="true">
|
|
356
|
+
<div class="modal-dialog">
|
|
357
|
+
<div class="modal-content">
|
|
358
|
+
<div class="modal-header">
|
|
359
|
+
<h5 class="modal-title">Add Field</h5>
|
|
360
|
+
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fa fa-times"></i>
|
|
361
|
+
</button>
|
|
362
|
+
</div>
|
|
363
|
+
<div class="modal-body">
|
|
364
|
+
|
|
365
|
+
<form id="modal-form" method="post" action="/<%- routeName%>">
|
|
366
|
+
<div class="form-group">
|
|
367
|
+
<label for="table">Name</label>
|
|
368
|
+
<div class="input-group">
|
|
369
|
+
<div class="input-group-prepend">
|
|
370
|
+
<select id="modal_position" class="form-control">
|
|
371
|
+
<option value="LEFT">Left</option>
|
|
372
|
+
<option value="RIGHT">Right</option>
|
|
373
|
+
<option value="ONE_COLUMN">One Column</option>
|
|
374
|
+
</select>
|
|
375
|
+
</div>
|
|
376
|
+
<input type="text" class="form-control" id="modal_name" placeholder="Field Name"
|
|
377
|
+
name="name" />
|
|
378
|
+
</div>
|
|
379
|
+
</div>
|
|
380
|
+
|
|
381
|
+
<div class="form-group">
|
|
382
|
+
<label for="route">Type</label>
|
|
383
|
+
<select class="form-control" id="modal_type">
|
|
384
|
+
<% for(var key in selects){%>
|
|
385
|
+
<option value="<%- key%>"><%- selects[key]%></option>
|
|
386
|
+
<%}%>
|
|
387
|
+
</select>
|
|
388
|
+
</div>
|
|
389
|
+
|
|
390
|
+
<div class="row divrelation" style="display:none">
|
|
391
|
+
<div class="col-md-6">
|
|
392
|
+
<div class="form-group">
|
|
393
|
+
<label for="route">Module Name</label>
|
|
394
|
+
<select class="form-control" id="relationtable"></select>
|
|
395
|
+
</div>
|
|
396
|
+
</div>
|
|
397
|
+
|
|
398
|
+
<div class="col-md-6 divrelationfield">
|
|
399
|
+
<div class="form-group ">
|
|
400
|
+
<label for="route">Label</label>
|
|
401
|
+
<select class="form-control" id="relationfield"></select>
|
|
402
|
+
</div>
|
|
403
|
+
</div>
|
|
404
|
+
|
|
405
|
+
<div class="col-md-12 divconcat">
|
|
406
|
+
<div class="form-group ">
|
|
407
|
+
<label for="route">Concat</label>
|
|
408
|
+
<input type="text" class="form-control" id="relationconcat"
|
|
409
|
+
placeholder='CONCAT(fullname, " (email) : ", email)'>
|
|
410
|
+
</div>
|
|
411
|
+
</div>
|
|
412
|
+
|
|
413
|
+
</div>
|
|
414
|
+
</form>
|
|
415
|
+
|
|
416
|
+
</div>
|
|
417
|
+
<div class="modal-footer">
|
|
418
|
+
<button type="button" class="btn btn-secondary" data-dismiss="modal"><i class="fa fa-times"></i>
|
|
419
|
+
Close</button>
|
|
420
|
+
<button type="button" id="modal-add" class="btn btn-primary"><i class="fa fa-plus"></i> Add</button>
|
|
421
|
+
</div>
|
|
422
|
+
</div>
|
|
423
|
+
</div>
|
|
424
|
+
</div>
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
<div class="modal fade" id="modal_setting" tabindex="-1" aria-labelledby="modal_setting" aria-hidden="true">
|
|
428
|
+
<div class="modal-dialog">
|
|
429
|
+
<div class="modal-content">
|
|
430
|
+
<div class="modal-header">
|
|
431
|
+
<h5 class="modal-title" id="modal_setting_label">Setting</h5>
|
|
432
|
+
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fa fa-times"></i>
|
|
433
|
+
</button>
|
|
434
|
+
</div>
|
|
435
|
+
<div class="modal-body">
|
|
436
|
+
<form id="modal-setting-form" method="post" action="/<%- routeName%>/save_setting">
|
|
437
|
+
<div id="body_content"></div>
|
|
438
|
+
</form>
|
|
439
|
+
</div>
|
|
440
|
+
<div class="modal-footer">
|
|
441
|
+
<button class="btn btn-danger text-white" id="delete_field" type="button"><i class="fa fa-trash"></i>
|
|
442
|
+
Delete</button>
|
|
443
|
+
<button type="button" class="btn btn-secondary" data-dismiss="modal"><i class="fa fa-times"></i>
|
|
444
|
+
Close</button>
|
|
445
|
+
<button type="button" id="modal-setting-save" class="btn btn-primary"><i class="fa fa-paper-plane"></i>
|
|
446
|
+
Save</button>
|
|
447
|
+
</div>
|
|
448
|
+
</div>
|
|
449
|
+
</div>
|
|
450
|
+
</div>
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
<div class="modal fade" id="modal_tab" tabindex="-1" aria-labelledby="modal_setting" aria-hidden="true">
|
|
454
|
+
<div class="modal-dialog">
|
|
455
|
+
<div class="modal-content">
|
|
456
|
+
<div class="modal-header">
|
|
457
|
+
<h5 class="modal-title" id="modal_setting_label">Tab</h5>
|
|
458
|
+
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fa fa-times"></i>
|
|
459
|
+
</button>
|
|
460
|
+
</div>
|
|
461
|
+
<div class="modal-body">
|
|
462
|
+
<form>
|
|
463
|
+
<input type="text" id="edittab" class="form-control">
|
|
464
|
+
</form>
|
|
465
|
+
</div>
|
|
466
|
+
<div class="modal-footer">
|
|
467
|
+
<button type="button" class="btn btn-secondary" data-dismiss="modal"><i class="fa fa-times"></i>
|
|
468
|
+
Close</button>
|
|
469
|
+
<button type="button" id="modal-tab-save" class="btn btn-primary"><i class="fa fa-paper-plane"></i>
|
|
470
|
+
Save</button>
|
|
471
|
+
</div>
|
|
472
|
+
</div>
|
|
473
|
+
</div>
|
|
474
|
+
</div>
|
|
475
|
+
|
|
476
|
+
<div class="modal fade" id="modal-file" tabindex="-1" aria-labelledby="add_table" aria-hidden="true">
|
|
477
|
+
<div class="modal-dialog">
|
|
478
|
+
<div class="modal-content">
|
|
479
|
+
<div class="modal-header">
|
|
480
|
+
<h5 class="modal-title">Import zfield File</h5>
|
|
481
|
+
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fa fa-times"></i>
|
|
482
|
+
</button>
|
|
483
|
+
</div>
|
|
484
|
+
<div class="modal-body">
|
|
485
|
+
<form id="modal-form-file" method="post" action="/zgenerator/import">
|
|
486
|
+
<input type="hidden" name="_csrf" value="<%= csrfToken %>">
|
|
487
|
+
<div class="form-group">
|
|
488
|
+
<label for="table">File</label>
|
|
489
|
+
<input type="file" class="form-control" id="import-file" name="import-file" required />
|
|
490
|
+
</div>
|
|
491
|
+
</form>
|
|
492
|
+
</div>
|
|
493
|
+
<div class="modal-footer">
|
|
494
|
+
<button type="button" class="btn btn-secondary" data-dismiss="modal"><i class="fa fa-times"></i>
|
|
495
|
+
Close</button>
|
|
496
|
+
<button type="submit" id="submit-import" class="btn btn-primary"><i class="fa fa-paper-plane"></i>
|
|
497
|
+
Submit</button>
|
|
498
|
+
</div>
|
|
499
|
+
</div>
|
|
500
|
+
</div>
|
|
501
|
+
</div>
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
<div class="modal fade" id="modal_container" tabindex="-1" aria-labelledby="add_container" aria-hidden="true">
|
|
505
|
+
<div class="modal-dialog">
|
|
506
|
+
<div class="modal-content">
|
|
507
|
+
<div class="modal-header">
|
|
508
|
+
<h5 class="modal-title">Add Container</h5>
|
|
509
|
+
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fa fa-times"></i>
|
|
510
|
+
</button>
|
|
511
|
+
</div>
|
|
512
|
+
<div class="modal-body">
|
|
513
|
+
<form>
|
|
514
|
+
<div class="form-group">
|
|
515
|
+
<label for="route">Column</label>
|
|
516
|
+
<select class="form-control form-select" id="column-count">
|
|
517
|
+
<option value="1">1</option>
|
|
518
|
+
<option value="2" selected>2</option>
|
|
519
|
+
<option value="3">3</option>
|
|
520
|
+
<option value="4">4</option>
|
|
521
|
+
<option value="6">6</option>
|
|
522
|
+
</select>
|
|
523
|
+
</div>
|
|
524
|
+
</form>
|
|
525
|
+
</div>
|
|
526
|
+
<div class="modal-footer">
|
|
527
|
+
<button type="button" class="btn btn-secondary btn-modal-container-close" data-dismiss="modal"><i
|
|
528
|
+
class="fa fa-times"></i> Close</button>
|
|
529
|
+
<button type="button" id="modal-container-save" class="btn btn-primary"><i
|
|
530
|
+
class="fa fa-plus-circle"></i> Add</button>
|
|
531
|
+
</div>
|
|
532
|
+
</div>
|
|
533
|
+
</div>
|
|
534
|
+
</div>
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
<div class="modal fade" id="modal_joins" tabindex="-1" aria-labelledby="add_container" aria-hidden="true">
|
|
538
|
+
<div class="modal-dialog">
|
|
539
|
+
<div class="modal-content">
|
|
540
|
+
<div class="modal-header">
|
|
541
|
+
<h5 class="modal-title">Join Module</h5>
|
|
542
|
+
<button type="button" class="close" id="closejoin" data-dismiss="modal" aria-label="Close"><i
|
|
543
|
+
class="fa fa-times"></i>
|
|
544
|
+
</button>
|
|
545
|
+
</div>
|
|
546
|
+
<div class="modal-body">
|
|
547
|
+
<form>
|
|
548
|
+
<div class="form-group">
|
|
549
|
+
<label for="route">Module</label>
|
|
550
|
+
<select class="form-control form-select" id="select_module_joins">
|
|
551
|
+
<option value="">Please Select</option>
|
|
552
|
+
<% for(var key in rows) { var row=rows[key]; var selected=row.table==table ? " selected "
|
|
553
|
+
: "" ; if(row.table !='zrole' ) { %>
|
|
554
|
+
<option value="<%= row.table %>" <%=selected %> ><%= row.table %>
|
|
555
|
+
</option>
|
|
556
|
+
<% }} %>
|
|
557
|
+
</select>
|
|
558
|
+
</div>
|
|
559
|
+
</form>
|
|
560
|
+
</div>
|
|
561
|
+
<div class="modal-footer">
|
|
562
|
+
<button type="button" class="btn btn-secondary btn-modal-container-close" data-dismiss="modal"><i
|
|
563
|
+
class="fa fa-times"></i> Close</button>
|
|
564
|
+
<button type="button" id="modal-joins-save" class="btn btn-primary"><i class="fa fa-plus-circle"></i>
|
|
565
|
+
Add</button>
|
|
566
|
+
</div>
|
|
567
|
+
</div>
|
|
568
|
+
</div>
|
|
569
|
+
</div>
|
|
570
|
+
|
|
571
|
+
<!-- Modal insert data into container --->
|
|
572
|
+
<div class="modal fade" id="modal_container_into" tabindex="-1" aria-labelledby="modal_container_into"
|
|
573
|
+
aria-hidden="true">
|
|
574
|
+
<div class="modal-dialog">
|
|
575
|
+
<div class="modal-content">
|
|
576
|
+
<div class="modal-header">
|
|
577
|
+
<h5 class="modal-title" id="exampleModalLabel">Move <span class="badge badge-danger">fields </span> into
|
|
578
|
+
container</h5>
|
|
579
|
+
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fa fa-times"></i>
|
|
580
|
+
</button>
|
|
581
|
+
</div>
|
|
582
|
+
<div class="modal-body">
|
|
583
|
+
<form>
|
|
584
|
+
<div class="form-group">
|
|
585
|
+
<label for="route">Into Container</label>
|
|
586
|
+
<select class="form-control form-select" id="container-select">
|
|
587
|
+
</select>
|
|
588
|
+
</div>
|
|
589
|
+
</form>
|
|
590
|
+
</div>
|
|
591
|
+
<div class="modal-footer">
|
|
592
|
+
<button type="button" class="btn btn-secondary btncontainer-close" data-dismiss="modal"><i
|
|
593
|
+
class="fa fa-times"></i> Close</button>
|
|
594
|
+
<button type="button" id="moveintocontainer" class="btn btn-primary"><i class="fa fa-plus-circle"></i>
|
|
595
|
+
Move</button>
|
|
596
|
+
</div>
|
|
597
|
+
</div>
|
|
598
|
+
</div>
|
|
599
599
|
</div>
|