Don't show Edit button on files we know we can't edit or ipynb

This removes the showing of the Edit button when:

* We know we can't edit the file (pdf, doc, xls, jpeg, png, etc.)
* Or a notebook - looking at this again though...
pull/2229/head
Brian E. Granger 9 years ago
parent 2f266d3183
commit 5974cbe2ad

@ -609,7 +609,9 @@ define([
}
// Edit is visible when an item is editable
if (selected.length > 0 && !has_directory) {
if (selected.length > 0 && !has_directory && !selected.find(function(el) {
return el.path.match(/ipynb||jpe?g|png|gif|tiff?|bmp|ico|pdf|doc|xls/);
})) {
$('.edit-button').css('display', 'inline-block');
} else {
$('.edit-button').css('display', 'none');

Loading…
Cancel
Save