Drag target bigger for empty notebook dashboard

When no notebooks, show "Notebook list empty", which increase the size
of the drag target.

fixes #1492
This commit is contained in:
Matthias BUSSONNIER 2012-05-15 21:37:08 +02:00
parent 1eae6f060a
commit b2291b14dc

View File

@ -103,7 +103,16 @@ var IPython = (function (IPython) {
NotebookList.prototype.list_loaded = function (data, status, xhr) {
var len = data.length;
this.clear_list();
// Todo: remove old children
if(len == 0)
{
$(this.new_notebook_item(0))
.append(
$('<div style="margin:auto;text-align:center;color:grey"/>')
.text('Notebook list empty.')
)
}
for (var i=0; i<len; i++) {
var notebook_id = data[i].notebook_id;
var nbname = data[i].name;