2011-07-31 10:46:29 +02:00
|
|
|
function presentation_reload() {
|
|
|
|
if ($('#config > #ajax').html() == 'on') {
|
|
|
|
$.ajax({
|
|
|
|
type: 'GET',
|
|
|
|
url: '/beamer/',
|
|
|
|
dataType: 'json',
|
|
|
|
data: '',
|
|
|
|
success: function(data) {
|
|
|
|
$('#content').html(data.content);
|
|
|
|
document.title = data.title;
|
|
|
|
$('#currentTime').html(data.time);
|
2011-09-04 00:18:11 +02:00
|
|
|
$('#content').clearQueue();
|
|
|
|
$('#content').animate({'font-size': data.bigger + '%'}, 200);
|
2011-09-21 20:58:15 +02:00
|
|
|
$('#content li').css({'font-size': data.bigger + '%'}, 200);
|
|
|
|
$('#content div').css({'font-size': 2 * data.bigger + '%'}, 200);
|
2011-09-04 00:18:11 +02:00
|
|
|
$('#content').animate({'margin-top': data.up + 'em'}, 200);
|
2011-09-03 18:50:47 +02:00
|
|
|
setTimeout("presentation_reload()", 500);
|
2011-07-31 10:46:29 +02:00
|
|
|
},
|
|
|
|
error: function () {
|
2011-09-03 18:50:47 +02:00
|
|
|
$('#currentTime').addClass('ajax_error');
|
2011-07-31 10:46:29 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function switchajax() {
|
|
|
|
if ($('#config > #ajax').html() == 'on') {
|
|
|
|
$('#config > #ajax').html('off');
|
|
|
|
$('#ajaxswitcher').html('<a href="#" onClick="switchajax()">Ajax Anschalten</a>');
|
|
|
|
} else {
|
|
|
|
$('#config > #ajax').html('on');
|
|
|
|
$('#ajaxswitcher').html('<a href="#" onClick="switchajax()">Ajax Ausschalten</a>');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
switchajax();
|
|
|
|
switchajax();
|
|
|
|
presentation_reload();
|
|
|
|
});
|