mirror of
https://github.com/wassname/jupyter_contrib_nbextensions.git
synced 2026-06-27 16:10:24 +08:00
Use Jupyter.actions API
This commit is contained in:
@@ -19,7 +19,6 @@ define([
|
||||
|
||||
// define default config parameter values
|
||||
var params = {
|
||||
show_cellstate: false,
|
||||
run_cells_above: 'Alt-a',
|
||||
run_cells_below: 'Alt-b',
|
||||
toggle_marker: 'Alt-t',
|
||||
@@ -78,14 +77,13 @@ define([
|
||||
add_gutter_events();
|
||||
|
||||
/* Add run control buttons to toolbar */
|
||||
Jupyter.toolbar.add_buttons_group([{
|
||||
id: 'toggle_runtools',
|
||||
label: 'Toggle Runtools Toolbar',
|
||||
icon: 'fa-cogs',
|
||||
callback: function() {
|
||||
toggle_toolbar();
|
||||
}
|
||||
}]);
|
||||
Jupyter.toolbar.add_buttons_group([
|
||||
Jupyter.actions.register ({
|
||||
help: 'Toggle Runtools Toolbar',
|
||||
icon: 'fa-cogs',
|
||||
handler: toggle_toolbar
|
||||
}, 'toggle_runtools')
|
||||
]);
|
||||
$("#toggle_runtools").css({
|
||||
'outline': 'none'
|
||||
});
|
||||
|
||||
@@ -6,11 +6,6 @@ Icon: icon.png
|
||||
Main: main.js
|
||||
Compatibility: 4.x, 5.x
|
||||
Parameters:
|
||||
- name: runtools.show_cellstate
|
||||
description: |
|
||||
Display indicator for individual cell state (locked, modified, rund)
|
||||
default: false
|
||||
input_type: checkbox
|
||||
- name: runtools.run_cells_above
|
||||
description: run cells above
|
||||
input_type: hotkey
|
||||
|
||||
Reference in New Issue
Block a user