datatracker/ietf/templates/meeting/week-view.html
Jennifer Richards 4a5583845e
fix(ui): import moment.js library with moment-timezone support in wrapper (#3977)
* fix: import moment.js library with moment-timezone support in wrapper

Packaging changes broke the mechanism used to make moment.tz available
to javascript code. This eliminates the separate moment.js and
moment-timezone-with-data-10-year-range.js wrappers and instead
imports the timezone-augmented version directly. This provides both
the timezone support and the regular moment features.

* refactor: put moment on window instead of global for consistency
2022-05-18 09:23:07 -05:00

40 lines
1.6 KiB
HTML

{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load static %}
{# FIXME: the weekview only renders correctly in quirks mode, i.e., not in HTML5 with "<!DOCTYPE html>" in the next line; it should be rewritten with fullcalendar #}
{# <!DOCTYPE html> #}
<html lang="en">
{% origin %}
<head>
<title>Weekview</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="{% static 'ietf/js/agenda_filter.js' %}"></script>
<script src="{% static 'ietf/js/moment.js' %}"></script>
<script src="{% static 'ietf/js/week-view.js' %}"></script>
<script>
var all_items = {{ items | safe }};
//===========================================================================
// Set up events for drawing the calendar
function redraw_weekview() {
var query_params = agenda_filter.parse_query_params(window.location.search);
var timezone_name = query_params.tz || 'utc';
items = prepare_items(all_items, timezone_name);
draw_calendar(items, agenda_filter.get_filter_params(query_params));
}
window.addEventListener("resize", redraw_weekview, false);
window.addEventListener("load", redraw_weekview, false);
window.addEventListener("hashchange", redraw_weekview, false);
</script>
</head>
<body>
<p>
Error loading calendar.
</p>
</body>
</html>