From 948690df891205f3b2dad333466c788fabd48bfe 2015-02-03 00:35:24 From: Min RK Date: 2015-02-03 00:35:24 Subject: [PATCH] add download link to editor --- diff --git a/IPython/html/static/edit/js/menubar.js b/IPython/html/static/edit/js/menubar.js index 374ebe2..5b7dac5 100644 --- a/IPython/html/static/edit/js/menubar.js +++ b/IPython/html/static/edit/js/menubar.js @@ -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 () { diff --git a/IPython/html/templates/edit.html b/IPython/html/templates/edit.html index 24c679c..72d7481 100644 --- a/IPython/html/templates/edit.html +++ b/IPython/html/templates/edit.html @@ -48,6 +48,7 @@ data-file-path="{{file_path}}"
  • New
  • Save
  • Rename
  • +
  • Download