Skip to content

Commit dc33c9a

Browse files
committed
Support files for the new agenda features.
- Legacy-Id: 1506
1 parent 4f37795 commit dc33c9a

3 files changed

Lines changed: 314 additions & 0 deletions

File tree

static/css/mobile.css

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/* Copyright The IETF Trust 2007, All Rights Reserved */
2+
3+
body {
4+
margin: 0;
5+
padding: 0;
6+
background-color: white;
7+
font-family: sans-serif;
8+
font-size: small;
9+
10+
font-size-adjust: none;
11+
font-stretch: normal;
12+
}
13+
14+
15+
.legal {
16+
font-size: .7em;
17+
font-weight: bold;
18+
text-align: center;
19+
padding: 0.4em;
20+
}
21+
22+
h1 { font-size: 1.44em; font-weight: bold; text-align: center; color: white; background-color: blue; }
23+
h2 { font-size: 1.2em; font-weight: bold; text-align: center; color: white; background-color: blue; }
24+
h3 { font-size: 1.095em; font-weight: bold; text-align: center; color: white; background-color: blue; }
25+
h4 { font-size: 1em; font-weight: bold; text-align: left; color: white; background-color: blue; padding: 0.2em; }
26+
h5 { font-size: 1em; font-weight: bold; text-align: left; color: black; background-color: #BBF; padding: 0.2em; }
27+
h5 a { font-size: 1em; font-weight: bold; text-align: left; color: black; background-color: #BBF; padding: 0.2em; }
28+
29+
.header {
30+
border: 0;
31+
margin: 0;
32+
padding: 0.1em;
33+
color: white;
34+
background-color: blue;
35+
}
36+

static/js/agenda.js

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
2+
// cookie functions used with permission from http://www.elated.com/articles/javascript-and-cookies/
3+
function set_cookie ( name, value, exp_y, exp_m, exp_d, path, domain, secure )
4+
{
5+
var cookie_string = name + "=" + escape ( value );
6+
7+
if ( exp_y ) {
8+
var expires = new Date ( exp_y, exp_m, exp_d );
9+
cookie_string += "; expires=" + expires.toGMTString();
10+
}
11+
12+
if ( path )
13+
cookie_string += "; path=" + escape ( path );
14+
15+
if ( domain )
16+
cookie_string += "; domain=" + escape ( domain );
17+
18+
if ( secure )
19+
cookie_string += "; secure";
20+
21+
document.cookie = cookie_string;
22+
}
23+
function delete_cookie ( cookie_name )
24+
{
25+
var cookie_date = new Date ( ); // current date & time
26+
cookie_date.setTime ( cookie_date.getTime() - 1 );
27+
document.cookie = cookie_name += "=; expires=" + cookie_date.toGMTString();
28+
}
29+
function get_cookie ( cookie_name )
30+
{
31+
var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );
32+
33+
if ( results )
34+
return ( unescape ( results[2] ) );
35+
else
36+
return null;
37+
}
38+
39+
// set the color of a row to the proper class. optionally set the corresponding cookie.
40+
function setcolor(id, color, skip_cookie)
41+
{
42+
oneSecond = 1000;
43+
oneMinute = 60*oneSecond;
44+
oneHour = 60*oneMinute;
45+
oneDay = 24*oneHour;
46+
oneWeek = 7*oneDay;
47+
oneMonth = 31*oneDay;
48+
49+
var now = new Date();
50+
var exp = new Date(now.getTime() + 3*oneMonth);
51+
52+
var e = $(id);
53+
if (e) e.className = "bg" + color;
54+
//if (!skip_cookie) set_cookie(id, color, 2009, 8, 1);
55+
if (!skip_cookie) set_cookie(id, color, exp.getFullYear(), exp.getMonth(), exp.getDate(),"", ".ietf.org");
56+
}
57+
58+
// return a list of all cookie name/value pairs
59+
function get_cookie_list()
60+
{
61+
var cookie = document.cookie;
62+
var cookies = cookie.split(';');
63+
var cookie_list = [];
64+
for (var i = 0; i < cookies.length; i++) {
65+
var cookie_match = cookies[i].match('(^|;) *([^=]*)=([^;]*)(;|$)');
66+
if (cookie_match) {
67+
cookie_list.push(cookie_match[2]);
68+
cookie_list.push(cookie_match[3]);
69+
// alert("cookie: '" + cookie_match[2] + "'='" + cookie_match[3] + "'");
70+
}
71+
}
72+
return cookie_list;
73+
}
74+
75+
// run through all cookies and set the colors of each row
76+
function set_cookie_colors()
77+
{
78+
var cl = get_cookie_list();
79+
for (var i = 0; i < cl.length; i += 2) {
80+
setcolor(cl[i], cl[i+1], true);
81+
}
82+
Element.hide('colorpallet');
83+
}
84+
85+
// the current color being picked by the popup
86+
var curid;
87+
88+
// pop up the pallet to let a color be picked
89+
function pickcolor(id)
90+
{
91+
curid = id;
92+
var colorpallet = $('colorpallet');
93+
if (colorpallet) {
94+
Element.show(colorpallet);
95+
Element.absolutize(colorpallet);
96+
Element.clonePosition(colorpallet, "p-" + id);
97+
}
98+
}
99+
100+
// called by the pallet popup to set the current color
101+
function setcurcolor(color)
102+
{
103+
setcolor(curid, color);
104+
var colorpallet = $('colorpallet');
105+
if (colorpallet) {
106+
Element.hide(colorpallet);
107+
}
108+
}
109+
110+
// open up a new window showing the given room
111+
function venue(room)
112+
{
113+
window.open('venue/?room=' + room, 'IETF meeting rooms',
114+
'scrollbars=no,toolbar=no,width=621,height=560');
115+
return false;
116+
}
117+

static/js/dateformat.js

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
/**
2+
* Date.format()
3+
* string format ( string format )
4+
* Formatting rules according to http://php.net/strftime
5+
*
6+
* Copyright (C) 2006 Dao Gottwald
7+
*
8+
* This library is free software; you can redistribute it and/or
9+
* modify it under the terms of the GNU Lesser General Public
10+
* License as published by the Free Software Foundation; either
11+
* version 2.1 of the License, or (at your option) any later version.
12+
*
13+
* This library is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16+
* Lesser General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU Lesser General Public
19+
* License along with this library; if not, write to the Free Software
20+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21+
*
22+
* Contact information:
23+
* Dao Gottwald <dao at design-noir.de>
24+
*
25+
* @version 0.7
26+
* @todo %g, %G, %U, %V, %W, %z, more/better localization
27+
* @url http://design-noir.de/webdev/JS/Date.format/
28+
*/
29+
30+
var _lang = (navigator.systemLanguage || navigator.userLanguage || navigator.language || navigator.browserLanguage || '').replace(/-.*/,'');
31+
switch (_lang) {
32+
case 'de':
33+
Date._l10n = {
34+
days: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
35+
months: ['Januar','Februar','M\u00E4rz','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'],
36+
date: '%e.%m.%Y',
37+
time: '%H:%M:%S'};
38+
break;
39+
case 'es':
40+
Date._l10n = {
41+
days: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','S\u00E1bado'],
42+
months: ['enero','febrero','marcha','abril','puede','junio','julio','agosto','septiembre','octubre','noviembre','diciembre'],
43+
date: '%e.%m.%Y',
44+
time: '%H:%M:%S'};
45+
break;
46+
case 'fr':
47+
Date._l10n = {
48+
days: ['dimanche','lundi','mardi','mercredi','jeudi','vendredi','samedi'],
49+
months: ['janvier','f\u00E9vrier','mars','avril','mai','juin','juillet','ao\u00FBt','septembre','octobre','novembre','decembre'],
50+
date: '%e/%m/%Y',
51+
time: '%H:%M:%S'};
52+
break;
53+
case 'it':
54+
Date._l10n = {
55+
days: ['domenica','luned\u00EC','marted\u00EC','mercoled\u00EC','gioved\u00EC','venerd\u00EC','sabato'],
56+
months: ['gennaio','febbraio','marzo','aprile','maggio','giugno','luglio','agosto','settembre','ottobre','novembre','dicembre'],
57+
date: '%e/%m/%y',
58+
time: '%H.%M.%S'};
59+
break;
60+
case 'pt':
61+
Date._l10n = {
62+
days: ['Domingo','Segunda-feira','Ter\u00E7a-feira','Quarta-feira','Quinta-feira','Sexta-feira','S\u00E1bado'],
63+
months: ['Janeiro','Fevereiro','Mar\u00E7o','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
64+
date: '%e/%m/%y',
65+
time: '%H.%M.%S'};
66+
break;
67+
case 'en':
68+
default:
69+
Date._l10n = {
70+
days: ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],
71+
months: ['January','February','March','April','May','June','July','August','September','October','November','December'],
72+
date: '%Y-%m-%e',
73+
time: '%H:%M:%S'};
74+
break;
75+
}
76+
Date._pad = function(num, len) {
77+
for (var i = 1; i <= len; i++)
78+
if (num < Math.pow(10, i))
79+
return new Array(len-i+1).join(0) + num;
80+
return num;
81+
};
82+
Date.prototype.format = function(format) {
83+
if (format.indexOf('%%') > -1) { // a literal `%' character
84+
format = format.split('%%');
85+
for (var i = 0; i < format.length; i++)
86+
format[i] = this.format(format[i]);
87+
return format.join('%');
88+
}
89+
format = format.replace(/%D/g, '%m/%d/%y'); // same as %m/%d/%y
90+
format = format.replace(/%r/g, '%I:%M:%S %p'); // time in a.m. and p.m. notation
91+
format = format.replace(/%R/g, '%H:%M:%S'); // time in 24 hour notation
92+
format = format.replace(/%T/g, '%H:%M:%S'); // current time, equal to %H:%M:%S
93+
format = format.replace(/%x/g, Date._l10n.date); // preferred date representation for the current locale without the time
94+
format = format.replace(/%X/g, Date._l10n.time); // preferred time representation for the current locale without the date
95+
var dateObj = this;
96+
return format.replace(/%([aAbhBcCdegGHIjmMnpStuUVWwyYzZ])/g, function(match0, match1) {
97+
return dateObj.format_callback(match0, match1);
98+
});
99+
}
100+
Date.prototype.format_callback = function(match0, match1) {
101+
switch (match1) {
102+
case 'a': // abbreviated weekday name according to the current locale
103+
return Date._l10n.days[this.getDay()].substr(0,3);
104+
case 'A': // full weekday name according to the current locale
105+
return Date._l10n.days[this.getDay()];
106+
case 'b':
107+
case 'h': // abbreviated month name according to the current locale
108+
return Date._l10n.months[this.getMonth()].substr(0,3);
109+
case 'B': // full month name according to the current locale
110+
return Date._l10n.months[this.getMonth()];
111+
case 'c': // preferred date and time representation for the current locale
112+
return this.toLocaleString();
113+
case 'C': // century number (the year divided by 100 and truncated to an integer, range 00 to 99)
114+
return Math.floor(this.getFullYear() / 100);
115+
case 'd': // day of the month as a decimal number (range 01 to 31)
116+
return Date._pad(this.getDate(), 2);
117+
case 'e': // day of the month as a decimal number, a single digit is preceded by a space (range ' 1' to '31')
118+
return Date._pad(this.getDate(), 2);
119+
/*case 'g': // like %G, but without the century
120+
return ;
121+
case 'G': // The 4-digit year corresponding to the ISO week number (see %V). This has the same format and value as %Y, except that if the ISO week number belongs to the previous or next year, that year is used instead
122+
return ;*/
123+
case 'H': // hour as a decimal number using a 24-hour clock (range 00 to 23)
124+
return Date._pad(this.getHours(), 2);
125+
case 'I': // hour as a decimal number using a 12-hour clock (range 01 to 12)
126+
return Date._pad(this.getHours() % 12, 2);
127+
case 'j': // day of the year as a decimal number (range 001 to 366)
128+
return Date._pad(this.getMonth() * 30 + Math.ceil(this.getMonth() / 2) + this.getDay() - 2 * (this.getMonth() > 1) + (!(this.getFullYear() % 400) || (!(this.getFullYear() % 4) && this.getFullYear() % 100)), 3);
129+
case 'm': // month as a decimal number (range 01 to 12)
130+
return Date._pad(this.getMonth() + 1, 2);
131+
case 'M': // minute as a decimal number
132+
return Date._pad(this.getMinutes(), 2);
133+
case 'n': // newline character
134+
return '\n';
135+
case 'p': // either `am' or `pm' according to the given time value, or the corresponding strings for the current locale
136+
return this.getHours() < 12 ? 'am' : 'pm';
137+
case 'S': // second as a decimal number
138+
return Date._pad(this.getSeconds(), 2);
139+
case 't': // tab character
140+
return '\t';
141+
case 'u': // weekday as a decimal number [1,7], with 1 representing Monday
142+
return this.getDay() || 7;
143+
/*case 'U': // week number of the current year as a decimal number, starting with the first Sunday as the first day of the first week
144+
return ;
145+
case 'V': // The ISO 8601:1988 week number of the current year as a decimal number, range 01 to 53, where week 1 is the first week that has at least 4 days in the current year, and with Monday as the first day of the week. (Use %G or %g for the year component that corresponds to the week number for the specified timestamp.)
146+
return ;
147+
case 'W': // week number of the current year as a decimal number, starting with the first Monday as the first day of the first week
148+
return ;*/
149+
case 'w': // day of the week as a decimal, Sunday being 0
150+
return this.getDay();
151+
case 'y': // year as a decimal number without a century (range 00 to 99)
152+
return this.getFullYear().toString().substr(2);
153+
case 'Y': // year as a decimal number including the century
154+
return this.getFullYear();
155+
/*case 'z':
156+
case 'Z': // time zone or name or abbreviation
157+
return ;*/
158+
default:
159+
return match0;
160+
}
161+
}

0 commit comments

Comments
 (0)