File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
sde_indexing_helper/static/js Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 11let table = $ ( '#collection_table' ) . DataTable ( {
22 "order" : [ [ 0 , 'asc' ] ] ,
33 "paging" : false ,
4+ "stateSave" : true ,
45 "dom" : 'BPfritip' ,
56 "select" : true ,
67 "buttons" : [
@@ -122,9 +123,18 @@ function handleCurationStatusSelect() {
122123 7 : "btn-info" ,
123124 8 : "btn-secondary" ,
124125 }
125- $ ( `#curation-status-button-${ collection_id } ` ) . text ( curation_status_text ) ;
126- $ ( `#curation-status-button-${ collection_id } ` ) . removeClass ( 'btn-light btn-danger btn-warning btn-info btn-success btn-primary' ) ;
127- $ ( `#curation-status-button-${ collection_id } ` ) . addClass ( color_choices [ curation_status ] ) ;
126+
127+ $possible_buttons = $ ( 'body' ) . find ( `[id="curation-status-button-${ collection_id } "]` ) ;
128+ if ( $possible_buttons . length > 1 ) {
129+ $button = $possible_buttons [ 1 ] ;
130+ $button = $ ( $button ) ;
131+ } else {
132+ $button = $ ( `#curation-status-button-${ collection_id } ` ) ;
133+ }
134+ $button . text ( curation_status_text ) ;
135+ $button . removeClass ( 'btn-light btn-danger btn-warning btn-info btn-success btn-primary btn-secondary' ) ;
136+ $button . addClass ( color_choices [ parseInt ( curation_status ) ] ) ;
137+ $ ( '#collection_table' ) . DataTable ( ) . searchPanes . rebuildPane ( 6 ) ;
128138
129139 postCurationStatus ( collection_id , curation_status ) ;
130140 } ) ;
You can’t perform that action at this time.
0 commit comments