##// END OF EJS Templates
redirect url after notebook rename
Zachary Sailer -
Show More
@@ -21,7 +21,6 b' from tornado import web'
21 21 from zmq.utils import jsonapi
22 22
23 23 from IPython.utils.jsonutil import date_default
24
25 24 from ...base.handlers import IPythonHandler, authenticate_unless_readonly
26 25
27 26 #-----------------------------------------------------------------------------
@@ -47,8 +47,7 b' var IPython = (function (IPython) {'
47 47 that.update_document_title();
48 48 });
49 49 $([IPython.events]).on('notebook_renamed.Notebook', function () {
50 that.update_notebook_name();
51 that.update_document_title();
50 that.update_address_bar();
52 51 });
53 52 $([IPython.events]).on('notebook_save_failed.Notebook', function () {
54 53 that.set_save_status('Autosave Failed!');
@@ -124,6 +123,12 b' var IPython = (function (IPython) {'
124 123 document.title = nbname;
125 124 };
126 125
126 SaveWidget.prototype.update_address_bar = function(){
127 var nbname = IPython.notebook.notebook_name;
128 var path = IPython.notebook.notebookPath();
129 window.location = path + nbname;
130 }
131
127 132
128 133 SaveWidget.prototype.set_save_status = function (msg) {
129 134 this.element.find('span#autosave_status').html(msg);
@@ -53,7 +53,7 b' class ProjectPathDashboardHandler(IPythonHandler):'
53 53 project=project,
54 54 project_component=project.split('/'),
55 55 notebook_path=path,
56 notebook_name=quote(name)))
56 notebook_name=name))
57 57
58 58
59 59 class TreeRedirectHandler(IPythonHandler):
General Comments 0
You need to be logged in to leave comments. Login now