From 463c49d09fc3ab3a3133ba8f915eedcd7c5faa55 2014-11-15 01:06:58 From: Thomas Kluyver Date: 2014-11-15 01:06:58 Subject: [PATCH] Fix some other bugs --- diff --git a/IPython/html/static/services/config.js b/IPython/html/static/services/config.js index c83bb6c..a3632f7 100644 --- a/IPython/html/static/services/config.js +++ b/IPython/html/static/services/config.js @@ -24,7 +24,7 @@ function($, utils) { }; ConfigSection.prototype.api_url = function() { - return utils.url_join_encode(this.base_url, 'api/config', that.section_name); + return utils.url_join_encode(this.base_url, 'api/config', this.section_name); }; ConfigSection.prototype._load_done = function() { @@ -35,18 +35,20 @@ function($, utils) { }; ConfigSection.prototype.load = function() { + var that = this; return utils.promising_ajax(this.api_url(), { cache: false, type: "GET", dataType: "json", }).then(function(data) { - this.data = data; - this._load_done(); + that.data = data; + that._load_done(); return data; }); }; ConfigSection.prototype.update = function(newdata) { + var that = this; return utils.promising_ajax(this.api_url(), { processData: false, type : "PATCH", @@ -54,8 +56,8 @@ function($, utils) { dataType : "json", contentType: 'application/json', }).then(function(data) { - this.data = data; - this._load_done(); + that.data = data; + that._load_done(); return data; }); };