mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
add download link to editor
This commit is contained in:
parent
95ac0675c9
commit
23fad40f6d
@ -74,6 +74,11 @@ define([
|
||||
this.element.find('#rename-file').click(function () {
|
||||
that.save_widget.rename();
|
||||
});
|
||||
this.element.find('#download-file').click(function () {
|
||||
window.open(utils.url_join_encode(
|
||||
that.base_url, 'files', that.editor.file_path
|
||||
) + '?download=1');
|
||||
});
|
||||
|
||||
// Edit
|
||||
this.element.find('#menu-find').click(function () {
|
||||
|
@ -48,6 +48,7 @@ data-file-path="{{file_path}}"
|
||||
<li id="new-file"><a href="#">New</a></li>
|
||||
<li id="save-file"><a href="#">Save</a></li>
|
||||
<li id="rename-file"><a href="#">Rename</a></li>
|
||||
<li id="download-file"><a href="#">Download</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Edit</a>
|
||||
|
Loading…
Reference in New Issue
Block a user