mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
don't disable keyboard shortcuts on main toolbar
disable them on specific select elements
This commit is contained in:
parent
1f0f8c4d57
commit
28268d9d0f
@ -25,7 +25,6 @@ define([
|
|||||||
this.events = options.events;
|
this.events = options.events;
|
||||||
this.notebook = options.notebook;
|
this.notebook = options.notebook;
|
||||||
this._make();
|
this._make();
|
||||||
this.notebook.keyboard_manager.register_events(this.element);
|
|
||||||
Object.seal(this);
|
Object.seal(this);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -74,6 +73,7 @@ define([
|
|||||||
.append($('<option/>').attr('value','markdown').text('Markdown'))
|
.append($('<option/>').attr('value','markdown').text('Markdown'))
|
||||||
.append($('<option/>').attr('value','raw').text('Raw NBConvert'))
|
.append($('<option/>').attr('value','raw').text('Raw NBConvert'))
|
||||||
.append($('<option/>').attr('value','heading').text('Heading'));
|
.append($('<option/>').attr('value','heading').text('Heading'));
|
||||||
|
this.notebook.keyboard_manager.register_events(sel);
|
||||||
this.events.on('selected_cell_type_changed.Notebook', function (event, data) {
|
this.events.on('selected_cell_type_changed.Notebook', function (event, data) {
|
||||||
if (data.cell_type === 'heading') {
|
if (data.cell_type === 'heading') {
|
||||||
sel.val('Markdown');
|
sel.val('Markdown');
|
||||||
@ -126,6 +126,7 @@ define([
|
|||||||
}
|
}
|
||||||
that.notebook.focus_cell();
|
that.notebook.focus_cell();
|
||||||
});
|
});
|
||||||
|
this.notebook.keyboard_manager.register_events(select);
|
||||||
// Setup the currently registered presets.
|
// Setup the currently registered presets.
|
||||||
var presets = celltoolbar.CellToolbar.list_presets();
|
var presets = celltoolbar.CellToolbar.list_presets();
|
||||||
for (var i=0; i<presets.length; i++) {
|
for (var i=0; i<presets.length; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user