Skip to content

Commit

Permalink
html: allow download link for unknown file kinds
Browse files Browse the repository at this point in the history
  • Loading branch information
astro committed Aug 29, 2010
1 parent be94d69 commit e6f2c4b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions html.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ module.exports = {
return fList;
},
filemenuFor: function( fileData ) {
if (fileData['kind'] == 'unknown')
return '';
var M = module.exports;
var method = 'show'+fileData['kind'];
var r = '';
Expand All @@ -100,9 +98,10 @@ module.exports = {
else
mime = ", 'video/divx'";
}
r += M.tag('a',{href:'#',
onclick:'return '+method+"(this, '/"+escape(fileData['path'])+"'"+mime+");",
'class':'viewmovie'},'View');
if (fileData.kind !== 'unknown')
r += M.tag('a',{href:'#',
onclick:'return '+method+"(this, '/"+escape(fileData['path'])+"'"+mime+");",
'class':'viewmovie'},'View');
r += M.tag('a',{href:'/'+fileData['path']},'Download');
return M.tag('div', {'class':'filemenu'}, r);
}
Expand Down

0 comments on commit e6f2c4b

Please sign in to comment.