Show More
@@ -1739,10 +1739,10 b' var IPython = (function (IPython) {' | |||||
1739 | * @method save_notebook_error |
|
1739 | * @method save_notebook_error | |
1740 | * @param {jqXHR} xhr jQuery Ajax object |
|
1740 | * @param {jqXHR} xhr jQuery Ajax object | |
1741 | * @param {String} status Description of response status |
|
1741 | * @param {String} status Description of response status | |
1742 |
* @param {String} error |
|
1742 | * @param {String} error HTTP error message | |
1743 | */ |
|
1743 | */ | |
1744 |
Notebook.prototype.save_notebook_error = function (xhr, status, error |
|
1744 | Notebook.prototype.save_notebook_error = function (xhr, status, error) { | |
1745 | $([IPython.events]).trigger('notebook_save_failed.Notebook'); |
|
1745 | $([IPython.events]).trigger('notebook_save_failed.Notebook', [xhr, status, error]); | |
1746 | }; |
|
1746 | }; | |
1747 |
|
1747 | |||
1748 | Notebook.prototype.new_notebook = function(){ |
|
1748 | Notebook.prototype.new_notebook = function(){ | |
@@ -1835,12 +1835,13 b' var IPython = (function (IPython) {' | |||||
1835 | $([IPython.events]).trigger('notebook_renamed.Notebook', json); |
|
1835 | $([IPython.events]).trigger('notebook_renamed.Notebook', json); | |
1836 | } |
|
1836 | } | |
1837 |
|
1837 | |||
1838 |
Notebook.prototype.rename_error = function ( |
|
1838 | Notebook.prototype.rename_error = function (xhr, status, error) { | |
1839 | var that = this; |
|
1839 | var that = this; | |
1840 | var dialog = $('<div/>').append( |
|
1840 | var dialog = $('<div/>').append( | |
1841 | $("<p/>").addClass("rename-message") |
|
1841 | $("<p/>").addClass("rename-message") | |
1842 | .html('This notebook name already exists.') |
|
1842 | .html('This notebook name already exists.') | |
1843 | ) |
|
1843 | ) | |
|
1844 | $([IPython.events]).trigger('notebook_rename_failed.Notebook', [xhr, status, error]); | |||
1844 | IPython.dialog.modal({ |
|
1845 | IPython.dialog.modal({ | |
1845 | title: "Notebook Rename Error!", |
|
1846 | title: "Notebook Rename Error!", | |
1846 | body: dialog, |
|
1847 | body: dialog, | |
@@ -1963,12 +1964,13 b' var IPython = (function (IPython) {' | |||||
1963 | * |
|
1964 | * | |
1964 | * @method load_notebook_error |
|
1965 | * @method load_notebook_error | |
1965 | * @param {jqXHR} xhr jQuery Ajax object |
|
1966 | * @param {jqXHR} xhr jQuery Ajax object | |
1966 |
* @param {String} |
|
1967 | * @param {String} status Description of response status | |
1967 |
* @param {String} error |
|
1968 | * @param {String} error HTTP error message | |
1968 | */ |
|
1969 | */ | |
1969 |
Notebook.prototype.load_notebook_error = function (xhr, |
|
1970 | Notebook.prototype.load_notebook_error = function (xhr, status, error) { | |
|
1971 | $([IPython.events]).trigger('notebook_load_failed.Notebook', [xhr, status, error]); | |||
1970 | if (xhr.status === 400) { |
|
1972 | if (xhr.status === 400) { | |
1971 |
var msg = error |
|
1973 | var msg = error; | |
1972 | } else if (xhr.status === 500) { |
|
1974 | } else if (xhr.status === 500) { | |
1973 | var msg = "An unknown error occurred while loading this notebook. " + |
|
1975 | var msg = "An unknown error occurred while loading this notebook. " + | |
1974 | "This version can load notebook formats " + |
|
1976 | "This version can load notebook formats " + |
General Comments 0
You need to be logged in to leave comments.
Login now