@@ -57,10 +57,12 @@ require([
5757
5858 tippy ( '.manifest-size-warning' , {
5959 content : 'Your cohort is too large to be downloaded in its entirety, and will be truncated at 65,000 records ' +
60- 'ordered by PatientID, StudyID, SeriesID, and InstanceID.' ,
60+ 'ordered by PatientID, CollectionID, StudyInstanceUID, SeriesInstanceUID, SOPInstanceUID, SourceDOI, ' +
61+ 'CRDCInstanceUUID, and GCSPath.' ,
6162 theme : 'light' ,
6263 placement : 'left' ,
63- arrow : false
64+ arrow : false ,
65+ maxWidth : 400
6466 } ) ;
6567
6668 var downloadToken = new Date ( ) . getTime ( ) ;
@@ -77,6 +79,18 @@ require([
7779 download_manifest ( "json" , $ ( this ) , e )
7880 } ) ;
7981
82+ $ ( '.export-option input[type="radio"]' ) . click ( function ( ) {
83+ update_export_option ( $ ( this ) . attr ( "value" ) ) ;
84+ } ) ;
85+
86+ var update_export_option = function ( export_option ) {
87+ $ ( '#bq-manifest' ) . hide ( ) ;
88+ $ ( '#file-manifest' ) . hide ( ) ;
89+ $ ( '#' + export_option ) . show ( ) ;
90+ } ;
91+
92+ update_export_option ( "file-manifest" ) ;
93+
8094 var download_manifest = function ( file_type , clicked_button , e ) {
8195 $ ( '#unallowed-chars-alert' ) . hide ( ) ;
8296 $ ( '#name-too-long-alert-modal' ) . hide ( ) ;
@@ -144,13 +158,24 @@ require([
144158 }
145159 } ) ;
146160
161+ var include_header = $ ( '#include-header-checkbox' ) [ 0 ] . checked ;
162+
147163 var url = BASE_URL + '/cohorts/download_manifest/' + cohort_id + '/' ;
148164 url += ( "?file_type=" + file_type ) ;
165+ url += ( "&include_header=" + include_header ) ;
149166 url += ( "&file_name=" + name ) ;
150167 url += ( "&header_fields=" + JSON . stringify ( checked_fields ) ) ;
151168 url += ( "&columns=" + JSON . stringify ( checked_columns ) ) ;
152169 url += ( "&downloadToken=" + downloadToken ) ;
153170
171+ var select_box_div = $ ( '#file-part-select-box' ) ;
172+ var select_box = select_box_div . find ( 'select' ) ;
173+ if ( select_box_div . is ( ":visible" ) )
174+ {
175+ var selected_file_part = select_box . children ( "option:selected" ) . val ( ) ;
176+ url += ( "&file_part=" + selected_file_part ) ;
177+ }
178+
154179 location . href = url ;
155180 } ;
156181
0 commit comments