Skip to content

Commit

Permalink
Revert "See if anything magical happens when adding the dynamic URL l…
Browse files Browse the repository at this point in the history
…istener"

This reverts commit 68eb8f8.
  • Loading branch information
jkuester committed Sep 2, 2021
1 parent 0f17b49 commit 3b0195b
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions webapp/src/ts/services/enketo.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -756,7 +744,6 @@ export class EnketoService {

unload(form) {
$(window).off('.enketo-pagemode');
this.removeDynamicUrlListener();
if (form) {
form.resetView();
}
Expand Down

0 comments on commit 3b0195b

Please sign in to comment.