##// END OF EJS Templates
Set notebook nbformat in toJSON
Thomas Kluyver -
Show More
@@ -1862,7 +1862,9 b' define(['
1862 }
1862 }
1863 var data = {
1863 var data = {
1864 cells: cell_array,
1864 cells: cell_array,
1865 metadata : this.metadata
1865 metadata: this.metadata,
1866 nbformat: this.nbformat,
1867 nbformat_minor: this.nbformat_minor
1866 };
1868 };
1867 if (trusted != this.trusted) {
1869 if (trusted != this.trusted) {
1868 this.trusted = trusted;
1870 this.trusted = trusted;
@@ -1905,16 +1907,12 b' define(['
1905 * @method save_notebook
1907 * @method save_notebook
1906 */
1908 */
1907 Notebook.prototype.save_notebook = function (extra_settings) {
1909 Notebook.prototype.save_notebook = function (extra_settings) {
1908 var content = $.extend(this.toJSON(), {
1909 nbformat : this.nbformat,
1910 nbformat_minor : this.nbformat_minor
1911 });
1912 // Create a JSON model to be sent to the server.
1910 // Create a JSON model to be sent to the server.
1913 var model = {
1911 var model = {
1914 name : this.notebook_name,
1912 name : this.notebook_name,
1915 path : this.notebook_path,
1913 path : this.notebook_path,
1916 type : "notebook",
1914 type : "notebook",
1917 content : content
1915 content : this.toJSON()
1918 };
1916 };
1919 // time the ajax call for autosave tuning purposes.
1917 // time the ajax call for autosave tuning purposes.
1920 var start = new Date().getTime();
1918 var start = new Date().getTime();
General Comments 0
You need to be logged in to leave comments. Login now