|
9 | 9 | content="nested-datatables : jQuery DataTables plugin for rendering nested DataTables in rows. Inner tables are independent of the data and layout from the outer table."
|
10 | 10 | />
|
11 | 11 |
|
12 |
| - <link rel="stylesheet" type="text/css" media="screen" href="/nested-datatables/assets/css/style.css?v=cd7a2da0f2f66a8c86379cbde71985cbd9e0c742"> |
13 |
| - <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.15/css/jquery.dataTables.min.css"> |
14 |
| - |
15 |
| - <script src="/nested-datatables/dist/nested.tables.min.js"></script> |
| 12 | + <link |
| 13 | + rel="stylesheet" |
| 14 | + type="text/css" |
| 15 | + media="screen" |
| 16 | + href="/nested-datatables/assets/css/style.css?v=cd7a2da0f2f66a8c86379cbde71985cbd9e0c742" |
| 17 | + /> |
| 18 | + <link |
| 19 | + rel="stylesheet" |
| 20 | + type="text/css" |
| 21 | + href="https://cdn.datatables.net/1.10.15/css/jquery.dataTables.min.css" |
| 22 | + /> |
| 23 | + |
| 24 | + <script src="/nested-datatables/dist/nested.tables.min.js"></script> |
16 | 25 |
|
17 | 26 | <style>
|
18 | 27 | footer {
|
@@ -84,215 +93,211 @@ <h3 id="demo">
|
84 | 93 | var dataInJson = [
|
85 | 94 | {
|
86 | 95 | data: {
|
87 |
| - name: 'b1', |
88 |
| - street: 's1', |
89 |
| - city: 'c1', |
| 96 | + name: "b1", |
| 97 | + street: "s1", |
| 98 | + city: "c1", |
90 | 99 | departments: 10,
|
91 |
| - offices: 15 |
| 100 | + offices: 15, |
92 | 101 | },
|
93 | 102 | kids: [
|
94 | 103 | {
|
95 | 104 | data: {
|
96 |
| - department: 'HR', |
97 |
| - supervisor: 'Isidor Bristol', |
| 105 | + department: "HR", |
| 106 | + supervisor: "Isidor Bristol", |
98 | 107 | floor: 1,
|
99 |
| - employees: 15 |
| 108 | + employees: 15, |
100 | 109 | },
|
101 | 110 | kids: [
|
102 | 111 | {
|
103 | 112 | data: {
|
104 |
| - name: 'Klement Nikodemos', |
105 |
| - phone: '+938462', |
106 |
| - hire_date: 'January 1, 2010', |
107 |
| - id: 3456 |
| 113 | + name: "Klement Nikodemos", |
| 114 | + phone: "+938462", |
| 115 | + hire_date: "January 1, 2010", |
| 116 | + id: 3456, |
108 | 117 | },
|
109 |
| - kids: [] |
| 118 | + kids: [], |
110 | 119 | },
|
111 | 120 | {
|
112 | 121 | data: {
|
113 |
| - name: 'Madhava Helmuth', |
114 |
| - phone: '+348902', |
115 |
| - hire_date: 'May 23, 2002', |
116 |
| - id: 1234 |
| 122 | + name: "Madhava Helmuth", |
| 123 | + phone: "+348902", |
| 124 | + hire_date: "May 23, 2002", |
| 125 | + id: 1234, |
117 | 126 | },
|
118 |
| - kids: [] |
| 127 | + kids: [], |
119 | 128 | },
|
120 | 129 | {
|
121 | 130 | data: {
|
122 |
| - name: 'Andria Jesse', |
123 |
| - phone: '456123', |
124 |
| - hire_date: 'October 23, 2011', |
125 |
| - id: 9821 |
| 131 | + name: "Andria Jesse", |
| 132 | + phone: "456123", |
| 133 | + hire_date: "October 23, 2011", |
| 134 | + id: 9821, |
126 | 135 | },
|
127 |
| - kids: [] |
128 |
| - } |
129 |
| - ] |
| 136 | + kids: [], |
| 137 | + }, |
| 138 | + ], |
130 | 139 | },
|
131 | 140 | {
|
132 | 141 | data: {
|
133 |
| - department: 'development', |
134 |
| - supervisor: 'Jim Linwood', |
| 142 | + department: "development", |
| 143 | + supervisor: "Jim Linwood", |
135 | 144 | floor: 2,
|
136 |
| - employees: 18 |
| 145 | + employees: 18, |
137 | 146 | },
|
138 | 147 | kids: [
|
139 | 148 | {
|
140 | 149 | data: {
|
141 |
| - name: 'Origenes Maxwell', |
142 |
| - phone: '345892', |
143 |
| - hire_date: 'February 1, 2004', |
144 |
| - id: 6234 |
| 150 | + name: "Origenes Maxwell", |
| 151 | + phone: "345892", |
| 152 | + hire_date: "February 1, 2004", |
| 153 | + id: 6234, |
145 | 154 | },
|
146 |
| - kids: [] |
147 |
| - } |
148 |
| - ] |
| 155 | + kids: [], |
| 156 | + }, |
| 157 | + ], |
149 | 158 | },
|
150 | 159 | {
|
151 | 160 | data: {
|
152 |
| - department: 'testing', |
153 |
| - supervisor: 'Zekeriya Seok', |
| 161 | + department: "testing", |
| 162 | + supervisor: "Zekeriya Seok", |
154 | 163 | floor: 4,
|
155 |
| - employees: 11 |
| 164 | + employees: 11, |
156 | 165 | },
|
157 |
| - kids: [] |
158 |
| - } |
159 |
| - ] |
| 166 | + kids: [], |
| 167 | + }, |
| 168 | + ], |
160 | 169 | },
|
161 | 170 | {
|
162 | 171 | data: {
|
163 |
| - name: 'b2', |
164 |
| - street: 's10', |
165 |
| - city: 'c2', |
| 172 | + name: "b2", |
| 173 | + street: "s10", |
| 174 | + city: "c2", |
166 | 175 | departments: 3,
|
167 |
| - offices: 10 |
| 176 | + offices: 10, |
168 | 177 | },
|
169 | 178 | kids: [
|
170 | 179 | {
|
171 | 180 | data: {
|
172 |
| - department: 'development', |
173 |
| - supervisor: 'Gallagher Howie', |
| 181 | + department: "development", |
| 182 | + supervisor: "Gallagher Howie", |
174 | 183 | floor: 8,
|
175 |
| - employees: 24 |
| 184 | + employees: 24, |
176 | 185 | },
|
177 | 186 | kids: [
|
178 | 187 | {
|
179 | 188 | data: {
|
180 |
| - name: 'Wat Dakota' |
| 189 | + name: "Wat Dakota", |
181 | 190 | },
|
182 |
| - kids: [] |
183 |
| - } |
184 |
| - ] |
| 191 | + kids: [], |
| 192 | + }, |
| 193 | + ], |
185 | 194 | },
|
186 | 195 | {
|
187 | 196 | data: {
|
188 |
| - department: 'testing', |
189 |
| - supervisor: 'Shirley Gayle', |
| 197 | + department: "testing", |
| 198 | + supervisor: "Shirley Gayle", |
190 | 199 | floor: 4,
|
191 |
| - employees: 11 |
| 200 | + employees: 11, |
192 | 201 | },
|
193 |
| - kids: [] |
194 |
| - } |
195 |
| - ] |
| 202 | + kids: [], |
| 203 | + }, |
| 204 | + ], |
196 | 205 | },
|
197 | 206 | {
|
198 | 207 | data: {
|
199 |
| - name: 'b3', |
200 |
| - street: 's3', |
201 |
| - city: 'c3', |
| 208 | + name: "b3", |
| 209 | + street: "s3", |
| 210 | + city: "c3", |
202 | 211 | departments: 2,
|
203 |
| - offices: 1 |
| 212 | + offices: 1, |
204 | 213 | },
|
205 | 214 | kids: [
|
206 | 215 | {
|
207 | 216 | data: {
|
208 |
| - department: 'development' |
| 217 | + department: "development", |
209 | 218 | },
|
210 | 219 | kids: [
|
211 | 220 | {
|
212 | 221 | data: {
|
213 |
| - name: 'Wat Dakota' |
| 222 | + name: "Wat Dakota", |
214 | 223 | },
|
215 |
| - kids: [] |
216 |
| - } |
217 |
| - ] |
| 224 | + kids: [], |
| 225 | + }, |
| 226 | + ], |
218 | 227 | },
|
219 |
| - {} |
220 |
| - ] |
| 228 | + {}, |
| 229 | + ], |
221 | 230 | },
|
222 | 231 | {
|
223 | 232 | data: {
|
224 |
| - name: 'b4', |
225 |
| - city: 'c4' |
| 233 | + name: "b4", |
| 234 | + city: "c4", |
226 | 235 | },
|
227 |
| - kids: [] |
228 |
| - } |
| 236 | + kids: [], |
| 237 | + }, |
229 | 238 | ];
|
230 | 239 |
|
231 | 240 | var dataInJson2 = [
|
232 | 241 | {
|
233 | 242 | data: {
|
234 |
| - date: '2018-08' |
| 243 | + date: "2018-08", |
235 | 244 | },
|
236 | 245 | kids: [
|
237 | 246 | {
|
238 | 247 | data: {
|
239 |
| - ' ': |
240 |
| - '<input type="checkbox" name="exampleCheckbox" value="exampleCheckbox">', |
241 |
| - img: |
242 |
| - '<img src=https:\/\/picsum.photos\/100\/100 width=20 \/>', |
| 248 | + " ": '<input type="checkbox" name="exampleCheckbox" value="exampleCheckbox">', |
| 249 | + img: "<img src=https:\/\/picsum.photos\/100\/100 width=20 \/>", |
243 | 250 | like: {
|
244 | 251 | value: 47,
|
245 |
| - cellClass: 'likeCell', |
246 |
| - headerClass: 'likeHeader' |
| 252 | + cellClass: "likeCell", |
| 253 | + headerClass: "likeHeader", |
247 | 254 | },
|
248 |
| - perf: { value: 130.55555555555554, cellClass: 'perf' }, |
249 |
| - date: '2018-08-30' |
| 255 | + perf: { value: 130.55555555555554, cellClass: "perf" }, |
| 256 | + date: "2018-08-30", |
250 | 257 | },
|
251 |
| - kids: [] |
| 258 | + kids: [], |
252 | 259 | },
|
253 | 260 | {
|
254 | 261 | data: {
|
255 |
| - ' ': |
256 |
| - '<input type="checkbox" name="exampleCheckbox2" value="exampleCheckbox2">', |
257 |
| - img: |
258 |
| - '<img src=https:\/\/picsum.photos\/100\/100 width=20 \/>', |
| 262 | + " ": '<input type="checkbox" name="exampleCheckbox2" value="exampleCheckbox2">', |
| 263 | + img: "<img src=https:\/\/picsum.photos\/100\/100 width=20 \/>", |
259 | 264 | like: 24,
|
260 | 265 | perf: 66.66666666666667,
|
261 |
| - date: '2018-08-31' |
| 266 | + date: "2018-08-31", |
262 | 267 | },
|
263 |
| - kids: [] |
264 |
| - } |
265 |
| - ] |
266 |
| - } |
| 268 | + kids: [], |
| 269 | + }, |
| 270 | + ], |
| 271 | + }, |
267 | 272 | ];
|
268 | 273 |
|
269 | 274 | var settings = {
|
270 | 275 | iDisplayLength: 20,
|
271 | 276 | bLengthChange: false,
|
272 | 277 | bFilter: false,
|
273 | 278 | bSort: false,
|
274 |
| - bInfo: false |
| 279 | + bInfo: false, |
275 | 280 | };
|
276 | 281 |
|
277 | 282 | var table = new nestedTables.TableHierarchy(
|
278 |
| - 'example', |
| 283 | + "example", |
279 | 284 | dataInJson,
|
280 | 285 | settings
|
281 | 286 | );
|
282 | 287 | table.initializeTableHierarchy();
|
283 | 288 |
|
284 | 289 | var table2 = new nestedTables.TableHierarchy(
|
285 |
| - 'example2', |
| 290 | + "example2", |
286 | 291 | dataInJson2,
|
287 | 292 | settings
|
288 | 293 | );
|
289 | 294 | table2.initializeTableHierarchy();
|
290 | 295 |
|
291 |
| - var tableEle = document.querySelector('#example .table'); |
292 |
| - tableEle.addEventListener('onShowChildHierarchy', function(e) { |
| 296 | + var tableEle = document.querySelector("#example .table"); |
| 297 | + tableEle.addEventListener("onShowChildHierarchy", function (e) { |
293 | 298 | console.log(e);
|
294 | 299 | });
|
295 |
| - tableEle.addEventListener('onHideChildHierarchy', function(e) { |
| 300 | + tableEle.addEventListener("onHideChildHierarchy", function (e) { |
296 | 301 | console.log(e);
|
297 | 302 | });
|
298 | 303 | </script>
|
@@ -624,8 +629,11 @@ <h2 id="exampleHeader2">
|
624 | 629 | <img
|
625 | 630 | src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQ0IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDE0NCAxMjgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+Cgk8cGF0aCBkPSJNMTMyLjczIDExLjQxYzE1LjAyNyAxNS4yMTYgMTUuMDI3IDM5Ljg5IDAgNTUuMTA3bC02LjI5OCA2LjM3M0w3MiAxMjhWMTcuMzU2bDYuMjk0LTUuOTQ1Qzg1LjgxIDMuODA1IDk1LjY2IDAgMTA1LjUxIDBjOS44NTIgMCAxOS43MDMgMy44MDMgMjcuMjIgMTEuNDF6bS0xMjEuNDYgMGMtMTUuMDI3IDE1LjIxNi0xNS4wMjcgMzkuODkgMCA1NS4xMDdsNi4yOTggNi4zNzNMNzIgMTI4VjE3LjM1NmwtNi4yOTQtNS45NDVDNTguMTkgMy44MDUgNDguMzQgMCAzOC40OSAwYy05Ljg1MiAwLTE5LjcwMyAzLjgwMy0yNy4yMiAxMS40MXoiIGZpbGw9IiNGRTYwNjAiIGZpbGwtcnVsZT0iZXZlbm9kZCIgLz4KPC9zdmc+Cg=="
|
626 | 631 | />
|
627 |
| - by <a href="http://andrejgajdos.com/">Andrej Gajdos</a> · Published |
628 |
| - under the <a href="http://opensource.org/licenses/MIT">MIT license</a> |
| 632 | + by <a href="http://andrejgajdos.com/">Andrej Gajdos</a> · |
| 633 | + <a href="https://notionapiconnector.com/">Notion Api Connector</a> · |
| 634 | + <a href="https://salesforcetonotion.com/">SalesforceToNotion</a> · |
| 635 | + Published under the |
| 636 | + <a href="http://opensource.org/licenses/MIT">MIT license</a> |
629 | 637 | </footer>
|
630 | 638 | </footer>
|
631 | 639 | </div>
|
|
0 commit comments