mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-24 12:05:22 +08:00
Hide kernel logo if it's missing
This commit is contained in:
parent
f123b0d2ad
commit
cad0c32137
@ -97,6 +97,14 @@ define([
|
||||
that.events.trigger('spec_changed.Kernel', ks);
|
||||
}
|
||||
});
|
||||
|
||||
var logo_img = this.element.find("#current_kernel_logo")
|
||||
logo_img.on("load", function() {
|
||||
logo_img.show();
|
||||
});
|
||||
logo_img.on("error", function() {
|
||||
logo_img.hide();
|
||||
});
|
||||
};
|
||||
|
||||
return {'KernelSelector': KernelSelector};
|
||||
|
@ -42,7 +42,7 @@ class="notebook_app"
|
||||
</span>
|
||||
|
||||
<span id="kernel_selector_widget" class="pull-right dropdown">
|
||||
<img id="current_kernel_logo" src="/kernelspecs/python/logo-32.png"/>
|
||||
<img id="current_kernel_logo"/>
|
||||
<button class="dropdown-toggle btn btn-sm navbar-btn" data-toggle="dropdown" type='button' id="current_kernel_spec">
|
||||
<span class='kernel_name'>Kernel</span>
|
||||
<span class="caret"></span>
|
||||
|
Loading…
Reference in New Issue
Block a user