From 25bd56739b887ad92d0f24ceff14bbeae6de5e73 Mon Sep 17 00:00:00 2001 From: Taka Date: Sat, 17 Apr 2021 09:18:55 +1000 Subject: [PATCH] Changed the timing of when the ASOP footer is linkify'ed. --- asl_rulebook2/webapp/static/NavPane.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/asl_rulebook2/webapp/static/NavPane.js b/asl_rulebook2/webapp/static/NavPane.js index 1d8d320..4063375 100644 --- a/asl_rulebook2/webapp/static/NavPane.js +++ b/asl_rulebook2/webapp/static/NavPane.js @@ -183,13 +183,15 @@ gMainApp.component( "nav-pane-asop", { created() { // get the ASOP footer - getURL( gGetASOPFooterUrl ).then( (resp) => { //eslint-disable-line no-undef - this.footer = resp ; - this.$nextTick( () => { - linkifyAutoRuleids( $( this.$refs.footer ) ) ; + gEventBus.on( "app-loaded", () => { + getURL( gGetASOPFooterUrl ).then( (resp) => { //eslint-disable-line no-undef + this.footer = resp ; + this.$nextTick( () => { + linkifyAutoRuleids( $( this.$refs.footer ) ) ; + } ) ; + } ).catch( (errorMsg) => { + console.log( "Couldn't get the ASOP footer: " + errorMsg ) ; } ) ; - } ).catch( (errorMsg) => { - console.log( "Couldn't get the ASOP footer: " + errorMsg ) ; } ) ; // open the appropriate chapter pane when the user clicks on an ASOP section search result