Fix expand/collapse in dimp message popup view
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 1 Jul 2009 20:43:21 +0000 (14:43 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 1 Jul 2009 20:43:21 +0000 (14:43 -0600)
imp/js/src/DimpBase.js
imp/js/src/DimpCore.js
imp/js/src/fullmessage-dimp.js

index 2573b23..4796b51 100644 (file)
@@ -1620,6 +1620,20 @@ var DimpBase = {
                 this._toggleHeaders(elt, true);
                 break;
 
+            case 'msgloglist_toggle':
+            case 'partlist_toggle':
+                tmp = (id == 'partlist_toggle') ? 'partlist' : 'msgloglist';
+                $(tmp + '_col', tmp + '_exp').invoke('toggle');
+                Effect.toggle(tmp, 'blind', {
+                    duration: 0.2,
+                    queue: {
+                        position: 'end',
+                        scope: tmp,
+                        limit: 2
+                    }
+                });
+                break;
+
             case 'msg_newwin':
             case 'msg_newwin_options':
                 this.msgWindow(this.viewport.getSelection().search({ imapuid: { equal: [ this.pp.imapuid ] } , view: { equal: [ this.pp.view ] } }).get('dataob').first());
index f63c3cf..d1a4246 100644 (file)
@@ -376,30 +376,6 @@ var DimpCore = {
             id = elt.readAttribute('id');
 
             switch (id) {
-            case 'partlist_toggle':
-                $('partlist_col', 'partlist_exp').invoke('toggle');
-                Effect.toggle('partlist', 'blind', {
-                    duration: 0.2,
-                    queue: {
-                        position: 'end',
-                        scope: 'partlist',
-                        limit: 2
-                    }
-                });
-                break;
-
-            case 'msgloglist_toggle':
-                $('msgloglist_col', 'msgloglist_exp').invoke('toggle');
-                Effect.toggle('msgloglist', 'blind', {
-                    duration: 0.2,
-                    queue: {
-                        position: 'end',
-                        scope: 'msgloglist',
-                        limit: 2
-                    }
-                });
-                break;
-
             case 'msg_print':
                 window.print();
                 break;
index 58942b0..c128682 100644 (file)
@@ -102,6 +102,27 @@ var DimpFullmessage = {
                 e.stop();
                 return;
 
+            case 'msgloglist_toggle':
+            case 'partlist_toggle':
+                tmp = (id == 'partlist_toggle') ? 'partlist' : 'msgloglist';
+                $(tmp + '_col', tmp + '_exp').invoke('toggle');
+                Effect.toggle(tmp, 'blind', {
+                    afterFinish: function() {
+                        this.resizeWindow();
+                        $('msgData').down('DIV.msgBody').setStyle({ overflowY: 'auto' })
+                    }.bind(this),
+                    beforeSetup: function() {
+                        $('msgData').down('DIV.msgBody').setStyle({ overflowY: 'hidden' })
+                    },
+                    duration: 0.2,
+                    queue: {
+                        position: 'end',
+                        scope: tmp,
+                        limit: 2
+                    }
+                });
+                break;
+
             case 'msg_view_source':
                 DimpCore.popupWindow(DimpCore.addURLParam(DIMP.conf.URI_VIEW, { uid: this.index, mailbox: this.mailbox, actionID: 'view_source', id: 0 }, true), DIMP.conf.msg_index + '|' + DIMP.conf.msg_folder);
                 break;