File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -366,4 +366,15 @@ div.dataTables_scrollHead th:first-child {
366366 padding : 14px ;
367367 text-align : center;
368368 color : # ffffff ;
369+ }
370+
371+ /* Modify the colvis column-visibility and -grouping buttons */
372+ .buttons-colvis {
373+ padding-right : 10px ;
374+ padding-left : 10px ;
375+ }
376+
377+ .buttons-colvisGroup {
378+ padding-right : 10px ;
379+ padding-left : 10px ;
369380}
Original file line number Diff line number Diff line change @@ -245,14 +245,24 @@ class AboutCodeDataTable {
245245 . map ( ( column ) => `${ column . name } :name` )
246246 } ,
247247 {
248+ // Show only package columns
248249 extend : "colvisGroup" ,
249- text : "Show all columns" ,
250+ text : "Package info" ,
251+ show : AboutCodeDataTable . PACKAGE_GROUP
252+ . map ( ( column ) => `${ column . name } :name` ) ,
253+ hide : AboutCodeDataTable . TABLE_COLUMNS
254+ . filter ( ( column ) => AboutCodeDataTable . PACKAGE_GROUP . indexOf ( column ) < 0 )
255+ . map ( ( column ) => `${ column . name } :name` )
256+ } ,
257+ {
258+ extend : "colvisGroup" ,
259+ text : "Show all" ,
250260 show : ":hidden"
251261 } ,
252262 {
253263 // Hide all columns except Path
254264 extend : "colvisGroup" ,
255- text : "Hide all columns " ,
265+ text : "Hide all" ,
256266 show : AboutCodeDataTable . LOCATION_COLUMN
257267 . map ( ( column ) => `${ column . name } :name` ) ,
258268 hide : AboutCodeDataTable . TABLE_COLUMNS
@@ -298,6 +308,11 @@ class AboutCodeDataTable {
298308 return AboutCodeDataTable . LOCATION_COLUMN
299309 . concat ( AboutCodeDataTable . ORIGIN_COLUMNS ) ;
300310 }
311+
312+ static get PACKAGE_GROUP ( ) {
313+ return AboutCodeDataTable . LOCATION_COLUMN
314+ . concat ( AboutCodeDataTable . PACKAGE_COLUMNS ) ;
315+ }
301316}
302317
303318AboutCodeDataTable . LOCATION_COLUMN =
You can’t perform that action at this time.
0 commit comments