Keys are sorted now

This commit is contained in:
Don Mitchell
2013-02-06 08:58:20 -05:00
parent 5275db9ab9
commit 592d7e532b

View File

@@ -59,9 +59,9 @@ CMS.Views.Settings.Advanced = CMS.Views.ValidatingView.extend({
// iterate through model and produce key : value editors for each property in model.get
var self = this;
_.each(this.model.attributes,
function(value, key) {
listEle$.append(self.template({ key : key, value : value}));
_.each(_.sortBy(_.keys(this.model.attributes), _.identity),
function(key) {
listEle$.append(self.template({ key : key, value : self[key]}));
self.fieldToSelectorMap[key] = key;
});