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
|
<!DOCTYPE html> <html lang="en-HK" prefix="og: http://ogp.me/ns#">
<head> <!-- Required meta tags --> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <title>Color</title>
<!-- css --> <?php include 'inc/headlinks.php'; ?> <?php include 'inc/link-js.php'; ?> <!-- End layout styles --> <link rel="stylesheet" href="../assets/css/dropify.css?<?= rand(1, 10000) / 7; ?>" /> <link rel="stylesheet" href="../assets/css/wheelcolorpicker.css?<?= rand(1, 10000) / 7; ?>" /> </head>
<body> <div class="container-scroller"> <!-- partial:partials/_sidebar.html -->
<?php include 'inc/sidebar.php'; ?> <!-- partial -->
<div class="container-fluid page-body-wrapper">
<!-- partial:partials/_navbar.html --> <?php include 'inc/navbar.php'; ?> <!-- partial -->
<div class="main-panel">
<!-- breadcrumb --> <div class="page-title-box d-flex align-items-center justify-content-between"> <ol class="breadcrumb m-0 p-0">
<li class="breadcrumb-item active">Color</li> </ol>
<div class="page-title-right">
<div class="splitBtn mb-md-0 mb-3"> <button type="button" class="btn btn-indigo dropdown-toggle px-3 shadow_green" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <span class="mr-3">Action</span> <span class="sr-only"> Toggle Dropdown</span> </button> <div class="dropdown-menu dropdown-menu-right small"> <a class="dropdown-item" href="#" data-toggle="modal" data-target="#addNew"> <i class="mdi mdi-plus-circle"></i> Add Color</a> <a class="dropdown-item" href="#" data-toggle="modal" data-target="#importCSV"><i class="mdi mdi-file-import"></i> Import</a>
</div> </div>
</div>
</div> <!-- breadcrumb end -->
<div class="content-wrapper pb-0">
<!-- alert Message -->
<?php include 'inc/alertmessage.php'; ?> <!-- alert Message END-->
<div class="row searchWrap"> <!-- Search Row --> <div class="col-lg-10"> <div class="row searchDefault"> <div class="col-lg-6">
<div class="form-group select2singleSearch shadow">
<select class="form-control noborder" id="ColorSearch"> <option></option>
</select>
</div>
</div>
<div class="col-lg-6"> <div class="form-group shadow select2Multiple">
<select class="form-control" id="Color" multiple="multiple" style="width: 100%;">
<option value="Test">Test</option> <option value="Test01">Test01</option> <option value="Test02">Test02</option>
</select> </div> </div>
</div>
</div>
<div class="col-lg-2"> <div class="btn-group w-100 shadow whiteBg mb-2" role="group" aria-label="Basic example">
<button type="button" class="btn btn-secondary w-100"> Clear </button> <button type="button" class="btn btn-dark w-100"> Search </button> </div>
</div> <!-- Search Row END --> </div>
<div class="boxShadow whiteBg mb-4">
<!-- Data Table --> <div class="table-responsive mb-2"> <table id="DataDT" class="table">
</table> </div> <!-- Data Table END-->
</div> <!-- content-wrapper ends --> <!-- partial:partials/_footer.html --> <?php include 'inc/footer.php'; ?> <!-- partial --> </div> <!-- main-panel ends --> </div> <!-- page-body-wrapper ends --> </div>
<!-- Modal import--> <?php include 'component/import.php'; ?>
<!-- Modal add--> <?php include 'component/add_color.php'; ?>
<!-- Modal edit--> <?php include 'component/edit_color.php'; ?>
<script src="../assets/datatables/buttons/1.1.2/js/dataTables.buttons.min.js?<?= rand(1, 10000) / 7; ?>"></script> <script src="../assets/datatables/select/1.1.2/js/dataTables.select.min.js?<?= rand(1, 10000) / 7; ?>"></script> <script src="../assets/js/bootstrap-datetimepicker.js?<?= rand(1, 10000) / 7; ?>"></script> <script src="../assets/js/select2.js?<?= rand(1, 10000) / 7; ?>"></script> <script src="../assets/js/dataTables.checkboxes.js?<?= rand(1, 10000) / 7; ?>"></script> <script src="../assets/js/jquery.wheelcolorpicker.js?<?= rand(1, 10000) / 7; ?>"></script> <script> $(function() {
var dataColorCode = [{ id: 0, text: '#dededed' }, { id: 1, text: '#cdcdcd' } ];
$("#ColorSearch").select2({ placeholder: "Color Code", allowClear: true, data: dataColorCode });
$("#Color").select2({ placeholder: "Name", allowClear: true });
var columnDefs = [/*{ data: "DT_RowId", title: "All" }, */{
render: function(data, type, row) {
var result = ' <a href="#" class="defaultText" data-toggle="modal" data-target="#edit"><i class="mdi mdi-table-edit"></i> </a>'; return result; }, title: "Edit", width: "50"
}, {
data: "column01", title: "Code#"
}, { data: "column02", title: "Name" }, {
render: function(data, type, row) {
var result = ` <span class="colorCub" style="background-color:${row.column03};" title="${row.column02}"> </span>`; return result; }, title: "Color Code"
} ];
var siteTable = $('#DataDT').DataTable({ scrollX: true, ajax: "../assets/json/color.json", columns: columnDefs, searching: false, select: 'single', responsive: true, lengthMenu: [ [10, 25, 50, 100, -1], [10, 25, 50, 100, "All"] ],
altEditor: true, // Enable altEditor pageLength: 10,
/* columnDefs: [{ 'targets': 0, 'checkboxes': { 'selectRow': false } }],*/ order: [] });
}); </script>
</body>
</html>
|