Fix list events used in drag&drop functionality (#1485890)

release-0.6
thomascube 16 years ago
parent a36cf6d237
commit 9489adc593

@ -164,8 +164,8 @@ function rcube_webmail()
this.message_list.addEventListener('keypress', function(o){ p.msglist_keypress(o); }); this.message_list.addEventListener('keypress', function(o){ p.msglist_keypress(o); });
this.message_list.addEventListener('select', function(o){ p.msglist_select(o); }); this.message_list.addEventListener('select', function(o){ p.msglist_select(o); });
this.message_list.addEventListener('dragstart', function(o){ p.drag_start(o); }); this.message_list.addEventListener('dragstart', function(o){ p.drag_start(o); });
this.message_list.addEventListener('dragmove', function(o, e){ p.drag_move(e); }); this.message_list.addEventListener('dragmove', function(e){ p.drag_move(e); });
this.message_list.addEventListener('dragend', function(o, e){ p.drag_end(e); }); this.message_list.addEventListener('dragend', function(e){ p.drag_end(e); });
document.onmouseup = function(e){ return p.doc_mouse_up(e); }; document.onmouseup = function(e){ return p.doc_mouse_up(e); };
this.message_list.init(); this.message_list.init();
@ -280,8 +280,8 @@ function rcube_webmail()
this.contact_list.addEventListener('keypress', function(o){ p.contactlist_keypress(o); }); this.contact_list.addEventListener('keypress', function(o){ p.contactlist_keypress(o); });
this.contact_list.addEventListener('select', function(o){ p.contactlist_select(o); }); this.contact_list.addEventListener('select', function(o){ p.contactlist_select(o); });
this.contact_list.addEventListener('dragstart', function(o){ p.drag_start(o); }); this.contact_list.addEventListener('dragstart', function(o){ p.drag_start(o); });
this.contact_list.addEventListener('dragmove', function(o, e){ p.drag_move(e); }); this.contact_list.addEventListener('dragmove', function(e){ p.drag_move(e); });
this.contact_list.addEventListener('dragend', function(o, e){ p.drag_end(e); }); this.contact_list.addEventListener('dragend', function(e){ p.drag_end(e); });
this.contact_list.init(); this.contact_list.init();
if (this.env.cid) if (this.env.cid)

@ -805,7 +805,7 @@ drag_mouse_move: function(e)
{ {
var pos = rcube_event.get_mouse_pos(e); var pos = rcube_event.get_mouse_pos(e);
this.draglayer.css({ left:(pos.x+20)+'px', top:(pos.y-5 + (bw.ie ? document.documentElement.scrollTop : 0))+'px' }); this.draglayer.css({ left:(pos.x+20)+'px', top:(pos.y-5 + (bw.ie ? document.documentElement.scrollTop : 0))+'px' });
this.triggerEvent('dragmove', e); this.triggerEvent('dragmove', e?e:window.event);
} }
this.drag_start = false; this.drag_start = false;

Loading…
Cancel
Save