{% extends "index.html" %}
{% comment %}
    <!-- kate: space-indent on; indent-width 4; replace-tabs on; -->
{% endcomment %}
{% load mumble_extras %}
{% load i18n %}
{% block body %}
{% endblock %}
{% block PageTitle %}Mumble :: {{ MumbleServer.name }}{% endblock %}
{% block HeadTag %}
    <script type="text/javascript" src="{% url django.views.i18n.javascript_catalog %}"></script>
    <script type="text/javascript" src="{{ MUMBLE_MEDIA_PREFIX }}js/channelviewer.js"></script>
    <script type="text/javascript" src="{{ MUMBLE_MEDIA_PREFIX }}js/channelviewerplugins.js"></script>
    <script type="text/javascript">
        Ext.onReady( function(){
            Ext.QuickTips.init();
            mainpanel = new Ext.ux.MumbleChannelViewer({
                //title: "ohai",
                renderTo: Ext.getBody(),
                {% if UsersAboveChannels %}
                    usersAboveChannels: true,
                {% endif %}
                source_url: "{% url mumble.views.cvp_json MumbleServer.id %}",
                imageurl: '{{MUMBLE_MEDIA_PREFIX}}/img',
                tbar: [],
            });
            function updateLayout(){
                viewsize = {
                    width:  Ext.lib.Dom.getViewWidth(),
                    height: Ext.lib.Dom.getViewHeight()
                };
                mainpanel.setHeight( viewsize.height );
                mainpanel.setWidth(  viewsize.width  );
            }
            updateLayout();
            Ext.EventManager.onWindowResize(updateLayout);
        } );
    </script>
{% endblock %}
