From 3b0195ba3a8473a0143fef2894e0da21461d6559 Mon Sep 17 00:00:00 2001 From: Joshua Kuestersteffen Date: Thu, 2 Sep 2021 12:35:04 -0500 Subject: [PATCH] Revert "See if anything magical happens when adding the dynamic URL listener" This reverts commit 68eb8f8a237740db136c12db60f9e95267b8cbe7. --- webapp/src/ts/services/enketo.service.ts | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/webapp/src/ts/services/enketo.service.ts b/webapp/src/ts/services/enketo.service.ts index 3bdb7dae025..3bcedd68222 100644 --- a/webapp/src/ts/services/enketo.service.ts +++ b/webapp/src/ts/services/enketo.service.ts @@ -296,7 +296,7 @@ export class EnketoService { window.history.replaceState({ enketo_page_number: 0 }, ''); this.overrideNavigationButtons(this.currentForm, wrapper); this.addPopStateHandler(this.currentForm, wrapper); - this.addDynamicUrlListener(); // TODO figure out if we need this new URL listener code... + // this.addDynamicUrlListener(); // TODO figure out if we need this new URL listener code... this.forceRecalculate(this.currentForm); this.setupNavButtons(wrapper, 0); return this.currentForm; @@ -688,18 +688,6 @@ export class EnketoService { } } - private dynamicUrlHandler() { - window.location.href = $(this).find('.url').text(); - } - - private addDynamicUrlListener() { - $(document.body).on('click', '.enketo a.dynamic-url', this.dynamicUrlHandler); - } - - private removeDynamicUrlListener() { - $(document.body).off('click', '.enketo a.dynamic-url', this.dynamicUrlHandler); - } - private saveGeo(geoHandle, docs) { if (!geoHandle) { return docs; @@ -756,7 +744,6 @@ export class EnketoService { unload(form) { $(window).off('.enketo-pagemode'); - this.removeDynamicUrlListener(); if (form) { form.resetView(); }