From 648a0cf14c98cdf4c6277db1f472356ca4d00a5f Mon Sep 17 00:00:00 2001 From: Antonio Feregrino Date: Wed, 5 Dec 2018 23:14:10 +0000 Subject: [PATCH] Actual recover. --- jupygit/static/index.js | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/jupygit/static/index.js b/jupygit/static/index.js index 470428e..e6acb60 100644 --- a/jupygit/static/index.js +++ b/jupygit/static/index.js @@ -125,7 +125,29 @@ define([ }, success: function(d) { if (d['try_to_recover']) { - alert('Try to recover!'); + + + var modal = dialog.modal({ + backdrop: 'static', + keyboard: false, + show: true, + title: Jupyter.notebook.notebook_name + ' seems dirty!', + body: 'Do you want to restore your notebook\'s name?', + buttons: { + 'Recover' : { + class: 'btn-primary btn-large', + click: function () { + nbname = Jupyter.notebook.notebook_name; + Jupyter.original_name = nbname.substring(0, nbname.length - file_suffix.length); + make_request(); + } + }, + 'Close': { + class: 'btn-default btn-large' + } + } + }); + } }, url: check_url