reciprocity/ggrc-core — pull request #1226 by bmomberger-reciprocity (2014-04-07 21:30:36+00:00)
Title: Fix initial sort for inner nav.

We were previously using selection sort to sort things appropriately, but selection sort only works at point n if points [0,n-1] are already sorted, which may not be true for the content widgets. So I've changed the strategy to use swap sort: if object is at index m and needs to move to index n, swap the two elements at indexes m and n. This preserves the location of items that are not part of the re-sorting, and e.g. leaves Objectives at position 5 after putting it tthere first.