if (this.debug) {
YAHOO.log("Swapping "+this.getEl().id+" with "+sectionIn.getEl().id);
}
+ // Swap the sections.
YAHOO.util.DDM.swapNode(this.getEl(), sectionIn.getEl());
+
+ // Sections contain forms to add new resources/activities. These forms
+ // have not been updated to reflect the new positions of the sections that
+ // we have swapped. Let's swap the two sections' forms around.
+ if (this.getEl().getElementsByTagName('form')[0].parentNode
+ && sectionIn.getEl().getElementsByTagName('form')[0].parentNode) {
+
+ YAHOO.util.DDM.swapNode(this.getEl().getElementsByTagName('form')[0].parentNode,
+ sectionIn.getEl().getElementsByTagName('form')[0].parentNode);
+ } else {
+ YAHOO.log("Swapping sections: form not present in one or both sections", "warn");
+ }
}