Author: jablko
Date: Tue Oct  6 11:23:52 2009
New Revision: 3678

Log:
Restore drag and drop behavior after tree view node refresh, fixes issue 1030 
-- force

Modified:
   trunk/web/js/treeView.js

Modified: trunk/web/js/treeView.js
==============================================================================
--- trunk/web/js/treeView.js    Tue Oct  6 11:10:04 2009        (r3677)
+++ trunk/web/js/treeView.js    Tue Oct  6 11:23:52 2009        (r3678)
@@ -33,10 +33,34 @@
                   url: 
textNode.href.replace(/\/(informationobject|term)\/\D*(\d+)/, '/$1/move/$2') });
 
                 parentNode.tree.popNode(textNode);
+
                 parentNode.refresh();
 
+                $('.ygtvlabel', '#' + 
parentNode.getChildrenElId()).each(function ()
+                  {
+                    var dd = 
YAHOO.util.DragDropMgr.getDDById($(this).attr('id'));
+
+                    dd.unreg();
+
+                    dd.init($(this).attr('id'));
+
+                    dd.invalidHandleTypes = {};
+                  });
+
                 textNode.appendTo(newParent);
+
                 newParent.refresh();
+
+                $('.ygtvlabel', '#' + 
newParent.getChildrenElId()).each(function ()
+                  {
+                    var dd = 
YAHOO.util.DragDropMgr.getDDById($(this).attr('id'));
+
+                    dd.unreg();
+
+                    dd.init($(this).attr('id'));
+
+                    dd.invalidHandleTypes = {};
+                  });
               };
 
             dd.endDrag = function ()
@@ -88,10 +112,34 @@
                         url: 
tmp.href.replace(/\/(informationobject|term)\/\D*(\d+)/, '/$1/move/$2') });
 
                       node.tree.popNode(tmp);
+
                       node.refresh();
 
+                      $('.ygtvlabel', '#' + 
node.getChildrenElId()).each(function ()
+                        {
+                          var dd = 
YAHOO.util.DragDropMgr.getDDById($(this).attr('id'));
+
+                          dd.unreg();
+
+                          dd.init($(this).attr('id'));
+
+                          dd.invalidHandleTypes = {};
+                        });
+
                       tmp.appendTo(newParent);
+
                       newParent.refresh();
+
+                      $('.ygtvlabel', '#' + 
newParent.getChildrenElId()).each(function ()
+                        {
+                          var dd = 
YAHOO.util.DragDropMgr.getDDById($(this).attr('id'));
+
+                          dd.unreg();
+
+                          dd.init($(this).attr('id'));
+
+                          dd.invalidHandleTypes = {};
+                        });
                     };
 
                   dd.endDrag = function ()

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to