-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
193 lines (181 loc) · 5.92 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
<!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" />
<title>Schema Editor</title>
<link href="styles.css" rel="stylesheet" />
<link href="config-modal.css" rel="stylesheet" />
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="fonts/font-awesome/css/font-awesome.min.css" />
</head>
<body>
<div class="overlay" onclick="closeNav()"></div>
<div id="mySidenav" class="sidenav">
<a href="javascript:void(0)" class="closebtn" onclick="closeNav()"
>×</a
>
<div
style="
display: flex;
flex-direction: row;
justify-content: space-between;
"
>
<h3 class="sidebarHeader">Entity Options</h3>
<i
class="fa fa-trash-o"
style="
margin-right: 30px;
margin-top: 20px;
margin-left: 20px;
font-size: 20px;
color: red;
"
></i>
</div>
<span class="sidebarText"
>Category, collection: categories, Table: categories</span
>
<form>
<label class="sidebarFormText">Name</label><br />
<input
placeholder="Enter Model Name"
class="sidebarInput"
type="text"
id="schema-form-name"
/><br />
<input class="checkbox1" type="checkbox" />
<label class="checkboxText">Has Timestamps</label>
<input class="checkbox1" type="checkbox" />
<label class="checkboxText">Uses Soft-Deletes</label>
</form>
<h3 class="sidebarHeaderFields">Fields</h3>
<form>
<div id="field-form-container">
<!-- <div class="field-row">
<input
class="sidebarFieldInput"
placeholder="Field Name"
type="text"
/>
<select class="sidebarFieldInput">
<option>Choose Data</option>
</select>
<label class="letterN">N</label>
<i class="fa fa-gear" role="button" id="gear-button"></i>
<i
onclick="removeField(this)"
class="fa fa-trash-o"
style="margin-left: 20px; font-size: 20px; color: red"
></i>
</div> -->
</div>
</form>
<span class="add-field-btn" onclick="addfield()">
<i class="fa fa-plus-circle"></i>
<label>Add Fields</label><br />
</span>
<hr color="grey" style="margin: 20px" />
<h3 class="sidebarHeaderFields">Fields</h3>
<form>
<select class="sidebarFieldInput">
<option>Choose Table</option>
</select>
<select class="sidebarFieldInput">
<option>Choose Relation</option>
</select>
<i
class="fa fa-trash-o"
style="margin-left: 20px; font-size: 20px; color: red"
></i>
</form>
<i
class="fa fa-plus-circle"
style="
margin-left: 20px;
margin-top: 20px;
font-size: 20px;
color: #38b2ac;
"
></i>
<label
style="
margin-left: 10px;
margin-top: 20px;
font-size: 20px;
color: #38b2ac;
"
>Add Relationships</label
><br />
<button class="btn btn-outline-success save-btn">Save</button>
<div id="config-modal">
<form>
<div class="modal-heading">
<i class="fa fa-gear" role="button" id="config-modal-close"></i>
<h4>Field Options</h4>
</div>
<div>
<label><input type="checkbox" /> Nullable</label>
<label><input type="checkbox" /> Hidden</label>
<label><input type="checkbox" /> Fillable</label>
</div>
<div>
<h5>Indexes</h5>
<div>
<label><input type="checkbox" /> Unique</label>
<label><input type="checkbox" /> Index</label>
</div>
</div>
<div class="config-modal-input-container">
<label>Default Value</label>
<input class="config-modal-input" placeholder="Default Value" />
</div>
<div class="config-modal-input-container">
<label>Faker</label>
<input class="config-modal-input" placeholder="Faker code" />
</div>
<label><input type="checkbox" /> Primary Key</label>
<label><input type="checkbox" /> Foreign Key</label>
<div class="config-modal-input-container">
<label>Reference Table/Model</label>
<input class="config-modal-input" placeholder="User" />
</div>
<div class="config-modal-input-container">
<label>Reference Field</label>
<input class="config-modal-input" placeholder="Reference Field" />
</div>
</form>
</div>
</div>
<div class="main">
<div class="main-container">
<div class="navbar">
<h4 class="navbar-heading">Schema Editor</h4>
<button
type="button"
class="btn btn-outline-success"
onClick="openSchemaForm()"
>
<i class="fa fa-plus-circle" aria-hidden="true"></i>
Add Entity
</button>
</div>
<!-- Table Card Here -->
<div id="tables-container" onclick="closeNav()"></div>
</div>
</div>
<script src="./constants/ColumnTypes.js"></script>
<script src="./constants/Relationships.js"></script>
<script src="sidebar.js"></script>
<script src="DUMMY_DATA.js"></script>
<script src="index.js"></script>
<script src="sidebarModal.js"></script>
</body>
</html>