Merge pull request #692 from Carreau/moar-actions-III

Moar actions iii
Matthias Bussonnier 11 years ago
commit 226a0c8676

@ -306,14 +306,14 @@ define(function(require){
env.notebook.to_heading(undefined, 6);
}
},
'toggle-cell-output-visibility' : {
'toggle-cell-output-collapsed' : {
help : 'toggle output',
help_index : 'gb',
handler : function (env) {
env.notebook.toggle_output();
}
},
'toggle-cell-output-scrolling' : {
'toggle-cell-output-scrolled' : {
help : 'toggle output scrolling',
help_index : 'gc',
handler : function (env) {
@ -563,6 +563,25 @@ define(function(require){
env.notebook.save_widget.rename_notebook({notebook: env.notebook});
}
},
'toggle-all-cells-output-collapsed':{
help: "Toggle the hiddens state of all output areas",
handler : function (env, event) {
env.notebook.toggle_all_output();
}
},
'toggle-all-cells-output-scrolled':{
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',

@ -89,7 +89,7 @@ define([
'shift-space': 'jupyter-notebook:scroll-notebook-up',
'shift-v' : 'jupyter-notebook:paste-cell-above',
'shift-m' : 'jupyter-notebook:merge-cells',
'shift-o' : 'jupyter-notebook:toggle-cell-output-scrolling',
'shift-o' : 'jupyter-notebook:toggle-cell-output-scrolled',
'enter' : 'jupyter-notebook:enter-edit-mode',
'space' : 'jupyter-notebook:scroll-notebook-down',
'down' : 'jupyter-notebook:select-next-cell',
@ -118,7 +118,7 @@ define([
'4' : 'jupyter-notebook:change-cell-to-heading-4',
'5' : 'jupyter-notebook:change-cell-to-heading-5',
'6' : 'jupyter-notebook:change-cell-to-heading-6',
'o' : 'jupyter-notebook:toggle-cell-output-visibility',
'o' : 'jupyter-notebook:toggle-cell-output-collapsed',
's' : 'jupyter-notebook:save-notebook',
'l' : 'jupyter-notebook:toggle-cell-line-numbers',
'h' : 'jupyter-notebook:show-keyboard-shortcuts',

@ -226,9 +226,12 @@ define([
'#to_code': 'change-cell-to-code',
'#to_markdown': 'change-cell-to-markdown',
'#to_raw': 'change-cell-to-raw',
'#toggle_current_output': 'toggle-cell-output-visibility',
'#toggle_current_output_scroll': 'toggle-cell-output-scrolling',
'#toggle_current_output': 'toggle-cell-output-collapsed',
'#toggle_current_output_scroll': 'toggle-cell-output-scrolled',
'#clear_current_output': 'clear-cell-output',
'#toggle_all_output': 'toggle-all-cells-output-collapsed',
'#toggle_all_output_scroll': 'toggle-all-cells-output-scrolled',
'#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();

Loading…
Cancel
Save