06-28-2013 04:40 PM
06-30-2013 05:35 AM
07-01-2013 05:06 PM
07-01-2013 07:45 PM
function sortSections(s1, s2) {
return (s1.properties["ws:orderIndex"] > s2.properties["ws:orderIndex"]) ? 1 : (s1.properties["ws:orderIndex"] < s2.properties["ws:orderIndex"]) ? -1 : 0;
}
sections.sort(sortSections);
07-03-2013 04:55 PM
function sortSections(s1, s2) {
return (s1.properties["ws:orderIndex"] > s2.properties["ws:orderIndex"]) ? 1 : (s1.properties["ws:orderIndex"] < s2.properties["ws:orderIndex"]) ? -1 : 0;
}
var sections = context.properties.section.sections; // Pull the child sections and passthem down.
sections.sort(sortSections);
function bubbleSort(a)
{
var swapped;
do {
swapped = false;
for (var i=0; i < a.length-1; i++) {
if (a > a[i+1]) {
var temp = a;
a = a[i+1];
a[i+1] = temp;
swapped = true;
}
}
} while (swapped);
}
var sections = context.properties.section.sections; // Pull the child sections and passthem down.
bubbleSort(a);
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.