Merged [2990] from adam@nostrum.com:

In response to early feedback, changed 'close' metaphor from 'click anywhere' to 'click on the red "x" icon.'
 - Legacy-Id: 2993
Note: SVN reference [2990] has been migrated to Git commit 04289ed0e3dd56899a7c3cfa6ee43cdcd9eb68f5
This commit is contained in:
Henrik Levkowetz 2011-03-28 17:42:56 +00:00
parent 3edf194da5
commit cabddc90ca
5 changed files with 65 additions and 42 deletions

View file

@ -25,7 +25,7 @@ from ietf.idtracker.models import InternetDraft
from ietf.idrfc.idrfc_wrapper import IdWrapper
from ietf.utils.pipe import pipe
from ietf.proceedings.models import Meeting, MeetingTime, WgMeetingSession, MeetingVenue, IESGHistory, Proceeding, Switches, WgProceedingsActivities
from ietf.proceedings.models import Meeting, MeetingTime, WgMeetingSession, MeetingVenue, IESGHistory, Proceeding, Switches, WgProceedingsActivities, SessionConflict
@decorator_from_middleware(GZipMiddleware)
@ -104,7 +104,6 @@ def agenda_info(num=None):
def html_agenda(request, num=None):
timeslots, update, meeting, venue, ads, plenaryw_agenda, plenaryt_agenda = agenda_info(num)
groups_meeting = [];
for slot in timeslots:
for session in slot.sessions():
@ -321,12 +320,13 @@ def week_view(request, num=None):
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__acronym')
conflicts = SessionConflict.objects.filter(meeting_num=meeting.meeting_num)
template = "meeting/week-view.html"
return render_to_response(template,
{"timeslots":timeslots, "update":update, "meeting":meeting,
"venue":venue, "ads":ads, "plenaryw_agenda":plenaryw_agenda,
"plenaryt_agenda":plenaryt_agenda, "wg_list" : wgs,
"rg_list" : rgs, "area_list" : areas},
"rg_list" : rgs, "area_list" : areas, "conflicts":conflicts},
context_instance=RequestContext(request))
def ical_agenda(request, num=None):

View file

@ -209,7 +209,11 @@ class SessionConflict(models.Model):
conflict_gid = models.ForeignKey(Acronym, related_name='conflicts_with_set', db_column='conflict_gid')
meeting_num = models.ForeignKey(Meeting, db_column='meeting_num')
def __str__(self):
return "At IETF %s, %s conflicts with %s" % ( self.meeting_num_id, self.group_acronym.acronym, self.conflict_gid.acronym)
try:
return "At IETF %s, %s conflicts with %s" % ( self.meeting_num_id, self.group_acronym.acronym, self.conflict_gid.acronym)
except BaseException:
return "At IETF %s, something conflicts with something" % ( self.meeting_num_id )
class Meta:
db_table = 'session_conflicts'

View file

@ -1,6 +1,7 @@
{# Copyright The IETF Trust 2007, All Rights Reserved #}
{% load humanize %}
<html> <head>
<script type="text/javascript" src='/js/agenda2.js'></script>
<script type="text/javascript">
@ -10,6 +11,7 @@ var items = new Array();
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 %}
{% endautoescape %}
var fg = {
'app': "#008",
'gen': "#080",
@ -195,7 +197,7 @@ function draw_calendar()
//-----------------------------------------------------------------
var resize_func = function(div,t,l,w,h,to_fit)
{ return function(){resize(div,t,l,w,h,to_fit);} }
var click_func = function (e) { return function(){handle_click(e);}}
var maximize_func = function (e) { return function(){maximize(e);}}
for (i = 0; i < items.length; i++)
{
@ -256,7 +258,7 @@ function draw_calendar()
if (items[i].agenda)
{
e.onclick=click_func(e);
e.onclick=maximize_func(e);
e.style.cursor="pointer";
}
@ -374,7 +376,21 @@ function finish_maximize(e)
return;
}
var child = e.firstChild;
e.insertBefore(document.createElement("br"),e.firstChild);
var minimize_func = function (e) { return function(){minimize(e);} }
var img = document.createElement("img");
img.src = "/images/close.png";
img.style.cssFloat="right";
img.onclick = minimize_func(e);
img.style.cursor="pointer";
e.insertBefore(img,e.firstChild);
var h = document.createElement("span");
h.appendChild(document.createTextNode(items[e.id].dayname));
h.style.fontWeight="bold";
e.insertBefore(h,e.firstChild);
e.style.fontSize="10pt";
var tmp = e.style.height;
e.style.removeProperty("height");
@ -401,52 +417,55 @@ function finish_maximize(e)
e.appendChild(frame);
}
function handle_click(e)
function finish_minimize(e)
{
e.onmouseover = e.oldmouseover;
e.onmouseout = e.oldmouseout;
e.oldmouseover = undefined;
e.oldmouseout = undefined;
e.style.cursor="pointer";
}
function maximize(e)
{
if (e.onmouseover)
{
e.oldmouseover = e.onmouseover;
e.oldmouseout = e.onmouseout;
e.onmouseover = undefined;
e.onmouseout = undefined;
e.oldmouseover = e.onmouseover;
e.oldmouseout = e.onmouseout;
e.onmouseover = undefined;
e.onmouseout = undefined;
e.style.cursor="auto";
var callback_func = function (e) { return function(){finish_maximize(e);}}
e.callback = callback_func(e);
var callback_func = function (e) { return function(){finish_maximize(e);}}
e.callback = callback_func(e);
resize(e,0,0,
document.body.clientWidth-2*(padding + border),
document.body.clientHeight-2*(padding + border));
e.insertBefore(document.createElement("br"),e.firstChild);
var h = document.createElement("span");
h.appendChild(document.createTextNode(items[e.id].dayname));
h.style.fontWeight="bold";
e.insertBefore(h,e.firstChild);
e.style.fontSize="10pt";
resize(e,0,0,
document.body.clientWidth-2*(padding + border),
document.body.clientHeight-2*(padding + border));
}
else
{
var agenda = document.getElementById("agenda");
if (agenda)
{
e.removeChild(agenda);
}
e.onmouseover = e.oldmouseover;
e.onmouseout = e.oldmouseout;
e.oldmouseover = undefined;
e.oldmouseout = undefined;
e.onmouseout();
}
e.removeChild(e.firstChild);
e.removeChild(e.firstChild);
e.style.fontSize="8pt";
}
function minimize(e)
{
var agenda = document.getElementById("agenda");
if (agenda)
{
e.removeChild(agenda);
}
var callback_func = function (e) { return function(){finish_minimize(e);}}
e.callback = callback_func(e);
e.oldmouseout();
e.removeChild(e.firstChild);
e.removeChild(e.firstChild);
e.removeChild(e.firstChild);
e.style.fontSize="8pt";
}
function wavg(x1,x2,percent)
{
if (percent == 100) { return x2; }
var res = x2 * (percent / 100) + x1 * ((100 - percent) / 100);
return res;
}

BIN
static/images/close.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
static/images/warning.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB