Show More
@@ -94,6 +94,7 b' define([' | |||||
94 |
|
94 | |||
95 | KernelSelector.prototype._spec_changed = function (event, ks) { |
|
95 | KernelSelector.prototype._spec_changed = function (event, ks) { | |
96 | /** event handler for spec_changed */ |
|
96 | /** event handler for spec_changed */ | |
|
97 | var that = this; | |||
97 |
|
98 | |||
98 | // update selection |
|
99 | // update selection | |
99 | this.current_selection = ks.name; |
|
100 | this.current_selection = ks.name; | |
@@ -157,6 +158,15 b' define([' | |||||
157 | console.warn("Failed to load kernel.js from ", ks.resources['kernel.js'], err); |
|
158 | console.warn("Failed to load kernel.js from ", ks.resources['kernel.js'], err); | |
158 | } |
|
159 | } | |
159 | ); |
|
160 | ); | |
|
161 | this.events.on('spec_changed.Kernel', function (evt, new_ks) { | |||
|
162 | if (ks.name != new_ks.name) { | |||
|
163 | console.warn("kernelspec %s had custom kernel.js. Forcing page reload for %s.", | |||
|
164 | ks.name, new_ks.name); | |||
|
165 | that.notebook.save_notebook().then(function () { | |||
|
166 | window.location.reload(); | |||
|
167 | }); | |||
|
168 | } | |||
|
169 | }); | |||
160 | } |
|
170 | } | |
161 | }; |
|
171 | }; | |
162 |
|
172 |
General Comments 0
You need to be logged in to leave comments.
Login now