From 4fd27d1455762ce74b9477dd30b4eb5438a440a1 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Wed, 28 Jul 2010 12:57:34 +0000 Subject: [PATCH] IETF 78 code from Adam Roach: Make the selectable WG agenda feature of the datatracker IETF Agenda less resource intensive by only loading WG agendas when we know they are used in the page. - Legacy-Id: 2444 --- ietf/meeting/views.py | 2 +- ietf/templates/meeting/agenda.html | 29 +++++++++++++++++++++-------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/ietf/meeting/views.py b/ietf/meeting/views.py index 709a45ba9..9fcb4206f 100644 --- a/ietf/meeting/views.py +++ b/ietf/meeting/views.py @@ -98,7 +98,7 @@ def html_agenda(request, num=None): timeslots, update, meeting, venue, ads, plenaryw_agenda, plenaryt_agenda = agenda_info(num) wgs = IETFWG.objects.filter(status=IETFWG.ACTIVE).order_by('group_acronym__acronym') rgs = IRTF.objects.all().order_by('acronym') - areas = Area.objects.filter(status=Area.ACTIVE).order_by('area_acronym') + areas = Area.objects.filter(status=Area.ACTIVE).order_by('area_acronym__acronym') if settings.SERVER_MODE != 'production' and '_testiphone' in request.REQUEST: user_agent = "iPhone" diff --git a/ietf/templates/meeting/agenda.html b/ietf/templates/meeting/agenda.html index 73c5ccf27..3c4a84bb5 100644 --- a/ietf/templates/meeting/agenda.html +++ b/ietf/templates/meeting/agenda.html @@ -101,6 +101,12 @@ img.hidden { display: none; } if (re.test(rows[i].id) || (hidenone && rows[i].className == 'grouprow')) { rows[i].style.display="table-row"; + if (rows[i].className == 'groupagenda') + { + var iframe = rows[i].firstElementChild.nextElementSibling.firstElementChild; + iframe.setAttribute("src",iframe.getAttribute("xsrc")); + r(iframe); + } } else { @@ -115,13 +121,12 @@ img.hidden { display: none; } /* Resizes an IFRAME to fit its contents */ function r(obj) { - /* This can't work until we move the agendas into the datatracker.ietf.org - domain -- we can't query the height of a document from another domain. */ - - /* - docHeight = obj.contentWindow.document.height; - obj.style.height = (docHeight + 20) * 1.05 + "px" - */ + try + { + docHeight = obj.contentWindow.document.height; + obj.style.height = (docHeight + 20) * 1.05 + "px" + } + catch (e) {} } function toggle(selection) @@ -197,6 +202,7 @@ You can customize the agenda below to show only selected working group sessions. {% for area in area_list %}
{{area.area_acronym|upper}}
{% endfor %} +
IRTF
@@ -209,6 +215,13 @@ You can customize the agenda below to show only selected working group sessions. {% endfor %} {% endfor %} + + + {% for rg in rg_list %} +
{{rg|lower}}
+ {% endfor %} + + @@ -271,7 +284,7 @@ You can customize the agenda below to show only selected working group sessions. {% if session.info.agenda_file %} - + {% else %} No Agenda Submitted {% endif %}