Sort elements and element categories in element summary boxes.
--- a/publish/processing.js Tue Aug 21 15:34:52 2012 +1000
+++ b/publish/processing.js Tue Aug 21 16:05:19 2012 +1000
@@ -417,7 +417,7 @@
}
var ul = utils.parse('<ul class="no-bullets"></ul>');
- element.elementCategories.forEach(function(name) {
+ element.elementCategories.concat().sort().forEach(function(name) {
var cat = conf.definitions.elementCategories[name];
if (!cat) {
return utils.parse('<li><a href="data:," style="background: red; color: white">@@ unknown element category "{{name}}"</a><li>', { name: name });
@@ -429,7 +429,7 @@
ul.appendChild(li);
});
- element.elements.forEach(function(name) {
+ element.elements.concat().sort().forEach(function(name) {
var e = conf.definitions.elements[name];
if (!e) {
return utils.parse('<li><a href="data:," style="background: red; color: white">@@ unknown element "{{name}}"</a><li>', { name: name });