File tree 1 file changed +30
-4
lines changed
1 file changed +30
-4
lines changed Original file line number Diff line number Diff line change 2
2
< html >
3
3
< head >
4
4
< title > streetmerchant control</ title >
5
+ < style >
6
+ body {
7
+ background-color : # 222 ;
8
+ color : # DDD ;
9
+ font-family : sans-serif;
10
+ }
11
+ a {
12
+ color : aquamarine;
13
+ }
14
+ table th {
15
+ width : 25vw ;
16
+ cursor : pointer;
17
+ background-color : # 444 ;
18
+ }
19
+ </ style >
5
20
< script type ="text/javascript ">
6
21
let config ;
7
22
let brands ;
135
150
136
151
await loadScreenshots ( ) ;
137
152
}
153
+
154
+ function selectAll ( element , columnId ) {
155
+ const list = document . querySelectorAll ( "#" + columnId + " input" ) ;
156
+ const checked = [ ...list ] . filter ( el => el . checked ) . length ;
157
+ const newValue = ( checked == list . length ) ? false : true ;
158
+
159
+ for ( const htmlElement of list ) {
160
+ htmlElement . checked = newValue ;
161
+ }
162
+ }
163
+
138
164
</ script >
139
165
</ head >
140
166
< body onload ="loadInitial(); ">
141
167
< table >
142
168
< tr >
143
- < th > Stores</ th >
144
- < th > Brands</ th >
145
- < th > Series</ th >
146
- < th > Models</ th >
169
+ < th onclick =" selectAll(this, 'storeList'); " > Stores</ th >
170
+ < th onclick =" selectAll(this, 'brandList'); " > Brands</ th >
171
+ < th onclick =" selectAll(this, 'seriesList'); " > Series</ th >
172
+ < th onclick =" selectAll(this, 'modelList'); " > Models</ th >
147
173
</ tr >
148
174
< tr >
149
175
< td valign ="top " id ="storeList "> </ td >
You can’t perform that action at this time.
0 commit comments