See ChangeLog.

Monotone-Parent: e95efe8673a67dc9bd15ec54ca217af1e21e9dbb
Monotone-Revision: f0aff6d064b474daad4423a6fe416a4b18b4ab7c

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2012-03-29T17:47:28
This commit is contained in:
Francis Lachapelle
2012-03-29 17:47:28 +00:00
parent f63d9336b5
commit 97bc9be439
7 changed files with 60 additions and 24 deletions

View File

@@ -148,8 +148,6 @@ function contactsListCallback(http) {
cell.appendChild(document.createTextNode(contact["c_telephonenumber"]));
}
}
configureDraggables();
}
// Remove unnecessary rows
@@ -1510,7 +1508,7 @@ function configureDroppables() {
});
}
function currentFolderIsRemote () {
function currentFolderIsRemote() {
rc = false;
var selectedFolders = $("contactFolders").getSelectedNodes();
if (selectedFolders.length > 0) {
@@ -1520,7 +1518,7 @@ function currentFolderIsRemote () {
return rc;
}
function startDragging (itm, e) {
function startDragging(itm, e) {
if (!Event.isLeftClick(e))
return;
var target = Event.element(e);
@@ -1528,6 +1526,19 @@ function startDragging (itm, e) {
return;
$("contactsListContent").setStyle({ overflow: "visible" });
// Create overlapping safety block to avoid selection issues
var rightSafetyBlock = $("rightSafetyBlock");
if (!rightSafetyBlock) {
rightSafetyBlock = new Element('div', {'id': 'rightSafetyBlock', 'class': 'safetyBlock'});
document.body.appendChild(rightSafetyBlock);
}
var rightBlock = $("rightPanel");
rightSafetyBlock.setStyle({
top: rightBlock.getStyle('top'),
left: rightBlock.getStyle('left') });
rightSafetyBlock.show();
var handle = $("dragDropVisual");
var contacts = $('contactsList').getSelectedRowsId();
var count = contacts.length;
@@ -1546,16 +1557,19 @@ function startDragging (itm, e) {
handle.show();
}
function whileDragging (itm, e) {
var handle = $("dragDropVisual");
if (e.shiftKey || currentFolderIsRemote ())
handle.addClassName ("copy");
else if (handle.hasClassName ("copy"))
handle.removeClassName ("copy");
function whileDragging(itm, e) {
if (e) {
var handle = $("dragDropVisual");
if (e.shiftKey || currentFolderIsRemote())
handle.addClassName ("copy");
else if (handle.hasClassName ("copy"))
handle.removeClassName ("copy");
}
}
function stopDragging () {
$("contactsListContent").setStyle({ overflow: "auto", overflowX: "hidden" });
$("rightSafetyBlock").hide();
var handle = $("dragDropVisual");
handle.hide();
if (handle.hasClassName ("copy"))