##// END OF EJS Templates
Fix some other bugs
Thomas Kluyver -
Show More
@@ -24,7 +24,7 b' function($, utils) {'
24 24 };
25 25
26 26 ConfigSection.prototype.api_url = function() {
27 return utils.url_join_encode(this.base_url, 'api/config', that.section_name);
27 return utils.url_join_encode(this.base_url, 'api/config', this.section_name);
28 28 };
29 29
30 30 ConfigSection.prototype._load_done = function() {
@@ -35,18 +35,20 b' function($, utils) {'
35 35 };
36 36
37 37 ConfigSection.prototype.load = function() {
38 var that = this;
38 39 return utils.promising_ajax(this.api_url(), {
39 40 cache: false,
40 41 type: "GET",
41 42 dataType: "json",
42 43 }).then(function(data) {
43 this.data = data;
44 this._load_done();
44 that.data = data;
45 that._load_done();
45 46 return data;
46 47 });
47 48 };
48 49
49 50 ConfigSection.prototype.update = function(newdata) {
51 var that = this;
50 52 return utils.promising_ajax(this.api_url(), {
51 53 processData: false,
52 54 type : "PATCH",
@@ -54,8 +56,8 b' function($, utils) {'
54 56 dataType : "json",
55 57 contentType: 'application/json',
56 58 }).then(function(data) {
57 this.data = data;
58 this._load_done();
59 that.data = data;
60 that._load_done();
59 61 return data;
60 62 });
61 63 };
General Comments 0
You need to be logged in to leave comments. Login now