merge of '27e4a971509238d8a77bcdbd70c00f4fc4202a00'

and '310656e43745cf03a754d629917e6024ec566244'

Monotone-Parent: 27e4a971509238d8a77bcdbd70c00f4fc4202a00
Monotone-Parent: 310656e43745cf03a754d629917e6024ec566244
Monotone-Revision: a6eb90bb705891f429bad2f9b15a3fc4f18c040c

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2009-07-01T20:21:46
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2009-07-01 20:21:46 +00:00
9 changed files with 118 additions and 7 deletions
+3
View File
@@ -603,6 +603,7 @@ function appendAddressBook(name, folder) {
.replace(">", ">", "g")));
setEventsOnAddressBook(li);
updateAddressBooksMenus();
configureDragAndDrop ();
}
return result;
@@ -1066,6 +1067,8 @@ function initContacts(event) {
}
function configureDragAndDrop () {
Droppables.empty ();
Draggables.empty ();
var mainElement = new Element ("div", {id: "dragDropVisual"});
document.body.appendChild(mainElement);
mainElement.absolutize ();
+5 -1
View File
@@ -660,8 +660,8 @@ function messageListCallback(http) {
table = $('messageList');
configureMessageListEvents(table);
TableKit.Resizable.init(table, {'trueResize' : true, 'keepWidth' : true});
setTimeout ('configureDragAndDrop ();', 500);
}
configureDragAndDrop ();
configureMessageListBodyEvents(table);
var selected = http.callbackData;
@@ -1756,6 +1756,7 @@ function onLoadMailboxesCallback(http) {
checkAjaxRequestsState();
getFoldersState();
updateStatusFolders();
configureDragAndDrop ();
}
}
else
@@ -2231,6 +2232,9 @@ Mailbox.prototype = {
function configureDragAndDrop () {
Droppables.empty ();
Draggables.empty ();
var mainElement = new Element ("div", {id: "dragDropVisual"});
document.body.appendChild(mainElement);
mainElement.absolutize ();
+9
View File
@@ -12,6 +12,10 @@ if(Object.isUndefined(Effect))
var Droppables = {
drops: [],
empty: function () {
this.drops = [];
},
remove: function(element) {
this.drops = this.drops.reject(function(d) { return d.element==$(element) });
},
@@ -129,6 +133,11 @@ var Draggables = {
drags: [],
observers: [],
empty: function () {
this.drags = [];
this.observers = [];
},
register: function(draggable) {
if(this.drags.length == 0) {
this.eventMouseUp = this.endDrag.bindAsEventListener(this);