Commit 4718c9a5 by cahrens

Forgot to define self when I moved code.

parent 950f5de3
...@@ -54,6 +54,7 @@ CMS.Views.Settings.Advanced = CMS.Views.ValidatingView.extend({ ...@@ -54,6 +54,7 @@ CMS.Views.Settings.Advanced = CMS.Views.ValidatingView.extend({
}, },
afterRender: function () { afterRender: function () {
var self = this;
var listEle$ = this.$el.find('.course-advanced-policy-list'); var listEle$ = this.$el.find('.course-advanced-policy-list');
var policyValueDivs = listEle$.find('.ace'); var policyValueDivs = listEle$.find('.ace');
_.each(policyValueDivs, _.each(policyValueDivs,
...@@ -67,7 +68,7 @@ CMS.Views.Settings.Advanced = CMS.Views.ValidatingView.extend({ ...@@ -67,7 +68,7 @@ CMS.Views.Settings.Advanced = CMS.Views.ValidatingView.extend({
// TODO: error checking in case it does not parse! // TODO: error checking in case it does not parse!
var quotedValue = editor.getValue(); var quotedValue = editor.getValue();
var JSONValue = JSON.parse(quotedValue); var JSONValue = JSON.parse(quotedValue);
self.model.set(key, JSONValue, {validate:true}); self.model.set(key, JSONValue, {validate: true});
}); });
// Calling getSession() directly in render causes a crash on Chrome. // Calling getSession() directly in render causes a crash on Chrome.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment