diff --git a/IPython/frontend/html/notebook/static/js/menubar.js b/IPython/frontend/html/notebook/static/js/menubar.js
index fc0db88..2b5a693 100644
--- a/IPython/frontend/html/notebook/static/js/menubar.js
+++ b/IPython/frontend/html/notebook/static/js/menubar.js
@@ -129,6 +129,12 @@ var IPython = (function (IPython) {
this.element.find('#run_all_cells').click(function () {
IPython.notebook.execute_all_cells();
});
+ this.element.find('#run_all_cells_above').click(function () {
+ IPython.notebook.execute_cells_above();
+ });
+ this.element.find('#run_all_cells_below').click(function () {
+ IPython.notebook.execute_cells_below();
+ });
this.element.find('#to_code').click(function () {
IPython.notebook.to_code();
});
diff --git a/IPython/frontend/html/notebook/static/js/notebook.js b/IPython/frontend/html/notebook/static/js/notebook.js
index db7cae5..af6a8ba 100644
--- a/IPython/frontend/html/notebook/static/js/notebook.js
+++ b/IPython/frontend/html/notebook/static/js/notebook.js
@@ -1049,13 +1049,25 @@ var IPython = (function (IPython) {
};
+ Notebook.prototype.execute_cells_below = function () {
+ this.execute_cell_range(this.get_selected_index(), this.ncells());
+ that.scroll_to_bottom();
+ };
+
+ Notebook.prototype.execute_cells_above = function () {
+ this.execute_cell_range(0, this.get_selected_index());
+ };
+
Notebook.prototype.execute_all_cells = function () {
- var ncells = this.ncells();
- for (var i=0; iRun
Run in Place
Run All
+ Run All Above
+ Run All Below
Code
Markdown