diff --git a/notebook/static/notebook/js/actions.js b/notebook/static/notebook/js/actions.js index 84a1444a3..ca82fafa3 100644 --- a/notebook/static/notebook/js/actions.js +++ b/notebook/static/notebook/js/actions.js @@ -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', diff --git a/notebook/static/notebook/js/menubar.js b/notebook/static/notebook/js/menubar.js index 2deddb984..f672357b4 100644 --- a/notebook/static/notebook/js/menubar.js +++ b/notebook/static/notebook/js/menubar.js @@ -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();