@@ -136,19 +136,25 @@ class ContextNavigation {
136136 // Add a placeholder so flashes of text are not as significant
137137 const placeholder = new Placeholder ( ) ;
138138 this . el . after ( placeholder . $el ) ;
139- $ . ajax ( {
140- url : this . data . arclight . path ,
141- data : {
142- 'f[component_level_isim][]' : this . data . arclight . level ,
143- 'f[has_online_content_ssim][]' : this . data . arclight . access ,
144- 'f[collection_sim][]' : this . data . arclight . name ,
145- 'f[parent_ssi][]' : this . requestParent ,
146- search_field : this . data . arclight . search_field ,
147- original_parents : this . data . arclight . originalParents ,
148- original_document : this . originalDocument ,
149- view : 'collection_context'
150- }
151- } ) . done ( ( response ) => this . updateView ( response ) ) ;
139+
140+ const params = new URLSearchParams ( {
141+ 'f[component_level_isim][]' : this . data . arclight . level ,
142+ 'f[collection_sim][]' : this . data . arclight . name ,
143+ 'f[parent_ssi][]' : this . requestParent ,
144+ original_document : this . originalDocument ,
145+ view : 'collection_context'
146+ } ) ;
147+ if ( this . data . arclight . access ) {
148+ params . append ( 'f[has_online_content_ssim][]' , this . data . arclight . access ) ;
149+ }
150+ if ( this . data . arclight . search_field ) {
151+ params . append ( 'search_field' , this . data . arclight . search_field ) ;
152+ }
153+ this . data . arclight . originalParents ?. forEach ( ( value , i ) => params . append ( `original_parents[${ i } ]` , value ) ) ;
154+
155+ fetch ( this . data . arclight . path + '&' + params )
156+ . then ( ( response ) => response . text ( ) )
157+ . then ( ( data ) => this . updateView ( data ) ) ;
152158 }
153159
154160 /**
0 commit comments