Fix window sizing in popup message window
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 30 Jun 2009 17:07:06 +0000 (11:07 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 30 Jun 2009 17:07:06 +0000 (11:07 -0600)
imp/js/src/fullmessage-dimp.js
imp/themes/screen-dimp.css

index 9d7956c..58942b0 100644 (file)
@@ -144,6 +144,13 @@ var DimpFullmessage = {
         DimpCore.DMenu.addElement(bid + '_img', 'ctx_' + ctx, { offset: bidelt.up(), left: true });
     },
 
+    resizeWindow: function()
+    {
+        var mb = $('msgData').down('DIV.msgBody');
+
+        mb.setStyle({ height: (document.viewport.getHeight() - mb.cumulativeOffset()[1] - parseInt(mb.getStyle('paddingTop'), 10) - parseInt(mb.getStyle('paddingBottom'), 10)) + 'px' });
+    },
+
     onDomLoad: function()
     {
         DimpCore.growler_log = false;
@@ -168,6 +175,8 @@ var DimpFullmessage = {
             $('msgLogInfo').show();
             DimpCore.updateMsgLog(this.log);
         }
+
+        this.resizeWindow();
     }
 
 };
@@ -180,3 +189,4 @@ DimpCore.clickHandler = DimpCore.clickHandler.wrap(DimpFullmessage.clickHandler.
 
 /* Attach event handlers. */
 document.observe('dom:loaded', DimpFullmessage.onDomLoad.bind(DimpFullmessage));
+Event.observe(window, 'resize', DimpFullmessage.resizeWindow.bind(DimpFullmessage));
index a7553f5..abd9f0a 100644 (file)
@@ -597,6 +597,7 @@ div.dimpActionsCompose, div.dimpActionsMsg {
 .msgBody {
     background: #fff url("graphics/backhead_shadow.png") top repeat-x;
     padding: 7px 5px 5px;
+    overflow-y: auto;
 }
 .msgBody table td {
     padding: 0;