mirror of
https://github.com/jupyter/notebook.git
synced 2025-03-19 13:20:36 +08:00
Some fixes for the tree view
This commit is contained in:
parent
f9db65ab6f
commit
e453b160b1
@ -110,11 +110,8 @@ define([
|
||||
});
|
||||
});
|
||||
this.element.find('#open_notebook').click(function () {
|
||||
window.open(utils.url_join_encode(
|
||||
that.notebook.base_url,
|
||||
'tree',
|
||||
that.notebook.notebook_path
|
||||
));
|
||||
var parent = utils.url_path_split(that.notebook.notebook_path)[0];
|
||||
window.open(utils.url_join_encode(that.base_url, 'tree', parent));
|
||||
});
|
||||
this.element.find('#copy_notebook').click(function () {
|
||||
that.notebook.copy_notebook();
|
||||
|
@ -38,7 +38,7 @@ class TreeHandler(IPythonHandler):
|
||||
cm = self.contents_manager
|
||||
if cm.file_exists(path):
|
||||
# it's not a directory, we have redirecting to do
|
||||
model = cm.get(path, content=False)
|
||||
model = cm.get_model(path, content=False)
|
||||
# redirect to /api/notebooks if it's a notebook, otherwise /api/files
|
||||
service = 'notebooks' if model['type'] == 'notebook' else 'files'
|
||||
url = url_escape(url_path_join(
|
||||
|
Loading…
x
Reference in New Issue
Block a user