Show More
@@ -314,10 +314,10 define([ | |||
|
314 | 314 | }; |
|
315 | 315 | }; |
|
316 | 316 | |
|
317 | Notebook.prototype.warn_nbformat_minor = function (event) { | |
|
318 | 317 |
|
|
319 | 318 |
|
|
320 | 319 |
|
|
320 | Notebook.prototype.warn_nbformat_minor = function (event) { | |
|
321 | 321 | var v = 'v' + this.nbformat + '.'; |
|
322 | 322 | var orig_vs = v + this.nbformat_minor; |
|
323 | 323 | var this_vs = v + this.current_nbformat_minor; |
@@ -446,9 +446,9 define([ | |||
|
446 | 446 | * |
|
447 | 447 | * @return {Array} This notebook's Cell objects |
|
448 | 448 | */ |
|
449 | Notebook.prototype.get_cells = function () { | |
|
449 | 450 | // TODO: we are often calling cells as cells()[i], which we should optimize |
|
450 | 451 | // to cells(i) or a new method. |
|
451 | Notebook.prototype.get_cells = function () { | |
|
452 | 452 | return this.get_cell_elements().toArray().map(function (e) { |
|
453 | 453 | return $(e).data("cell"); |
|
454 | 454 | }); |
@@ -1988,6 +1988,10 define([ | |||
|
1988 | 1988 | }); |
|
1989 | 1989 | }; |
|
1990 | 1990 | |
|
1991 | /** | |
|
1992 | * Make a copy of the current notebook. | |
|
1993 | * @return {null} | |
|
1994 | */ | |
|
1991 | 1995 | Notebook.prototype.copy_notebook = function () { |
|
1992 | 1996 | var that = this; |
|
1993 | 1997 | var base_url = this.base_url; |
@@ -2006,6 +2010,11 define([ | |||
|
2006 | 2010 | ); |
|
2007 | 2011 | }; |
|
2008 | 2012 | |
|
2013 | /** | |
|
2014 | * Rename the notebook | |
|
2015 | * @param {string} new_name | |
|
2016 | * @return {Promise} promise that resolves when the notebook is renamed. | |
|
2017 | */ | |
|
2009 | 2018 | Notebook.prototype.rename = function (new_name) { |
|
2010 | 2019 | if (!new_name.match(/\.ipynb$/)) { |
|
2011 | 2020 | new_name = new_name + ".ipynb"; |
@@ -2024,6 +2033,10 define([ | |||
|
2024 | 2033 | ); |
|
2025 | 2034 | }; |
|
2026 | 2035 | |
|
2036 | /** | |
|
2037 | * Delete this notebook | |
|
2038 | * @return {null} | |
|
2039 | */ | |
|
2027 | 2040 | Notebook.prototype.delete = function () { |
|
2028 | 2041 | this.contents.delete(this.notebook_path); |
|
2029 | 2042 | }; |
General Comments 0
You need to be logged in to leave comments.
Login now