imp compose window automatic sizing

Michael M Slusarz slusarz@bigworm.colorado.edu
Fri, 16 Nov 2001 14:06:12 -0700


Just a quick hack to automatically size the compose window if the screen size 
is small:

Index: open_compose_win.js
===================================================================
RCS file: /repository/imp/templates/javascript/open_compose_win.js,v
retrieving revision 1.1
diff -u -r1.1 open_compose_win.js
--- open_compose_win.js 2001/03/18 17:39:28     1.1
+++ open_compose_win.js 2001/11/16 21:03:46
@@ -13,7 +13,19 @@
     } else {
         url = url + glue + "uniq=" + now.getTime();
     }
-    param 
= "toolbar=no,location=no,status=yes,scrollbars=yes,resizable=yes,width=700,heig
ht=650,left=0,top=0";
+    var Width = screen.width;
+    if (Width > 775) {
+        Width = 700;
+    } else {
+        Width -= 75;
+    }
+    var Height = screen.height;
+    if (Height > 725) {
+        Height = 650;
+    } else {
+        Height -= 75;
+    }
+    param 
= "toolbar=no,location=no,status=yes,scrollbars=yes,resizable=yes,width=" + 
Width + ",height=" + Height + ",left=0,top=0";
     eval ("name = window.open(url, name, param)");
     if (!eval("name.opener")) eval("name.opener = self");
 }


______________________________________________
Michael Slusarz [slusarz@bigworm.colorado.edu]
The University of Colorado at Boulder