diff --git a/voila/static/extension.js b/voila/static/extension.js index 2972c018f..2b50ffceb 100644 --- a/voila/static/extension.js +++ b/voila/static/extension.js @@ -11,8 +11,23 @@ define(['jquery', 'base/js/namespace'], function($, Jupyter) { "use strict"; var open_voila = function() { Jupyter.notebook.save_notebook().then(function () { - let voila_url = Jupyter.notebook.base_url + "voila/render/" + Jupyter.notebook.notebook_path; - window.open(voila_url) + var that = this; + IPython.dialog.modal({ + title : "Render notebook with voila", + body : $("
").text( + 'Render notebook with voila will execute all cells, are you sure to continue?' + ), + buttons : { + "Edit notebook" : {}, + "Render with voila" : { + "class" : "btn-danger", + "click" : function() { + let voila_url = Jupyter.notebook.base_url + "voila/render/" + Jupyter.notebook.notebook_path; + window.open(voila_url); + } + } + } + }); }); } var load_ipython_extension = function() {