From bfd712505a1ada63daa2c4975cfc43ff3a43e719 Mon Sep 17 00:00:00 2001 From: Michael Ziegler Date: Sun, 24 Oct 2010 12:41:00 +0200 Subject: [PATCH] auto scale the channel viewer's main panel to fit the screen --- pyweb/mumble/templates/mumble/embed.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pyweb/mumble/templates/mumble/embed.html b/pyweb/mumble/templates/mumble/embed.html index aa9c819..410d75d 100644 --- a/pyweb/mumble/templates/mumble/embed.html +++ b/pyweb/mumble/templates/mumble/embed.html @@ -15,10 +15,22 @@ Ext.onReady( function(){ Ext.QuickTips.init(); mainpanel = new Ext.ux.MumbleChannelViewer({ + //title: "ohai", renderTo: Ext.getBody(), 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); } ); {% endblock %}