Skip to content
This repository was archived by the owner on Aug 20, 2023. It is now read-only.

Commit 4a1848b

Browse files
committed
style(framework): for docs
1 parent a371416 commit 4a1848b

File tree

6 files changed

+52
-21
lines changed

6 files changed

+52
-21
lines changed

frameworks/keyed/modern-helpers-template/src/index.js

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,32 @@ function _random(max) {
55
}
66

77
//#region template
8-
const rowTemplate = new Template('tr', { classList: [["danger", part('selected')]]}, [
9-
['td', {classList: 'col-md-1'}, [part('id')]],
10-
['td', {classList: 'col-md-4'}, [
11-
['a', {classList: 'lbl'}, [part('label')]]
12-
]],
13-
['td', {classList: 'col-md-1'}, [
14-
['a', {classList: 'remove'}, [
15-
['span', {
16-
classList: 'remove glyphicon glyphicon-remove',
17-
attributes: [['aria-hidden', 'true']]
18-
}]
8+
const rowTemplate = new Template(
9+
'tr',
10+
{
11+
classList: [
12+
[ "danger", part('selected') ]
13+
]
14+
}, [
15+
['td', { classList: 'col-md-1' }, [
16+
part('id')
17+
]],
18+
['td', { classList: 'col-md-4' }, [
19+
['a', {classList: 'lbl'}, [
20+
part('label')
1921
]]
20-
]],
21-
['td', {classList: 'col-md-6'}]
22-
]);
22+
]],
23+
['td', { classList: 'col-md-1' }, [
24+
['a', { classList: 'remove' }, [
25+
['span', {
26+
classList: 'remove glyphicon glyphicon-remove',
27+
attributes: [['aria-hidden', 'true']]
28+
}]
29+
]]
30+
]],
31+
['td', {classList: 'col-md-6'}]
32+
]
33+
);
2334
//#endregion template
2435

2536
class Store {

frameworks/keyed/vanillajs-innerhtml-cpnt/src/Main.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ class Main {
177177
update() {
178178
this.store.update();
179179
for (let i=0;i<this.data.length;i+=10) {
180-
this.rows[i].setLabel(this.store.data[i].label);
180+
this.rows[i]
181+
.setLabel(this.store.data[i].label);
181182
}
182183
}
183184
//#endregion update
@@ -307,10 +308,15 @@ class Main {
307308
tr.innerHTML = `
308309
<td class='col-md-1'>${data.id}</td>
309310
<td class='col-md-4'>
310-
<a class='lbl'>${data.label}</a>
311+
<a class='lbl'>${data.label}</a>
311312
</td>
312313
<td class='col-md-1'>
313-
<a class='remove'><span class='remove glyphicon glyphicon-remove' aria-hidden='true'></span></a>
314+
<a class='remove'>
315+
<span
316+
class='remove glyphicon glyphicon-remove'
317+
aria-hidden='true'
318+
></span>
319+
</a>
314320
</td>
315321
<td class='col-md-6'></td>
316322
`;

frameworks/keyed/vanillajs-innerhtml/src/Main.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,12 @@ class Main {
308308
<a class='lbl'>${data.label}</a>
309309
</td>
310310
<td class='col-md-1'>
311-
<a class='remove'><span class='remove glyphicon glyphicon-remove' aria-hidden='true'></span></a>
311+
<a class='remove'>
312+
<span
313+
class='remove glyphicon glyphicon-remove'
314+
aria-hidden='true'
315+
></span>
316+
</a>
312317
</td>
313318
<td class='col-md-6'></td>
314319
`;

frameworks/keyed/vanillajs-no-mem-query/src/Main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ class Main {
175175
update() {
176176
this.store.update();
177177
for (let i=0;i<this.data.length;i+=10) {
178-
this.tbody.querySelector(`tr:nth-child(${i+1}) .lbl`).innerText = this.store.data[i].label;
178+
this.tbody
179+
.querySelector(`tr:nth-child(${i+1}) .lbl`)
180+
.innerText = this.store.data[i].label;
179181
}
180182
}
181183
//#endregion update

frameworks/keyed/vanillajs-no-mem/src/Main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ class Main {
175175
update() {
176176
this.store.update();
177177
for (let i=0;i<this.data.length;i+=10) {
178-
this.tbody.children[i].children[1].children[0].innerText = this.store.data[i].label;
178+
this.tbody
179+
.children[i].children[1].children[0]
180+
.innerText = this.store.data[i].label;
179181
}
180182
}
181183
//#endregion update

frameworks/keyed/vanillajs-prog/src/Main.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ const el = (type) => (className) => {
1414
const a = el('a');
1515

1616
const rowTemplate = (() => {
17-
const cells = [ 'col-md-1', 'col-md-4', 'col-md-1', 'col-md-6' ].map(el('td'));
17+
const cells = [
18+
'col-md-1',
19+
'col-md-4',
20+
'col-md-1',
21+
'col-md-6'
22+
].map(el('td'));
1823

1924
cells[1].appendChild(a('lbl'));
2025

0 commit comments

Comments
 (0)