Skip to content
Browse files

Fix TwinPanelController move buttons

Previous implementation seemed to rely on the side effect that moving DOM
nodes also impacted the selected nodes.

Fixed the bug and some wacky code.
  • Loading branch information...
1 parent 175a0ae commit 0cfbe139c33c6e16662f08b7f7959d7e6b381109 @nabcos nabcos committed with cstamas Nov 16, 2012
Showing with 2 additions and 9 deletions.
  1. +2 −9 nexus/nexus-webapp/src/main/webapp/js/nexus/ext/twinpanelcontroller.js
View
11 nexus/nexus-webapp/src/main/webapp/js/nexus/ext/twinpanelcontroller.js
@@ -131,14 +131,8 @@ Ext.extend(Nexus.ext.TwinPanelController, Ext.Panel, {
}
if (moveAll)
{
- for (i = 0; i < fromRoot.childNodes.length; i=i+1)
- {
- node = fromRoot.childNodes[i];
- if (checkIfDragAllowed(node))
- {
- toRoot.appendChild(node);
- i = i-1;
- }
+ while (fromRoot.firstChild) {
+ toRoot.appendChild(fromRoot.firstChild);
}
}
else
@@ -152,7 +146,6 @@ Ext.extend(Nexus.ext.TwinPanelController, Ext.Panel, {
if (checkIfDragAllowed(node))
{
toRoot.appendChild(node);
- i = i-1;
}
}
}

0 comments on commit 0cfbe13

Please sign in to comment.
Something went wrong with that request. Please try again.