about summary refs log tree commit diff
path: root/gn2/wqflask/templates/gn_editor_results_page.html
diff options
context:
space:
mode:
authorAlexander_Kabui2024-09-13 14:00:15 +0300
committerAlexander_Kabui2024-09-13 14:00:15 +0300
commitd17010dfcd1cdb020619478120eefaeac04ed44d (patch)
tree87152db91b63f7c83c9b793cba9a7fde5c3e1059 /gn2/wqflask/templates/gn_editor_results_page.html
parentaab7de0af39b6657cccf6bde89a78022efab3397 (diff)
downloadgenenetwork2-d17010dfcd1cdb020619478120eefaeac04ed44d.tar.gz
Update data if new changes are made.
Diffstat (limited to 'gn2/wqflask/templates/gn_editor_results_page.html')
-rw-r--r--gn2/wqflask/templates/gn_editor_results_page.html17
1 files changed, 13 insertions, 4 deletions
diff --git a/gn2/wqflask/templates/gn_editor_results_page.html b/gn2/wqflask/templates/gn_editor_results_page.html
index 666bd432..6eaeb941 100644
--- a/gn2/wqflask/templates/gn_editor_results_page.html
+++ b/gn2/wqflask/templates/gn_editor_results_page.html
@@ -37,10 +37,19 @@
 </section>
 {% block js %}
     <script>
-  var commitSha = "{{ commit_sha }}";
-  if (commitSha !="" && commitSha!= undefined){
-      localStorage.setItem("gn_editor_sha", commitSha)
-  }
+      var commitSha = "{{ commit_sha }}";
+      if (commitSha !="" && commitSha!= undefined){
+	  prev_commit = localStorage.getItem("gn_editor_sha")
+          localStorage.setItem("gn_editor_sha", commitSha)
+	  if (prev_commit !=  commitSha) {
+	      //update the contennt
+      htmx.find("#output").dispatchEvent(
+          new CustomEvent("updateDataEvent", {
+              bubbles: true,
+              detail: {},
+          }),
+      );
+   }}
 
     </script>
 {% endblock %}