Browse files

Browser window title follows the name of the notebook.

  • Loading branch information...
1 parent d1499b6 commit 1786348b09bb3db62d5178689a676a97f0faa98b @ellisonbg ellisonbg committed Aug 15, 2011
Showing with 8 additions and 0 deletions.
  1. +8 −0 IPython/frontend/html/notebook/static/js/savewidget.js
View
8 IPython/frontend/html/notebook/static/js/savewidget.js
@@ -31,6 +31,7 @@ var IPython = (function (IPython) {
var that = this;
this.element.find('button#save_notebook').click(function () {
IPython.notebook.save_notebook();
+ that.set_document_title();
});
};
@@ -42,9 +43,16 @@ var IPython = (function (IPython) {
SaveWidget.prototype.set_notebook_name = function (nbname) {
this.element.find('input#notebook_name').attr('value',nbname);
+ this.set_document_title();
}
+ SaveWidget.prototype.set_document_title = function () {
+ nbname = this.get_notebook_name();
+ document.title = 'IPy: ' + nbname;
+ };
+
+
SaveWidget.prototype.get_notebook_id = function () {
return this.element.find('span#notebook_id').text()
};

0 comments on commit 1786348

Please sign in to comment.