|
1 | 1 | {# Copyright The IETF Trust 2007, All Rights Reserved #} |
2 | 2 | {% load humanize %} |
3 | 3 |
|
| 4 | + |
4 | 5 | <html> <head> |
5 | 6 | <script type="text/javascript" src='/js/agenda2.js'></script> |
6 | 7 | <script type="text/javascript"> |
|
10 | 11 | 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 %} |
11 | 12 | {% endautoescape %} |
12 | 13 |
|
| 14 | + |
13 | 15 | var fg = { |
14 | 16 | 'app': "#008", |
15 | 17 | 'gen': "#080", |
|
195 | 197 | //----------------------------------------------------------------- |
196 | 198 | var resize_func = function(div,t,l,w,h,to_fit) |
197 | 199 | { return function(){resize(div,t,l,w,h,to_fit);} } |
198 | | - var click_func = function (e) { return function(){handle_click(e);}} |
| 200 | + var maximize_func = function (e) { return function(){maximize(e);}} |
199 | 201 |
|
200 | 202 | for (i = 0; i < items.length; i++) |
201 | 203 | { |
|
256 | 258 |
|
257 | 259 | if (items[i].agenda) |
258 | 260 | { |
259 | | - e.onclick=click_func(e); |
| 261 | + e.onclick=maximize_func(e); |
260 | 262 | e.style.cursor="pointer"; |
261 | 263 | } |
262 | 264 |
|
|
374 | 376 | return; |
375 | 377 | } |
376 | 378 |
|
377 | | - var child = e.firstChild; |
| 379 | + e.insertBefore(document.createElement("br"),e.firstChild); |
| 380 | + |
| 381 | + var minimize_func = function (e) { return function(){minimize(e);} } |
| 382 | + var img = document.createElement("img"); |
| 383 | + img.src = "/images/close.png"; |
| 384 | + img.style.cssFloat="right"; |
| 385 | + img.onclick = minimize_func(e); |
| 386 | + img.style.cursor="pointer"; |
| 387 | + e.insertBefore(img,e.firstChild); |
| 388 | + |
| 389 | + var h = document.createElement("span"); |
| 390 | + h.appendChild(document.createTextNode(items[e.id].dayname)); |
| 391 | + h.style.fontWeight="bold"; |
| 392 | + e.insertBefore(h,e.firstChild); |
| 393 | + e.style.fontSize="10pt"; |
378 | 394 |
|
379 | 395 | var tmp = e.style.height; |
380 | 396 | e.style.removeProperty("height"); |
|
401 | 417 | e.appendChild(frame); |
402 | 418 | } |
403 | 419 |
|
404 | | -function handle_click(e) |
| 420 | +function finish_minimize(e) |
| 421 | +{ |
| 422 | + e.onmouseover = e.oldmouseover; |
| 423 | + e.onmouseout = e.oldmouseout; |
| 424 | + e.oldmouseover = undefined; |
| 425 | + e.oldmouseout = undefined; |
| 426 | + e.style.cursor="pointer"; |
| 427 | +} |
| 428 | + |
| 429 | +function maximize(e) |
405 | 430 | { |
406 | 431 | if (e.onmouseover) |
407 | 432 | { |
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"; |
| 433 | + e.oldmouseover = e.onmouseover; |
| 434 | + e.oldmouseout = e.onmouseout; |
| 435 | + e.onmouseover = undefined; |
| 436 | + e.onmouseout = undefined; |
| 437 | + e.style.cursor="auto"; |
| 438 | + |
| 439 | + var callback_func = function (e) { return function(){finish_maximize(e);}} |
| 440 | + e.callback = callback_func(e); |
| 441 | + |
| 442 | + resize(e,0,0, |
| 443 | + document.body.clientWidth-2*(padding + border), |
| 444 | + document.body.clientHeight-2*(padding + border)); |
445 | 445 | } |
446 | 446 | } |
447 | 447 |
|
| 448 | +function minimize(e) |
| 449 | +{ |
| 450 | + var agenda = document.getElementById("agenda"); |
| 451 | + if (agenda) |
| 452 | + { |
| 453 | + e.removeChild(agenda); |
| 454 | + } |
| 455 | + |
| 456 | + var callback_func = function (e) { return function(){finish_minimize(e);}} |
| 457 | + e.callback = callback_func(e); |
| 458 | + e.oldmouseout(); |
| 459 | + |
| 460 | + e.removeChild(e.firstChild); |
| 461 | + e.removeChild(e.firstChild); |
| 462 | + e.removeChild(e.firstChild); |
| 463 | + e.style.fontSize="8pt"; |
| 464 | +} |
| 465 | + |
448 | 466 | function wavg(x1,x2,percent) |
449 | 467 | { |
| 468 | + if (percent == 100) { return x2; } |
450 | 469 | var res = x2 * (percent / 100) + x1 * ((100 - percent) / 100); |
451 | 470 | return res; |
452 | 471 | } |
|
0 commit comments