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