@@ -323,63 +323,6 @@ export class GttClient {
323
323
this . map . on ( 'moveend' , this . updateFilter . bind ( this ) )
324
324
} )
325
325
326
- // To fix an issue with empty map after changing the tracker type
327
- document . querySelectorAll ( 'select#issue_tracker_id' ) . forEach ( element => {
328
- const self = this
329
- element . addEventListener ( 'change' , ( ) => {
330
- // https://stackoverflow.com/questions/45340281/ajaxcomplete-in-pure-javascript
331
- ( function ( ) {
332
- const send = XMLHttpRequest . prototype . send
333
- XMLHttpRequest . prototype . send = function ( ) {
334
- this . addEventListener ( 'load' , ( ) => {
335
- self . zoomToExtent ( true )
336
- } , {
337
- once : true
338
- } )
339
- return send . apply ( this , arguments )
340
- }
341
- } ) ( )
342
- } )
343
- } )
344
-
345
- // To fix an issue with empty map after changing the status
346
- document . querySelectorAll ( 'select#issue_status_id' ) . forEach ( element => {
347
- const self = this
348
- element . addEventListener ( 'change' , ( ) => {
349
- // https://stackoverflow.com/questions/45340281/ajaxcomplete-in-pure-javascript
350
- ( function ( ) {
351
- const send = XMLHttpRequest . prototype . send
352
- XMLHttpRequest . prototype . send = function ( ) {
353
- this . addEventListener ( 'load' , ( ) => {
354
- self . zoomToExtent ( true )
355
- } , {
356
- once : true
357
- } )
358
- return send . apply ( this , arguments )
359
- }
360
- } ) ( )
361
- } )
362
- } )
363
-
364
- // To fix an issue with empty map after changing the project
365
- document . querySelectorAll ( 'select#issue_project_id' ) . forEach ( element => {
366
- const self = this
367
- element . addEventListener ( 'change' , ( ) => {
368
- // https://stackoverflow.com/questions/45340281/ajaxcomplete-in-pure-javascript
369
- ( function ( ) {
370
- const send = XMLHttpRequest . prototype . send
371
- XMLHttpRequest . prototype . send = function ( ) {
372
- this . addEventListener ( 'load' , ( ) => {
373
- self . zoomToExtent ( true )
374
- } , {
375
- once : true
376
- } )
377
- return send . apply ( this , arguments )
378
- }
379
- } ) ( )
380
- } )
381
- } )
382
-
383
326
// Handle multiple maps per page
384
327
this . maps . push ( this . map )
385
328
}
@@ -1357,7 +1300,7 @@ const buildDistanceFilterRow = (operator: any, values: any):void => {
1357
1300
window . replaceIssueFormWithInitMap = window . replaceIssueFormWith
1358
1301
window . replaceIssueFormWith = ( html ) => {
1359
1302
window . replaceIssueFormWithInitMap ( html )
1360
- const ol_maps = document . querySelector ( 'div#update div.ol-map' ) as HTMLDivElement
1303
+ const ol_maps = document . querySelector ( "form[class$='_issue'] div.ol-map" ) as HTMLDivElement
1361
1304
if ( ol_maps ) {
1362
1305
new GttClient ( { target : ol_maps } )
1363
1306
}
0 commit comments