From 147f019798af5b4a075dcdda52a1348da66098af Mon Sep 17 00:00:00 2001
From: Henrik Askjer <henrik.askjer@uib.no>
Date: Mon, 3 Jan 2022 14:06:44 +0100
Subject: [PATCH] debug

---
 src/components/Article.vue        |  2 ++
 src/components/CompoundList.vue   |  1 +
 src/components/DefElement.vue     |  1 +
 src/components/Definition.vue     |  1 +
 src/components/DictionaryView.vue | 10 +++++++++-
 5 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/components/Article.vue b/src/components/Article.vue
index d5cbbb52..c6175402 100644
--- a/src/components/Article.vue
+++ b/src/components/Article.vue
@@ -198,9 +198,11 @@ export default {
       this.collapsed = true
     },
     article_link_click: function(item) {
+      console.log("LINK CLICK ARTIClE")
       this.$emit('article-click', item)
     },
     details_click: function(item) {
+      console.log("DETAILS ARTICLE")
       item.title_id = this.title_id
       this.$emit('details-click', item)
     }
diff --git a/src/components/CompoundList.vue b/src/components/CompoundList.vue
index fd02c852..9293e7d8 100644
--- a/src/components/CompoundList.vue
+++ b/src/components/CompoundList.vue
@@ -28,6 +28,7 @@ export default {
   },
   methods: {
     article_link_click: function(item) {
+      console.log("COMPOUND")
       this.$emit('article-click', item)
     }
   }
diff --git a/src/components/DefElement.vue b/src/components/DefElement.vue
index 20a2491c..34b224bf 100644
--- a/src/components/DefElement.vue
+++ b/src/components/DefElement.vue
@@ -94,6 +94,7 @@ export default {
   },
   methods: {
     article_link_click: function(item) {
+      console.log("DEFELEMENT LINK", item)
       this.$emit('article-click', item)
     },
     roman_hgno: helpers.roman_hgno
diff --git a/src/components/Definition.vue b/src/components/Definition.vue
index 9959162f..8ab55dd5 100644
--- a/src/components/Definition.vue
+++ b/src/components/Definition.vue
@@ -66,6 +66,7 @@ var Definition = {
   },
   methods: {
     article_link_click: function(item) {
+      console.log("DEF LINK")
       this.$emit('article-click', item)
     },
     has_article_ref: function(item){
diff --git a/src/components/DictionaryView.vue b/src/components/DictionaryView.vue
index 47484a9f..913d7806 100644
--- a/src/components/DictionaryView.vue
+++ b/src/components/DictionaryView.vue
@@ -428,16 +428,20 @@ export default {
       },
 
     article_link_click: function(item) {
+      console.log("ARTICLE DICT")
       if (this.article && this.article.article_id == item.article_id){
         this.article_key++
         this.replace_history()
+        console.log("ARTICLE LINK A")
 
       }else{
+        console.log("ARTICLE LINK B")
         navigate_to_article(this, item.source)
       }
     },
     details_click: function(item) {
       this.article = item.article
+      console.log("DETAILS DICT")
       this.replace_history()
     },
     return_to_results: function() {
@@ -508,7 +512,10 @@ export default {
       if (to.fullPath == "/") {        
         this.load_monthly_bm()
         this.load_monthly_nn()
-
+      }
+      if (to.name == 'lookup') {
+        console.log("TO LOOKUP")
+        console.log(this)
       }
     }
   },
@@ -516,6 +523,7 @@ export default {
     let self = this
     window.onpopstate = function (event) {
       if (event.state) {
+        console.log("POP")
         self.article = event.state.article
         self.search_results = event.state.search_results
         self.lang = event.state.lang
-- 
GitLab