fix notebook deletion.

do not thrust what "that" is in a 3 level deep
callback
Matthias BUSSONNIER 13 years ago
parent dbbe6f4ee1
commit 0033b3e6c5

@ -230,6 +230,7 @@ var IPython = (function (IPython) {
NotebookList.prototype.add_delete_button = function (item) {
var new_buttons = $('<span/>').addClass('item_buttons');
var notebooklist = this;
var delete_button = $('<button>Delete</button>').button().
click(function (e) {
// $(this) is the button that was clicked.
@ -257,7 +258,7 @@ var IPython = (function (IPython) {
parent_item.remove();
}
};
var url = that.baseProjectUrl() + 'notebooks/' + notebook_id;
var url = notebooklist.baseProjectUrl() + 'notebooks/' + notebook_id;
$.ajax(url, settings);
$(this).dialog('close');
},

Loading…
Cancel
Save