Bug #8606: Fix dragging over IFRAMEs
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 28 Sep 2009 19:23:14 +0000 (13:23 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 28 Sep 2009 19:25:10 +0000 (13:25 -0600)
imp/js/DimpBase.js
imp/js/ViewPort.js
imp/templates/index/index-dimp.inc
imp/themes/screen-dimp.css

index 5d7f078..9ece6ae 100644 (file)
@@ -613,6 +613,12 @@ var DimpBase = {
             onSplitBarChange: function() {
                 this._updatePrefs('dimp_splitbar', this.viewport.getPageSize());
             }.bind(this),
+            onSplitBarEnd: function() {
+                $('msgBodyCover').hide();
+            },
+            onSplitBarStart: function() {
+                $('msgBodyCover').clonePosition('msgBody').show();
+            },
             onWait: function() {
                 if ($('dimpmain_folder').visible()) {
                     DimpCore.showNotifications([ { type: 'horde.warning', message: DIMP.text.listmsg_wait } ]);
@@ -2644,11 +2650,15 @@ DimpBase._msgDragConfig = {
         } else {
             DimpBase.msgSelect(id, args);
         }
+
+        $('msgBodyCover').clonePosition('msgBody').show();
     },
     onEnd: function(d, e) {
         if (d.selectIfNoDrag && !d.wasDragged) {
             DimpBase.msgSelect(d.element.id, { right: e.isRightClick() });
         }
+
+        $('msgBodyCover').hide();
     }
 };
 
@@ -2657,6 +2667,9 @@ DimpBase._folderDragConfig = {
     offset: { x: 15, y: 0 },
     scroll: 'normalfolders',
     threshold: 5,
+    onStart: function(d, e) {
+        $('msgBodyCover').clonePosition('msgBody').show();
+    },
     onDrag: function(d, e) {
         if (!d.wasDragged) {
             $('folderopts').hide();
@@ -2669,6 +2682,7 @@ DimpBase._folderDragConfig = {
             $('folderopts').show();
             $('dropbase').hide();
         }
+        $('msgBodyCover').hide();
     }
 };
 
index 424f229..c48a941 100644 (file)
@@ -54,6 +54,8 @@
  * onSelect
  * onSlide
  * onSplitBarChange
+ * onSplitBarEnd
+ * onSplitBarStart
  * onWait
  *
  * Outgoing AJAX request has the following params:
@@ -916,6 +918,9 @@ var ViewPort = Class.create({
                     orig: this.page_size,
                     pos: $(this.opts.content).positionedOffset()[1]
                 };
+                if (this.opts.onSplitBarStart) {
+                    this.opts.onSplitBarStart();
+                }
             }.bind(this),
             snap: function(x, y, elt) {
                 var l = parseInt((y - this.sp.pos) / this.sp.lh);
@@ -934,6 +939,9 @@ var ViewPort = Class.create({
                     this.sp.orig != this.sp.lines) {
                     this.opts.onSplitBarChange();
                 }
+                if (this.opts.onSplitBarEnd) {
+                    this.opts.onSplitBarEnd();
+                }
             }.bind(this)
         });
         this.split_bar.observe('dblclick', function() {
index 0b4d2e0..1ecf010 100644 (file)
@@ -474,3 +474,5 @@ function _simpleButton($id, $text, $image, $imagedir = null)
   <input type="button" class="button RBFolderCancel" value="<?php echo _("Cancel") ?>" />
  </form>
 </div>
+
+<div id="msgBodyCover" style="display:none"></div>
index 2a47f98..bee13a2 100644 (file)
@@ -592,6 +592,11 @@ div.dimpActionsCompose, div.dimpActionsMsg {
     overflow: auto;
 }
 
+#msgBodyCover {
+    position: absolute;
+    z-index: 1000;
+}
+
 /* Message Composition. */
 .composeAddrbook {
     color: blue;