Add number of spaces for formatting of JSON.

This commit is contained in:
cahrens
2013-02-20 10:56:49 -05:00
parent 6981ba4e3f
commit 305f0b2a54
2 changed files with 16 additions and 2 deletions

View File

@@ -45,7 +45,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 : JSON.stringify(self.model.get(key))}));
listEle$.append(self.template({ key : key, value : JSON.stringify(self.model.get(key), null, 4)}));
self.fieldToSelectorMap[key] = key;
});
var policyValues = listEle$.find('.json');