/** * OpenSlides projector functions * * :copyright: 2011, 2012 by OpenSlides team, see AUTHORS. * :license: GNU GPL, see LICENSE for more details. */ content_hash = null; function presentation_reload() { if ($('#config > #ajax').html() == 'on') { $.ajax({ type: 'GET', url: '/projector/', dataType: 'json', success: function(data) { $('#currentTime').removeClass('ajax_error'); var new_content_hash = data['content_hash']; if (new_content_hash != content_hash) { $('#content').html(data.content); content_hash = new_content_hash; } $('#scrollcontent').html(data.scrollcontent); document.title = data.title; $('#currentTime').html(data.time); $('#content').clearQueue(); // content font-size $('#content').animate({'font-size': data.bigger + '%'}, 200); $('#content #sidebar').css({'font-size': '18px'}, 0); $('#scrollcontent').animate({'font-size': data.bigger + '%'}, 100); // content position $('#scrollcontent').animate({'margin-top': data.up + 'em'}, 100); // overlays $('#overlays div').remove(); $.each(data['overlays'], function (index, overlay){ $('#overlays').append('