From fc6907dcfe35f2341528620ccedf2db02a30d065 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 6 Jan 2011 11:46:15 -0800 Subject: Switch back to setting nodes as leaves, but fix the drop zone code to allow dropping on leaves. --- modules/organize/views/organize_frame.html.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'modules/organize/views/organize_frame.html.php') diff --git a/modules/organize/views/organize_frame.html.php b/modules/organize/views/organize_frame.html.php index 13a5ff5c..cfc3933c 100644 --- a/modules/organize/views/organize_frame.html.php +++ b/modules/organize/views/organize_frame.html.php @@ -345,6 +345,13 @@ return returnCls; } + // Override Ext.tree.TreeDropZone.getDropPoint so that it allows dropping + // on any node. The standard function won't let you drop on leaves, but + // in our model we consider an album without sub-albums a leaf. + v.dropZone.getDropPoint = function(e, n, dd) { + return "append"; + } + v.dropZone.onNodeDrop = function(target, dd, e, data) { var nodes = data.nodes; source_ids = []; -- cgit v1.2.3