'more actions'

This commit is contained in:
Matthias Bussonnier 2015-10-29 16:50:14 -07:00
parent 453b6a864a
commit 38135d145d
2 changed files with 22 additions and 10 deletions

View File

@ -563,6 +563,25 @@ define(function(require){
env.notebook.save_widget.rename_notebook({notebook: env.notebook});
}
},
'toggle-all-cells-output-visibility':{
help: "Toggle the hiddens state of all output areas",
handler : function (env, event) {
env.notebook.toggle_all_output();
}
},
'toggle-all-cells-output-scrolling':{
help: "Toggle the scrolling state of all output areas",
handler : function (env, event) {
env.notebook.toggle_all_output_scroll();
}
},
'clear-all-cells-output':{
help: "Clear the content of all the outputs",
handler : function (env, event) {
env.notebook.clear_all_output();
}
},
'save-notebook':{
help: "Save and Checkpoint",
help_index : 'fb',

View File

@ -229,6 +229,9 @@ define([
'#toggle_current_output': 'toggle-cell-output-visibility',
'#toggle_current_output_scroll': 'toggle-cell-output-scrolling',
'#clear_current_output': 'clear-cell-output',
'#toggle_all_output': 'toggle-all-cells-output-visibility',
'#toggle_all_output_scroll': 'toggle-all-cells-output-scrolling',
'#clear_all_output': 'clear-all-cells-output',
};
for(var idx in id_actions_dict){
@ -248,16 +251,6 @@ define([
}
this.element.find('#toggle_all_output').click(function () {
that.notebook.toggle_all_output();
});
this.element.find('#toggle_all_output_scroll').click(function () {
that.notebook.toggle_all_output_scroll();
});
this.element.find('#clear_all_output').click(function () {
that.notebook.clear_all_output();
});
// Kernel
this.element.find('#reconnect_kernel').click(function () {
that.notebook.kernel.reconnect();