Skip to content

Commit 9c567b6

Browse files
committed
Merged [2988] from adam@nostrum.com:
Adding ability to click on items in the week view to pull up the WG agenda. - Legacy-Id: 2989 Note: SVN reference [2988] has been migrated to Git commit 0027751
1 parent 7cacd75 commit 9c567b6

3 files changed

Lines changed: 117 additions & 6 deletions

File tree

changelog

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
ietfdb (3.14)
22

3+
* From lars.eggert@nokia.com:
4+
Update jQuery to 1.5.1 and jQuery UI to 1.8.11.
5+
6+
* From adam@nostrum.com:
7+
On the agenda page, for the custom agenda display, now only displays groups
8+
that are actually meeting.
9+
10+
* From lars.eggert@nokia.com:
11+
Remove unused images. Convert GIFs to smaller PNGs.
12+
Optimize all images with http://www.smushit.com/ysmush.it/
13+
14+
* From lars.eggert@nokia.com:
15+
Change default vertical alignment of various datatracker tables
16+
for better readability.
17+
318
* From peter.musgrave@magorcorp.com:
419
Fix typo. Fixes #566.
520

ietf/meeting/urls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
(r'^agenda/$', views.html_agenda),
99
(r'^agenda(?:.html)?$', views.html_agenda),
1010
(r'^agenda.txt$', views.text_agenda),
11+
(r'^agenda/agenda.ics$', views.ical_agenda),
1112
(r'^agenda.ics$', views.ical_agenda),
1213
(r'^agenda/week-view.html$', views.week_view),
1314
(r'^week-view.html$', views.week_view),

ietf/templates/meeting/week-view.html

Lines changed: 101 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
var items = new Array();
88
{% autoescape off %}
99
{% for slot in timeslots %}{% for session in slot.sessions %}
10-
items.push({day:{{slot.day_id}}, time:"{{slot.time_desc}}", time_id:{{slot.time_id}}, name:"{{session.acronym_name}}", wg:"{{session.acronym}}", area:"{{session.area}}", room:"{{session.room_id.room_name}}"});{% endfor %}{% endfor %}
10+
items.push({day:{{slot.day_id}}, time:"{{slot.time_desc}}", time_id:{{slot.time_id}}, name:"{{session.acronym_name}}", wg:"{{session.acronym}}", area:"{{session.area}}", room:"{{session.room_id.room_name}}", dayname:"{{ slot.meeting_date|date:"l"|upper }}, {{ slot.meeting_date|date:"F j, Y" }}"{% if session.agenda_file %}, agenda:"/meeting/{{session.agenda_file}}"{% endif %}});{% endfor %}{% endfor %}
1111
{% endautoescape %}
1212

1313
var fg = {
@@ -50,6 +50,9 @@
5050
var lastheight;
5151
var lastwidth;
5252

53+
var padding = 2;
54+
var border = 1;
55+
5356
setInterval("animate()",50);
5457

5558
function draw_calendar()
@@ -122,8 +125,6 @@
122125
var minute_height = (height - header_height)/num_minutes;
123126
var body = document.body;
124127
while (body.childNodes.length) { body.removeChild(body.childNodes[0]); }
125-
var padding = 2;
126-
var border = 1;
127128

128129
for (i = 0; i < num_days; i++)
129130
{
@@ -194,6 +195,7 @@
194195
//-----------------------------------------------------------------
195196
var resize_func = function(div,t,l,w,h,to_fit)
196197
{ return function(){resize(div,t,l,w,h,to_fit);} }
198+
var click_func = function (e) { return function(){handle_click(e);}}
197199

198200
for (i = 0; i < items.length; i++)
199201
{
@@ -252,6 +254,12 @@
252254

253255
e.onmouseout=resize_func(e,sess_top,sess_left,sess_width,sess_height,false);
254256

257+
if (items[i].agenda)
258+
{
259+
e.onclick=click_func(e);
260+
e.style.cursor="pointer";
261+
}
262+
255263
var div = document.createElement("div");
256264
div.appendChild(document.createTextNode(items[i].time));
257265
div.appendChild(document.createElement("br"));
@@ -275,9 +283,6 @@
275283
e.appendChild(div);
276284

277285
body.appendChild(e);
278-
279-
e=undefined;
280-
281286
}
282287
}
283288

@@ -338,18 +343,108 @@
338343
else
339344
{
340345
divlist.remove(i);
346+
if (div.callback)
347+
{
348+
var tmp = div.callback;
349+
div.callback = undefined;
350+
tmp();
351+
}
341352
}
342353
div.style.height = tmp;
343354
}
344355
else
345356
{
346357
divlist.remove(i);
358+
if (div.callback)
359+
{
360+
var tmp = div.callback;
361+
div.callback = undefined;
362+
tmp();
363+
}
347364
}
348365
}
349366
}
350367

351368
}
352369

370+
function finish_maximize(e)
371+
{
372+
if (!items[e.id].agenda)
373+
{
374+
return;
375+
}
376+
377+
var child = e.firstChild;
378+
379+
var tmp = e.style.height;
380+
e.style.removeProperty("height");
381+
var used_height = e.clientHeight;
382+
e.style.height = tmp;
383+
384+
var frame = document.createElement("iframe");
385+
frame.setAttribute("src",items[e.id].agenda);
386+
387+
frame.style.position = "absolute";
388+
frame.style.left = 8;
389+
frame.style.width = e.clientWidth - 16 - 2 * (padding + border);
390+
frame.style.top = used_height + 8;
391+
frame.style.height = e.clientHeight - used_height - 16 - 2*(padding+border);
392+
393+
frame.style.background = "#fff";
394+
frame.style.overflow="auto";
395+
frame.id="agenda";
396+
397+
frame.style.border = e.style.border;
398+
frame.style.borderWidth = border;
399+
frame.style.padding = padding;
400+
frame.style.borderColor = e.style.borderColor;
401+
e.appendChild(frame);
402+
}
403+
404+
function handle_click(e)
405+
{
406+
if (e.onmouseover)
407+
{
408+
e.oldmouseover = e.onmouseover;
409+
e.oldmouseout = e.onmouseout;
410+
e.onmouseover = undefined;
411+
e.onmouseout = undefined;
412+
413+
var callback_func = function (e) { return function(){finish_maximize(e);}}
414+
e.callback = callback_func(e);
415+
416+
resize(e,0,0,
417+
document.body.clientWidth-2*(padding + border),
418+
document.body.clientHeight-2*(padding + border));
419+
420+
421+
e.insertBefore(document.createElement("br"),e.firstChild);
422+
423+
var h = document.createElement("span");
424+
h.appendChild(document.createTextNode(items[e.id].dayname));
425+
h.style.fontWeight="bold";
426+
e.insertBefore(h,e.firstChild);
427+
e.style.fontSize="10pt";
428+
}
429+
else
430+
{
431+
var agenda = document.getElementById("agenda");
432+
if (agenda)
433+
{
434+
e.removeChild(agenda);
435+
}
436+
e.onmouseover = e.oldmouseover;
437+
e.onmouseout = e.oldmouseout;
438+
e.oldmouseover = undefined;
439+
e.oldmouseout = undefined;
440+
e.onmouseout();
441+
442+
e.removeChild(e.firstChild);
443+
e.removeChild(e.firstChild);
444+
e.style.fontSize="8pt";
445+
}
446+
}
447+
353448
function wavg(x1,x2,percent)
354449
{
355450
var res = x2 * (percent / 100) + x1 * ((100 - percent) / 100);

0 commit comments

Comments
 (0)