Handle possible jQuery error with DnD of contacts

pull/12/head
Francis Lachapelle 2013-07-19 10:43:21 -04:00
parent e24c20c48a
commit 0069a4200b
1 changed files with 11 additions and 11 deletions

View File

@ -1502,18 +1502,18 @@ function unsetCategoryOnNode(contactNode, category) {
function configureDraggables() { function configureDraggables() {
if ($("contactFolders")) { if ($("contactFolders")) {
var rows = jQuery("tr.vcard"); var rows = jQuery("tr.vcard");
rows.draggable("destroy"); try { rows.draggable("destroy"); } catch (e) {}
rows.draggable({ rows.draggable({
helper: function (event) { return '<div id="dragDropVisual"></div>'; }, helper: function (event) { return '<div id="dragDropVisual"></div>'; },
start: startDragging, start: startDragging,
drag: whileDragging, drag: whileDragging,
stop: stopDragging, stop: stopDragging,
appendTo: 'body', appendTo: 'body',
cursorAt: { right: 25 }, cursorAt: { right: 25 },
scroll: false, scroll: false,
distance: 4, distance: 4,
zIndex: 20 zIndex: 20
}); });
} }
} }