Moved website into separate branch
This commit is contained in:
parent
e7811186e2
commit
cdb17c55b3
97 changed files with 1 additions and 6930 deletions
33
static/mailinglist.js
Normal file
33
static/mailinglist.js
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
$(function() {
|
||||
var first_mail = $('div.mail:first')[0].id;
|
||||
|
||||
function display(id) {
|
||||
var pos = {
|
||||
x: window.pageXOffset || document.body.scrollLeft,
|
||||
y: window.pageYOffset || document.body.scrollTop
|
||||
};
|
||||
$('ul.mailtree div.link').removeClass('selected');
|
||||
$('#link-' + id).addClass('selected').focus();
|
||||
$('div.mail').hide();
|
||||
$('#' + id).show();
|
||||
if (!(document.location.hash == '' && id == first_mail))
|
||||
document.location.href = '#' + id;
|
||||
window.scrollTo(pos.x, pos.y);
|
||||
}
|
||||
|
||||
$('div.mail')
|
||||
.addClass('dynamic-mail')
|
||||
.appendTo($('<div></div>').insertBefore('div.mail:first'))
|
||||
.hide();
|
||||
|
||||
$('div.link').each(function() {
|
||||
var id = $('a', $(this).parent()).attr('href').substr(1);
|
||||
$(this).click(function() {
|
||||
display(id);
|
||||
return false;
|
||||
});
|
||||
}).css({cursor: 'pointer'});
|
||||
|
||||
var href = document.location.href.split(/#/, 2)[1];
|
||||
display(href != null ? href : first_mail);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue