Oops, when i alphabetized i got the value incorrectly.

Fixed cancel to not retain new entries.
This commit is contained in:
Don Mitchell
2013-02-06 09:08:28 -05:00
parent 592d7e532b
commit 05ec0c11c6

View File

@@ -61,7 +61,7 @@ CMS.Views.Settings.Advanced = CMS.Views.ValidatingView.extend({
var self = this;
_.each(_.sortBy(_.keys(this.model.attributes), _.identity),
function(key) {
listEle$.append(self.template({ key : key, value : self[key]}));
listEle$.append(self.template({ key : key, value : self.model.get(key)}));
self.fieldToSelectorMap[key] = key;
});
@@ -122,6 +122,7 @@ CMS.Views.Settings.Advanced = CMS.Views.ValidatingView.extend({
revertView : function(event) {
this.model.deleteKeys = [];
var self = this;
this.model.clear({silent : true});
this.model.fetch({
success : function() { self.render(); },
error : CMS.ServerError