-
Notifications
You must be signed in to change notification settings - Fork 113
/
index.html
614 lines (574 loc) · 31.7 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
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>Laravel Database Designer 0.1</title>
<!-- Bootstrap core CSS -->
<link href="bower_components/bootstrap/dist/css/bootstrap.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="asset/css/jumbotron.css" rel="stylesheet">
<link href="asset/css/app.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body>
<input style="display:none;" id="fileSaveDialog" type="file" nwsaveas />
<input style="display:none;" id="fileOpenDialog" type="file" />
<!-- Dialog Region
================================================== -->
<div class="modals-container"></div>
<!-- Container Region
================================================== -->
<div id="apps">
<div id="biodesign-logo">
<img src="asset/img/biodesign-logo-web.png" alt="">
</div>
</div>
<!-- Template
================================================== -->
<script type="text/template" id="generate-template">
<form class="form-horizontal">
<fieldset>
<!-- Form Name -->
<legend>Generate Table</legend>
<!-- Textarea -->
<div class="form-group">
<div class="col-md-4">
<textarea style="width: 563px; height: 359px" class="form-control" id="txtcommand" name="txtcommand"><%=content%></textarea>
</div>
</div>
</fieldset>
</form>
</script>
<!-- Template
================================================== -->
<script type="text/template" id="nodemodel-template">
<form class="form-horizontal">
<fieldset>
<!-- Form Name -->
<legend>Create a Column</legend>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="name">Column Name</label>
<div class="col-md-4">
<input id="name" name="name" type="text" placeholder="Column Name" class="form-control input-md" value="<%=name%>">
</div>
</div>
<!-- Select Basic -->
<div class="form-group">
<label class="col-md-4 control-label" for="type">Type</label>
<div class="col-md-4">
<select id="type" name="type" class="form-control">
<optgroup label="LARAVEL TYPES">
<option value="increments">INCREMENTS</option>
<option value="bigIncrements">BIG INCREMENTS</option>
<option value="timestamps">TIME STAMPS</option>
<option value="softDeletes">SOFT DELETES</option>
<option disabled="disabled">-</option>
<option value="string">STRING (VARCHAR)</option>
<option value="text">TEXT</option>
<option disabled="disabled">-</option>
<option value="tinyInteger">TINY INTEGER</option>
<option value="smallInteger">SMALL INTEGER</option>
<option value="mediumInteger">MEDIUM INTEGER</option>
<option value="integer">INTEGER</option>
<option value="bigInteger">BIG INTEGER</option>
<option disabled="disabled">-</option>
<option value="float">FLOAT</option>
<option value="decimal">DECIMAL</option>
<option value="boolean">BOOLEAN</option>
<option disabled="disabled">-</option>
<option value="enum">ENUM</option>
<option disabled="disabled">-</option>
<option value="date">DATE</option>
<option value="datetime">DATETIME</option>
<option value="time">TIME</option>
<option value="timestamp">TIMESTAMP</option>
<option disabled="disabled">-</option>
<option value="binary">BINARY</option>
</optgroup>
</select>
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="length">Length</label>
<div class="col-md-4">
<input id="length" name="length" type="text" placeholder="Length" class="form-control input-md" value="<%=length%>">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="defaultvalue">Default Value</label>
<div class="col-md-4">
<input id="defaultvalue" name="defaultvalue" type="text" placeholder="Default Value" class="form-control input-md" value="<%=defaultvalue%>">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="enumvalue">Enum Value</label>
<div class="col-md-4">
<input id="enumvalue" name="enumvalue" type="text" placeholder="Enum Value" class="form-control input-md" value="<%=enumvalue%>">
</div>
</div>
<!-- Multiple Checkboxes -->
<div class="form-group">
<label class="col-md-4 control-label" for="columnOption">Option</label>
<div class="col-md-4">
<div class="checkbox">
<label for="ai">
<input type="checkbox" name="ai" id="ai" value="Auto Incremental">
Auto Incremental
</label>
</div>
<div class="checkbox">
<label for="pk">
<input type="checkbox" name="pk" id="pk" value="Primary Key">
Primary Key
</label>
</div>
<div class="checkbox">
<label for="nu">
<input type="checkbox" name="nu" id="nu" value="Nullable">
Nullable
</label>
</div>
<div class="checkbox">
<label for="ui">
<input type="checkbox" name="ui" id="ui" value="Unsigned Integer">
Unsigned Integer
</label>
</div>
<div class="checkbox">
<label for="in">
<input type="checkbox" name="in" id="in" value="Index">
Index
</label>
</div>
<div class="checkbox">
<label for="un">
<input type="checkbox" name="un" id="un" value="Unique Index">
Unique Index
</label>
</div>
<div class="checkbox">
<label for="fillable">
<input type="checkbox" name="fillable" id="fillable" value="Fillable">
Fillable
</label>
</div>
<div class="checkbox">
<label for="guarded">
<input type="checkbox" name="guarded" id="guarded" value="Guarded">
Guarded
</label>
</div>
<div class="checkbox">
<label for="visible">
<input type="checkbox" name="visible" id="visible" value="Visible">
Visible
</label>
</div>
<div class="checkbox">
<label for="hidden">
<input type="checkbox" name="hidden" id="hidden" value="Hidden">
Hidden
</label>
</div>
</div>
</div>
<!-- Button (Double) -->
<div class="form-group">
<label class="col-md-4 control-label" for="button1id"></label>
<div class="col-md-8">
<button id="button1id" name="button1id" class="ok btn btn-success">Save</button>
<button id="button2id" name="button2id" class="cancel btn btn-danger">Cancel</button>
</div>
</div>
</fieldset>
</form>
</script>
<!-- Template
================================================== -->
<!-- Template
================================================== -->
<script type="text/template" id="nodecanvas-template">
<div class="btn-group toolbox" style="padding: 10px; position: fixed; z-index: 100;">
<button type="button" class="btn btn-default btn-xs addcontainer"><span style="margin-right: 2px" class="glyphicon glyphicon-plus "></span>new table</button>
<button type="button" class="btn btn-default btn-xs generate"><span style="margin-right: 2px" class="glyphicon glyphicon-cutlery "></span>generate</button>
<div class="btn-group">
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
File <span class="caret "></span>
</button>
<ul class="dropdown-menu" role="menu">
<li><a class="save" href="#">Save</a></li>
<li><a class="open" href="#">Open</a></li>
<li><a class="saveas" href="#">Save As</a></li>
<li class="divider"></li>
<li><a class="opengist" href="#">Open from Gist</a></li>
<li><a class="opengistid" href="#">Open Gist ID</a></li>
<li><a class="savecurrentgis" href="#">Save current Gist</a></li>
<li><a class="saveasgist" href="#">Save as Gist</a></li>
<li class="divider"></li>
<li><a class="loadexample" href="#">Load Example</a></li>
<li><a class="clearcanvas" href="#">Clear Canvas</a></li>
</ul>
</div>
</div>
</script>
<!-- Template
================================================== -->
<script type="text/template" id="nodeitem-template">
<b><%=name%></b> <i><%=type%></i> (<%=length%>)
<div style="float: right">
<a href="#" class="btn edit btn-xs btn-container"><span class="glyphicon glyphicon-edit"></span></a>
<a href="#" class="btn delete btn-xs btn-container"><span class="glyphicon glyphicon-remove"></span></a>
</div>
</script>
<!-- Template
================================================== -->
<script type="text/template" id="nodecontainer-template">
<div>
<p> <b><%=name%>:<%=classname%></b>
<a href="#" style="display: none;" class="btn relationadd btn-xs btn-container"><span class="glyphicon glyphicon-plus"></span> r</a>
<a href="#" class="btn seeding btn-xs btn-container"><span class="glyphicon glyphicon-eye-open"></span> s</a>
<a href="#" class="btn relation btn-xs btn-container"><span class="glyphicon glyphicon-eye-open"></span> r</a>
<a href="#" class="btn edit btn-xs btn-container"><span class="glyphicon glyphicon-edit"></span> </a>
<a href="#" class="btn delete btn-xs btn-container"><span class="glyphicon glyphicon-remove-circle"></span> </a>
<ul class="nodecollection-container">
</ul> <a href="#" class="btn add add-column btn-xs btn-container"><span class="glyphicon glyphicon-plus"></span>add new column</a>
<div id="conn-<%=name%>" style="" tag="<%=name%>" class="conn"></div>
</div>
</script>
<!-- Template
================================================== -->
<script type="text/template" id="createnode-template">
<form class="form-horizontal">
<fieldset>
<!-- Form Name -->
<legend>Create Table</legend>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="container-name">Table Name</label>
<div class="col-md-4">
<input id="container-name" value="<%=name%>" name="name" type="text" placeholder="Table1" class="form-control input-md">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="container-classname">Model Class Name</label>
<div class="col-md-4">
<input id="container-classname" value="<%=classname%>" name="classname" type="text" placeholder="Model Class Name" class="form-control input-md">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="container-namespace">Namespace</label>
<div class="col-md-4">
<input id="container-namespace" value="<%=namespace%>" name="namespace" type="text" placeholder="Namespace" class="form-control input-md">
</div>
</div>
<!-- Select Basic -->
<div class="form-group">
<label class="col-md-4 control-label" for="container-color">Color</label>
<div class="col-md-4">
<select id="container-color" name="color" class="form-control">
<option value="Grey">Grey</option>
<option value="Red">Red</option>
<option value="Green">Green</option>
<option value="Blue">Blue</option>
<option value="Yellow">Yellow</option>
</select>
</div>
</div>
<!-- Multiple Checkboxes -->
<div class="form-group">
<label class="col-md-4 control-label" for="tableOptions">Options</label>
<div class="col-md-4">
<div class="checkbox">
<label for="container-increment">
<input type="checkbox" name="increment" id="container-increment" value="increment">
Add Laravel ID increments column.
</label>
</div>
<div class="checkbox">
<label for="container-timestamp">
<input type="checkbox" name="timestamp" id="container-timestamp" value="timestamp">
Add Laravel timestamps.
</label>
</div>
<div class="checkbox">
<label for="container-softdelete">
<input type="checkbox" name="softdelete" id="container-softdelete" value="softdelete">
Add Laravel soft delete.
</label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-md-8" style="float: right">
<button id="button1id" name="button1id" class="ok addnode btn btn-success">Save</button>
<button id="button2id" name="button2id" class="cancel btn btn-danger">Cancel</button>
</div>
</div>
</fieldset>
</form>
</script>
<!-- Template
================================================== -->
<script type="text/template" id="relationcreate-template">
<form class="form-horizontal">
<fieldset>
<!-- Form Name -->
<legend><%=title%></legend>
<!-- Select Basic -->
<div class="form-group classoption">
<label class="col-md-4 control-label" for="relation-relatedmodel">Related Model</label>
<div class="col-md-4">
<select id="relation-relatedmodel" name="relatedmodel" class="form-control">
<% _.each(relatedmodel, function(related) { %>
<option value="<%=related.classname%>" > <%=related.classname%></option>
<% }); %>
</select>
</div>
</div>
<!-- Select Basic -->
<div class="form-group">
<label class="col-md-4 control-label" for="relation-relationtype">Relation Type</label>
<div class="col-md-4">
<select id="relation-relationtype" name="relationtype" class="form-control">
<option value="hasOne">hasOne</option><option value="belongsTo">belongsTo</option><option value="hasMany">hasMany</option><option value="belongsToMany">belongsToMany</option><option value="hasManyThrough">hasManyThrough</option><option value="morphOne">morphOne</option><option value="morphTo">morphTo</option><option value="morphMany">morphMany</option><option value="morphedByMany">morphedByMany</option><option value="morphToMany">morphToMany</option> </select>
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="relation-name">Function Name</label>
<div class="col-md-4">
<input id="relation-name" name="name" type="text" placeholder="Function Name" value="<%=relationship.name%>" class="form-control input-md">
</div>
</div>
<!-- Prepended checkbox -->
<div class="form-group">
<label class="col-md-4 control-label" for="relation-usenamespace">Use Namespace</label>
<div class="col-md-4">
<div class="input-group">
<span class="input-group-addon">
<input type="checkbox">
</span>
<input id="relation-usenamespace" name="usenamespace" class="form-control" type="text" placeholder="Enable">
</div>
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="relation-foreignkeys">Foreign Key</label>
<div class="col-md-4">
<input id="relation-foreignkeys" name="foreignkeys" type="text" value="<%=relationship.foreignkeys%>" placeholder="Use Comma if multiple" class="form-control input-md">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="relation-extramethods">Extra Method</label>
<div class="col-md-4">
<input id="relation-extramethods" name="extramethods" value="<%=relationship.extramethods%>" type="text" placeholder="ex.. ->withPivot('foo')" class="form-control input-md">
</div>
</div>
<div class="form-group">
<div class="col-md-8" style="float: right">
<button id="btnsave" name="button1id" class="ok save btn btn-success">Save</button>
<button id="btndelete" name="button2id" class="ok delete btn btn-danger">Delete</button>
<button id="btncancel" name="button2id" class="cancel btn btn-primary">Cancel</button>
</div>
</div>
</fieldset>
</form>
</script>
<!-- Template
================================================== -->
<script type="text/template" id="relationitem-template">
<td><%=name %></td>
<td><%=relationtype %></td>
<td><%=relatedmodel %></td>
<td><%=foreignkeys %></td>
<td colspan="2" style="text-align: right;">
<div class="btn-group">
<a href="#" class="btn edit btn-xs btn-warning"><span class=""></span>Edit</a>
<a href="#" class="btn delete btn-xs btn-danger"><span class=""></span>Delete</a>
</div>
</td>
</script>
<!-- Template
================================================== -->
<script type="text/template" id="relationcollection-template">
<legend>Relation List Model: <%=classname%> </legend>
<table class="table">
<thead>
<tr>
<th>Function</th>
<th>Relation</th>
<th>Model</th>
<th>Foreign key</th>
<th></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="modal-footer">
<a href="#" class="btn ok btn-primary">Add New Relation</a>
<a href="#" class="btn btn-primary cancel">Cancel</a>
</div>
</script>
<!-- Template
================================================== -->
<script type="text/template" id="seeditem-template">
<input type="text" value="<%=content%>" class="form-control input-md editvalue">
</script>
<!-- Template
================================================== -->
<script type="text/template" id="seeding-template">
<legend>Add Seed </legend>
<form class="form-horizontal">
<fieldset>
<table class="table">
<thead>
<tr class="headerSeedRow">
<% _.each(column, function(col) { %>
<th><%=col.name%></th>
<% }); %>
<th></th>
</tr>
<tr class="addSeedRow">
<% _.each(column, function(col) { %>
<td><input id="<%=col.name%>" name="<%=col.name%>" type="text" class="form-control input-md"></td>
<% }); %>
<td><button id="btnsave" name="button1id" class="ok save btn btn-success">add</button></td>
</tr>
</thead>
</table>
</fieldset>
</form>
</script>
<!-- Template
================================================== -->
<script type="text/template" id="gistfile-template">
<div class="list-group">
<% _.each(gistlist, function(item) { %>
<a href="#" class="list-group-item" tag="<%=item.id%>" >
<h4 class="list-group-item-heading"><%= item.description%></h4>
<p class="list-group-item-text"><%= item.filename %></p>
</a>
<% }); %>
</div>
</script>
<!-- Template
================================================== -->
<script type="text/template" id="gistsave-template">
<form class="form-horizontal">
<fieldset>
<!-- Form Name -->
<legend>Save as Gist</legend>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="filename">Filename</label>
<div class="col-md-4">
<input id="filename" name="filename" type="text" placeholder="" class="form-control input-md">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="description">Description</label>
<div class="col-md-4">
<input id="description" name="description" type="text" placeholder="" class="form-control input-md">
</div>
</div>
<!-- Button (Double) -->
<div class="form-group">
<label class="col-md-4 control-label" for="button1id"></label>
<div class="col-md-8">
<button id="button1id" name="button1id" class="btn ok btn-success">Ok</button>
<button id="button2id" name="button2id" class="btn cancel btn-danger">Cancel</button>
</div>
</div>
</fieldset>
</form>
</script>
<!-- Template
================================================== -->
<script type="text/template" id="gistload-template">
<legend>Load file From Gist</legend>
<div id="gistfiles">
<div class="progress">
<div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%"><span class="sr-only">Loading..</span></div>
</div>
</div>
</script>
<!-- Template
================================================== -->
<script type="text/template" id="gistloadid-template">
<form class="form-horizontal">
<fieldset>
<!-- Form Name -->
<legend>Load file From Gist</legend>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="textinput">Gist ID</label>
<div class="col-md-4">
<input id="filename" name="filename" type="text" placeholder="" class="form-control input-md">
</div>
</div>
<!-- Button (Double) -->
<div class="form-group">
<label class="col-md-4 control-label" for="button1id"></label>
<div class="col-md-8">
<button id="button1id" name="button1id" class="btn ok btn-success">Open</button>
<button id="button2id" name="button2id" class="btn cancel btn-danger">Cancel</button>
</div>
</div>
</fieldset>
</form>
</script>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="bower_components/jquery/jquery.js"></script>
<script src="bower_components/jquery-ui/jquery-ui.min.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="bower_components/jsplumb/dist/js/jquery.jsPlumb-1.6.4.js"></script>
<script src="bower_components/underscore/underscore.js"></script>
<script src="bower_components/backbone/backbone.js"></script>
<script src="bower_components/marionette/lib/backbone.marionette.js"></script>
<script src="bower_components/backbone.syphon/lib/backbone.syphon.js"></script>
<script src="bower_components/backbone.bootstrap-modal/src/backbone.bootstrap-modal.js"></script>
<script src="bower_components/hello/dist/hello.all.min.js"></script>
<!-- region -->
<script src="asset/app/js/app.js"></script>
<!-- schema entity -->
<script src="asset/app/js/entities/node_entities.js"></script>
<!-- node -->
<script src="asset/app/js/node/node_view.js"></script>
<script src="asset/app/js/node/node_modal_base.js"></script>
<script src="asset/app/js/node/node_modal_container.js"></script>
<script src="asset/app/js/node/node_modal_generate.js"></script>
<script src="asset/app/js/node/node_modal_item.js"></script>
<script src="asset/app/js/node/node_modal_relation.js"></script>
<script src="asset/app/js/node/node_modal_seed.js"></script>
<script src="asset/app/js/node/node_modal_gist.js"></script>
<script src="asset/app/js/node/node_controller.js"></script>
<!-- canvas -->
<script src="asset/app/js/canvas/nodecanvas_view.js"></script>
<script src="asset/app/js/canvas/nodecanvas_controller_base.js"></script>
<script src="asset/app/js/canvas/nodecanvas_controller_canvas.js"></script>
<script src="asset/app/js/canvas/nodecanvas_controller_child.js"></script>
<!-- main startup -->
<script src="asset/app/js/main.js"></script>
<script src="asset/app/js/node-webkit/node.js"></script>
</body>
</html>