[pve-devel] r5470 - in pve-manager/trunk: . debian www/root/openvz www/root/qemu

svn-commits at proxmox.com svn-commits at proxmox.com
Tue Feb 1 08:53:24 CET 2011


Author: dietmar
Date: 2011-02-01 08:53:24 +0100 (Tue, 01 Feb 2011)
New Revision: 5470

Modified:
   pve-manager/trunk/ChangeLog
   pve-manager/trunk/configure.in
   pve-manager/trunk/debian/changelog.Debian
   pve-manager/trunk/www/root/openvz/console-direct.htm
   pve-manager/trunk/www/root/qemu/vnc-direct.htm
Log:


Modified: pve-manager/trunk/ChangeLog
===================================================================
--- pve-manager/trunk/ChangeLog	2011-02-01 05:48:16 UTC (rev 5469)
+++ pve-manager/trunk/ChangeLog	2011-02-01 07:53:24 UTC (rev 5470)
@@ -1,5 +1,11 @@
 2011-02-01  Proxmox Support Team  <support at proxmox.com>
 
+	* www/root/openvz/console-direct.htm: include 2px border width in size
+	calculation. Do periodic resize.
+
+	* www/root/qemu/vnc-direct.htm: include 2px border width in size
+	calculation. fix resize for Opera.
+
 	* po/zh_CN.po: updated chinese translation (provided by walk0r)
 
 2010-11-11  Proxmox Support Team  <support at proxmox.com>

Modified: pve-manager/trunk/configure.in
===================================================================
--- pve-manager/trunk/configure.in	2011-02-01 05:48:16 UTC (rev 5469)
+++ pve-manager/trunk/configure.in	2011-02-01 07:53:24 UTC (rev 5470)
@@ -4,7 +4,7 @@
 
 prefix=/usr
 
-PACKAGERELEASE=10
+PACKAGERELEASE=11
 AC_SUBST(PACKAGERELEASE)
 
 REPOID=`svnversion .`

Modified: pve-manager/trunk/debian/changelog.Debian
===================================================================
--- pve-manager/trunk/debian/changelog.Debian	2011-02-01 05:48:16 UTC (rev 5469)
+++ pve-manager/trunk/debian/changelog.Debian	2011-02-01 07:53:24 UTC (rev 5470)
@@ -1,3 +1,11 @@
+pve-manager (1.7-11) unstable; urgency=low
+
+  * fix vnc console size for various browsers
+
+  * updated chinese translation (provided by walk0r)
+
+ -- Proxmox Support Team <support at proxmox.com>  Tue, 01 Feb 2011 08:51:48 +0100
+
 pve-manager (1.7-10) unstable; urgency=low
 
   * fix version number for 1.7 release

Modified: pve-manager/trunk/www/root/openvz/console-direct.htm
===================================================================
--- pve-manager/trunk/www/root/openvz/console-direct.htm	2011-02-01 05:48:16 UTC (rev 5469)
+++ pve-manager/trunk/www/root/openvz/console-direct.htm	2011-02-01 07:53:24 UTC (rev 5470)
@@ -38,14 +38,26 @@
 <script language=JavaScript>
  function wresize() {
 
-   // resize hack for IE
+   var oh;
+   var ow;
+
    if (!window.innerHeight && document.body && document.body.offsetHeight) {
-     window.resizeTo(745,400);
-     var oh = document.documentElement.clientHeight;
-     var ow = document.documentElement.clientWidth;
-     window.resizeBy (745 - ow, 400 - oh);
+     // hack for IE
+     oh = document.documentElement.clientHeight;
+     ow = document.documentElement.clientWidth;
+   }  else {
+     // other browsers
+     oh = window.innerHeight;
+     ow = window.innerWidth;
    }
- }
+
+   var offsetw = 745 - ow + 2;
+   var offseth = 400 - oh + 2;
+   if (offsetw !== 0 || offseth !== 0) {
+     try { window.resizeBy(offsetw, offseth); } catch (e) {}
+   }
+   setTimeout ("wresize()", 1000);
+}
 </script>
 __EOJS
 

Modified: pve-manager/trunk/www/root/qemu/vnc-direct.htm
===================================================================
--- pve-manager/trunk/www/root/qemu/vnc-direct.htm	2011-02-01 05:48:16 UTC (rev 5469)
+++ pve-manager/trunk/www/root/qemu/vnc-direct.htm	2011-02-01 07:53:24 UTC (rev 5470)
@@ -35,7 +35,14 @@
 <script language=JavaScript>
  function wresize() {
 
-   var ps = document.vncapp.getPreferredSize();
+   var ps;
+   try { 
+     ps = document.vncapp.getPreferredSize();
+   } catch (e) {
+     setTimeout ("wresize()", 100);
+     return;
+   }
+
    var aw = ps.width;
    var ah = ps.height;
    var oh;
@@ -51,11 +58,13 @@
      ow = window.innerWidth;
    }
 
-   document.vncapp.width = aw;
-   document.vncapp.height = ah;
+   document.vncapp.style.height = ah + "px";
+   document.vncapp.style.width = aw + "px";
 
-   var offsetw = aw - ow;
-   var offseth = ah - oh;
+   var offsetw = aw - ow + 2;
+   var offseth = ah - oh + 2;
+
+
    if (offsetw !== 0 || offseth !== 0) {
      try { window.resizeBy(offsetw, offseth); } catch (e) {}
    }
@@ -67,9 +76,9 @@
 </script>
 __EOJS
 
- $out .= "<body id=vnc style='margin:0px;' onLoad='javascript:wresize();'>\n";
- $out .= "<div class=lightcolbd style='border: 1px solid;'>";
- $out .= "<APPLET id=vncapp CODE='VncViewer.class' ARCHIVE='/vncterm/VncViewer.jar' width=640 height=400 vspace=0 hspace=0>\n";
+ $out .= "<body id=vnc style='margin:0px;' onLoad='javascript:setTimeout(\"wresize()\", 500);'>\n";
+ $out .= "<div style='border: 1px solid;'>";
+ $out .= "<APPLET id=vncapp CODE='VncViewer.class' ARCHIVE='/vncterm/VncViewer.jar' width='100%' height='100%' vspace=0 hspace=0>\n";
 
  $out .= "<param name=PORT value='$port'>\n";
  $out .= "<param name=PASSWORD value='$ticket'>\n";




More information about the pve-devel mailing list