mirror of
https://github.com/jupyter/notebook.git
synced 2025-03-01 12:56:54 +08:00
add a multiselect state in maintoolbar celltype selectbox
This commit is contained in:
parent
9ff8889641
commit
b10a16d378
@ -95,7 +95,8 @@ define([
|
|||||||
.append($('<option/>').attr('value','code').text('Code'))
|
.append($('<option/>').attr('value','code').text('Code'))
|
||||||
.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'))
|
||||||
|
.append($('<option/>').attr('value','multiselect').text('-'));
|
||||||
this.notebook.keyboard_manager.register_events(sel);
|
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') {
|
||||||
@ -121,6 +122,8 @@ define([
|
|||||||
that.notebook.to_heading();
|
that.notebook.to_heading();
|
||||||
sel.val('markdown');
|
sel.val('markdown');
|
||||||
break;
|
break;
|
||||||
|
case 'multiselect':
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
console.log("unrecognized cell type:", cell_type);
|
console.log("unrecognized cell type:", cell_type);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user