Skip to content
This repository has been archived by the owner on May 9, 2022. It is now read-only.

Commit

Permalink
Actual recover.
Browse files Browse the repository at this point in the history
  • Loading branch information
fferegrino committed Dec 5, 2018
1 parent 4df1667 commit 648a0cf
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion jupygit/static/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 648a0cf

Please sign in to comment.