From 957e978e342f22f76a15f5655155e792223f2df1 Mon Sep 17 00:00:00 2001 From: jnga Date: Sat, 31 Oct 2020 09:38:55 -0400 Subject: [PATCH] Fix for D. Key Editor links no longer appearing on all D. Key admin pages. (see #679) It was only appearing on the main D. Key Admin page, not all of the sub-pages as seen in Production. --- gobotany/static/admin/admin_gb.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gobotany/static/admin/admin_gb.js b/gobotany/static/admin/admin_gb.js index 53a1cefe2..22ff56769 100644 --- a/gobotany/static/admin/admin_gb.js +++ b/gobotany/static/admin/admin_gb.js @@ -1,7 +1,8 @@ // Go Botany Admin: customizations -// Django assigns jQuery's $ to django.jQuery -django.jQuery(document).ready(function () { +// Django assigns jQuery's $ to django.jQuery, but in some cases +// it's not ready right away, so use a non-jQuery way to start. +document.addEventListener("DOMContentLoaded", function (event) { // Pagination: Go To Page customization (see pagination.html): @@ -39,5 +40,4 @@ django.jQuery(document).ready(function () { django.jQuery('#id_state').focus(); } } -}); - +}); \ No newline at end of file