Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit 0cfbe139c33c6e16662f08b7f7959d7e6b381109 1 parent 175a0ae
Benjamin Hanzelmann nabcos authored cstamas committed
11 nexus/nexus-webapp/src/main/webapp/js/nexus/ext/twinpanelcontroller.js
@@ -131,14 +131,8 @@ Ext.extend(Nexus.ext.TwinPanelController, Ext.Panel, {
131 131 }
132 132 if (moveAll)
133 133 {
134   - for (i = 0; i < fromRoot.childNodes.length; i=i+1)
135   - {
136   - node = fromRoot.childNodes[i];
137   - if (checkIfDragAllowed(node))
138   - {
139   - toRoot.appendChild(node);
140   - i = i-1;
141   - }
  134 + while (fromRoot.firstChild) {
  135 + toRoot.appendChild(fromRoot.firstChild);
142 136 }
143 137 }
144 138 else
@@ -152,7 +146,6 @@ Ext.extend(Nexus.ext.TwinPanelController, Ext.Panel, {
152 146 if (checkIfDragAllowed(node))
153 147 {
154 148 toRoot.appendChild(node);
155   - i = i-1;
156 149 }
157 150 }
158 151 }

0 comments on commit 0cfbe13

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