Skip to content

Commit

Permalink
Use /view route for HTML files
Browse files Browse the repository at this point in the history
  • Loading branch information
gnestor committed Jan 25, 2017
1 parent 2215634 commit 07b6da4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion notebook/static/tree/js/notebooklist.js
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,8 @@ define([
var that = this;
that.selected.forEach(function(item) {
var item_path = utils.encode_uri_components(item.path);
var w = window.open(utils.url_path_join(that.base_url, '/files', utils.encode_uri_components(item_path)), IPython._target);
var item_type = item_path.endsWith('.html') ? 'view' : 'files';
var w = window.open(utils.url_path_join(that.base_url, item_type, utils.encode_uri_components(item_path)), IPython._target);
});
};

Expand Down

0 comments on commit 07b6da4

Please sign in to comment.