@@ -82,6 +82,10 @@ define(['cartutils','filterutils','tippy','jquery', 'base'], function(cartutils,
8282 } ) ;
8383 $ ( '#proj_table, #cases_tab, #studies_tab, #series_tab, #cart-table' ) . on ( 'draw.dt' , function ( ) {
8484 window . hide_spinner ( ) ;
85+ // Auto-width needing to be shut off at the table header level during draw time.
86+ $ ( this ) . children ( 'th' ) . each ( function ( ) {
87+ this . style . width = null ;
88+ } ) ;
8589 } ) ;
8690
8791 // Update the rows in the Projects Table, clear the other tables.
@@ -456,7 +460,6 @@ define(['cartutils','filterutils','tippy','jquery', 'base'], function(cartutils,
456460 } ) ;
457461 }
458462
459-
460463 window . getProjectCartStats = function ( projidArr ) {
461464 var parsedFiltObj = filterutils . parseFilterObj ( ) ;
462465 parsedFiltObj . collection_id = projidArr ;
@@ -756,13 +759,13 @@ define(['cartutils','filterutils','tippy','jquery', 'base'], function(cartutils,
756759 updatePromise . reject ( ) ;
757760 }
758761
759- $ ( '#cases_tab' ) . on ( 'draw.dt' , function ( ) {
760- $ ( '#cases_table_head' ) . children ( 'tr' ) . children ( ) . each ( function ( ) {
761- this . style . width = null ;
762- }
763- ) ;
762+ // Remove autowidthing from the table header, which is reapplied any time it's created
763+ $ ( '#cases_table_head' ) . children ( 'tr' ) . children ( ) . each ( function ( ) {
764+ this . style . width = null ;
764765 } ) ;
766+
765767 $ ( '#cases_tab' ) . find ( 'tbody' ) . attr ( 'id' , 'cases_table' ) ;
768+
766769 $ ( '#cases_panel' ) . find ( '.dataTables_controls' ) . find ( '.dataTables_length' ) . after (
767770 '<div class="dataTables_goto_page"><label>Page </label><input class="goto-page-number" '
768771 + 'type="number"><button onclick="changePage(\'cases_tab_wrapper\')">Go</button></div>'
@@ -1129,12 +1132,9 @@ define(['cartutils','filterutils','tippy','jquery', 'base'], function(cartutils,
11291132 updatePromise . reject ( ) ;
11301133 }
11311134
1132- $ ( '#studies_tab' ) . on ( 'draw.dt' , function ( ) {
1133- $ ( '#studies_table_head' ) . children ( 'tr' ) . children ( ) . each ( function ( ) {
1134- this . style . width = null ;
1135- }
1136- ) ;
1137- } )
1135+ $ ( '#studies_table_head' ) . children ( 'tr' ) . children ( ) . each ( function ( ) {
1136+ this . style . width = null ;
1137+ } ) ;
11381138
11391139 $ ( '#studies_tab' ) . children ( 'tbody' ) . attr ( 'id' , 'studies_table' ) ;
11401140 $ ( '#studies_tab_wrapper' ) . find ( '.dataTables_controls' ) . find ( '.dataTables_length' ) . after (
@@ -1496,10 +1496,8 @@ define(['cartutils','filterutils','tippy','jquery', 'base'], function(cartutils,
14961496 updatePromise . reject ( ) ;
14971497 }
14981498
1499- $ ( '#series_tab' ) . on ( 'draw.dt' , function ( ) {
1500- $ ( '#series_table_head' ) . children ( 'tr' ) . children ( ) . each ( function ( ) {
1501- this . style . width = null ;
1502- } ) ;
1499+ $ ( '#series_table_head' ) . children ( 'tr' ) . children ( ) . each ( function ( ) {
1500+ this . style . width = null ;
15031501 } ) ;
15041502 $ ( '#series_tab' ) . children ( 'tbody' ) . attr ( 'id' , 'series_table' ) ;
15051503 $ ( '#series_tab_wrapper' ) . find ( '.dataTables_controls' ) . find ( '.dataTables_length' ) . after (
0 commit comments