From b2fe5a4069f80fe2ca70845297193b3b378c301c Mon Sep 17 00:00:00 2001 From: Tim Head Date: Sun, 22 Oct 2017 11:12:20 +0200 Subject: [PATCH 1/2] Add toolbar icon to restart and run all --- notebook/static/notebook/js/actions.js | 1 + notebook/static/notebook/js/maintoolbar.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/notebook/static/notebook/js/actions.js b/notebook/static/notebook/js/actions.js index f9fcfcbb14..508b1b1f70 100644 --- a/notebook/static/notebook/js/actions.js +++ b/notebook/static/notebook/js/actions.js @@ -117,6 +117,7 @@ define([ } }, 'confirm-restart-kernel-and-run-all-cells': { + icon: 'fa-recycle', cmd: i18n.msg._('confirm restart kernel and run all cells'), help: i18n.msg._('restart the kernel, then re-run the whole notebook (with dialog)'), handler: function (env) { diff --git a/notebook/static/notebook/js/maintoolbar.js b/notebook/static/notebook/js/maintoolbar.js index e0ef4482be..bd787aa09d 100644 --- a/notebook/static/notebook/js/maintoolbar.js +++ b/notebook/static/notebook/js/maintoolbar.js @@ -53,7 +53,8 @@ define([ [ [new toolbar.Button('jupyter-notebook:run-cell-and-select-next', {label: i18n.msg._('Run')}), 'jupyter-notebook:interrupt-kernel', - 'jupyter-notebook:confirm-restart-kernel' + 'jupyter-notebook:confirm-restart-kernel', + 'jupyter-notebook:confirm-restart-kernel-and-run-all-cells' ], 'run_int'], [''], @@ -61,7 +62,7 @@ define([ ]; this.construct(grps); }; - + MainToolBar.prototype._pseudo_actions = {}; // add a cell type drop down to the maintoolbar. From 3c83c85095bf8883cf912c71c4a025539f626dfc Mon Sep 17 00:00:00 2001 From: Tim Head Date: Tue, 7 Nov 2017 17:52:37 +0100 Subject: [PATCH 2/2] Switch to fa-repeat and remove restart button --- notebook/static/notebook/js/actions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebook/static/notebook/js/actions.js b/notebook/static/notebook/js/actions.js index 508b1b1f70..2bc20d2f32 100644 --- a/notebook/static/notebook/js/actions.js +++ b/notebook/static/notebook/js/actions.js @@ -117,7 +117,7 @@ define([ } }, 'confirm-restart-kernel-and-run-all-cells': { - icon: 'fa-recycle', + icon: 'fa-forward', cmd: i18n.msg._('confirm restart kernel and run all cells'), help: i18n.msg._('restart the kernel, then re-run the whole notebook (with dialog)'), handler: function (env) {