mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-06 11:35:24 +08:00
add future-warning about multiple notebooks
This commit is contained in:
parent
224f024257
commit
18bb591723
@ -1025,6 +1025,27 @@ var IPython = (function (IPython) {
|
||||
new_cell.fromJSON(cell_data);
|
||||
};
|
||||
};
|
||||
if (data.worksheets.length > 1) {
|
||||
var dialog = $('<div/>');
|
||||
dialog.html("This notebook has " + data.worksheets.length + " worksheets, " +
|
||||
"but this version of IPython can only handle the first. " +
|
||||
"If you save this notebook, worksheets after the first will be lost."
|
||||
);
|
||||
this.element.append(dialog);
|
||||
dialog.dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
title: "Multiple worksheets",
|
||||
closeText: "",
|
||||
close: function(event, ui) {$(this).dialog('destroy').remove();},
|
||||
buttons : {
|
||||
"OK": function () {
|
||||
$(this).dialog('close');
|
||||
}
|
||||
},
|
||||
width: 400
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user