try to reload the beamer, if the server is down
This commit is contained in:
parent
639397028e
commit
d870b988e9
@ -6,6 +6,7 @@ function presentation_reload() {
|
|||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: '',
|
data: '',
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
$('#currentTime').removeClass('ajax_error');
|
||||||
$('#content').html(data.content);
|
$('#content').html(data.content);
|
||||||
document.title = data.title;
|
document.title = data.title;
|
||||||
$('#currentTime').html(data.time);
|
$('#currentTime').html(data.time);
|
||||||
@ -14,24 +15,27 @@ function presentation_reload() {
|
|||||||
$('#content li').css({'font-size': data.bigger + '%'}, 200);
|
$('#content li').css({'font-size': data.bigger + '%'}, 200);
|
||||||
$('#content #sidebar').css({'font-size': '16px'}, 0);
|
$('#content #sidebar').css({'font-size': '16px'}, 0);
|
||||||
$('#content').animate({'margin-top': data.up + 'em'}, 200);
|
$('#content').animate({'margin-top': data.up + 'em'}, 200);
|
||||||
/*TODO: messages neu schreiben*/
|
/*
|
||||||
|
* Gehe durch alle messages li durch. Wenn der Wert in der data steht, lasse es,
|
||||||
|
* ansonsten füge ein neues li ein und lösche es aus der data weg.
|
||||||
|
* Alles was jetzt noch in der data ist, muss als neues li eingefügt werden.
|
||||||
|
*/
|
||||||
|
|
||||||
if (data.countdown_visible == true)
|
//# $.each($('#messages li'), function (index, value) {
|
||||||
$('#countdown').slideDown();
|
//# message_id = value.attr('id').split('_')[1];
|
||||||
if (data.countdown_visible == false)
|
//# if (message_id in data) {
|
||||||
$('#countdown').slideUp();
|
//# this.html(data[message_id]);
|
||||||
if (data.countdown_control == "reset")
|
//# }
|
||||||
resetTimer(data.countdown_time);
|
//# });
|
||||||
if (data.countdown_control == 'start') {
|
$('#messages li').remove();
|
||||||
if (!timer_is_running)
|
$.each(data['messages'], function (index, value){
|
||||||
startTimer();
|
$('#messages ul').append('<li>' + value[1] + '</li>');
|
||||||
}
|
});
|
||||||
if (data.countdown_control == 'stop')
|
|
||||||
stopTimer();
|
|
||||||
setTimeout("presentation_reload()", 500);
|
setTimeout("presentation_reload()", 500);
|
||||||
},
|
},
|
||||||
error: function () {
|
error: function () {
|
||||||
$('#currentTime').addClass('ajax_error');
|
$('#currentTime').addClass('ajax_error');
|
||||||
|
setTimeout("presentation_reload()", 1000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user