[JavaScript] Switch from jQuery().ready() to pure JavaScript

After [1,2] were merged in openstack/requirements we get a new versions
of Sphinx and Docutils.  I don't fully understand why but these new
versions seem to alter the asynchronous loading behavior sych that when
event_timer.js is loaded the jQuery code hasn't been fully initialised.

This results in `$(document).ready(setup_timeline);` generating an
"uncaught ReferenceError: $ is not defined" JS error.  We don't
actually need jQuery just a way to detect that the page is loaded to
update the event table.

This change switches to pure JS to set an onload() function.

[1] https://review.opendev.org/c/openstack/requirements/+/891751
[2] https://review.opendev.org/c/openstack/requirements/+/891694

Change-Id: Ia44a55cb7a32fb6ddf9f05ac77bb56921cef446a
This commit is contained in:
Tony Breeds 2023-08-28 17:26:14 -07:00
parent 0c17dc92c2
commit 4fdb2016a3

View File

@ -64,4 +64,4 @@ function setup_timeline() {
document.getElementById('eventname').innerHTML = next_events.join(" and ") + ' start in';
}
}
$(document).ready(setup_timeline);
window.onload = function () { setup_timeline() }