mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-30 12:11:32 +08:00
drop file ext off notebook name in notebook
This commit is contained in:
parent
f55381d55b
commit
6114d4c338
@ -1530,7 +1530,8 @@ var IPython = (function (IPython) {
|
|||||||
* @return {String} This notebook's name
|
* @return {String} This notebook's name
|
||||||
*/
|
*/
|
||||||
Notebook.prototype.get_notebook_name = function () {
|
Notebook.prototype.get_notebook_name = function () {
|
||||||
return this.notebook_name;
|
nbname = this.notebook_name.substring(0,this.notebook_name.length-6);
|
||||||
|
return nbname;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1680,7 +1681,6 @@ var IPython = (function (IPython) {
|
|||||||
|
|
||||||
// time the ajax call for autosave tuning purposes.
|
// time the ajax call for autosave tuning purposes.
|
||||||
var start = new Date().getTime();
|
var start = new Date().getTime();
|
||||||
console.log(JSON.stringify(data))
|
|
||||||
// We do the call with settings so we can set cache to false.
|
// We do the call with settings so we can set cache to false.
|
||||||
var settings = {
|
var settings = {
|
||||||
processData : false,
|
processData : false,
|
||||||
@ -1748,8 +1748,9 @@ var IPython = (function (IPython) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Notebook.prototype.notebook_rename = function (new_name) {
|
Notebook.prototype.notebook_rename = function (nbname) {
|
||||||
var that = this;
|
var that = this;
|
||||||
|
var new_name = nbname + '.ipynb'
|
||||||
var name = {'notebook_name': new_name};
|
var name = {'notebook_name': new_name};
|
||||||
var settings = {
|
var settings = {
|
||||||
processData : false,
|
processData : false,
|
||||||
|
@ -115,7 +115,6 @@ var IPython = (function (IPython) {
|
|||||||
|
|
||||||
SaveWidget.prototype.update_notebook_name = function () {
|
SaveWidget.prototype.update_notebook_name = function () {
|
||||||
var nbname = IPython.notebook.get_notebook_name();
|
var nbname = IPython.notebook.get_notebook_name();
|
||||||
console.log("UPDATED")
|
|
||||||
this.element.find('span#notebook_name').html(nbname);
|
this.element.find('span#notebook_name').html(nbname);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -225,8 +225,8 @@ var IPython = (function (IPython) {
|
|||||||
var callbacks = {
|
var callbacks = {
|
||||||
'object_info_reply': $.proxy(this._show, this)
|
'object_info_reply': $.proxy(this._show, this)
|
||||||
}
|
}
|
||||||
var oir_token = this.extract_oir_token(line)
|
var oir_token = this.extract_oir_token(line);
|
||||||
cell.kernel.object_info_request(oir_token, callbacks);
|
var msg_id = cell.session.kernel.object_info_request(oir_token, callbacks);
|
||||||
}
|
}
|
||||||
|
|
||||||
// make an imediate completion request
|
// make an imediate completion request
|
||||||
|
Loading…
Reference in New Issue
Block a user