Changed how footnotes are cleared before showing a target.

master
Pacman Ghost 3 years ago
parent fe8ef25735
commit fc6776ca29
  1. 8
      asl_rulebook2/webapp/static/MainApp.js
  2. 3
      asl_rulebook2/webapp/static/SearchResult.js

@ -1,4 +1,4 @@
import { getJSON, showErrorMsg, showNotificationMsg } from "./utils.js" ;
import { getJSON, showErrorMsg, showNotificationMsg, hideFootnotes } from "./utils.js" ;
// parse any URL parameters
export let gUrlParams = new URLSearchParams( window.location.search.substring(1) ) ;
@ -38,6 +38,12 @@ gMainApp.component( "main-app", {
<div v-if=isLoaded id="_mainapp-loaded_" />
`,
created() {
gEventBus.on( "show-target", () => {
hideFootnotes() ;
} ) ;
},
mounted() {
// initialize the splitter

@ -1,5 +1,5 @@
import { gMainApp, gContentDocs, gEventBus, gAppConfig } from "./MainApp.js" ;
import { findTargets, getPrimaryTarget, isRuleid, getChapterResource, fixupSearchHilites, hasHilite, hideFootnotes } from "./utils.js" ;
import { findTargets, getPrimaryTarget, isRuleid, getChapterResource, fixupSearchHilites, hasHilite } from "./utils.js" ;
// --------------------------------------------------------------------
@ -200,7 +200,6 @@ gMainApp.component( "ruleid", {
methods: {
onClick() {
// show the target
hideFootnotes() ;
gEventBus.emit( "show-target", this.cdocId, this.ruleid ) ;
},
},

Loading…
Cancel
Save