Browse Source

auto scale the channel viewer's main panel to fit the screen

Natenom/support-murmur-13-1446181288462
Michael Ziegler 14 years ago
parent
commit
bfd712505a
  1. 12
      pyweb/mumble/templates/mumble/embed.html

12
pyweb/mumble/templates/mumble/embed.html

@ -15,10 +15,22 @@
Ext.onReady( function(){ Ext.onReady( function(){
Ext.QuickTips.init(); Ext.QuickTips.init();
mainpanel = new Ext.ux.MumbleChannelViewer({ mainpanel = new Ext.ux.MumbleChannelViewer({
//title: "ohai",
renderTo: Ext.getBody(), renderTo: Ext.getBody(),
source_url: "{% url mumble.views.cvp_json MumbleServer.id %}", source_url: "{% url mumble.views.cvp_json MumbleServer.id %}",
imageurl: '{{MUMBLE_MEDIA_PREFIX}}/img', 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> </script>
{% endblock %} {% endblock %}
Loading…
Cancel
Save