Commit a880fc92 by Dányi Bence

webui: always display file extension

parent 71b9cc5c
...@@ -443,10 +443,11 @@ $(function() { ...@@ -443,10 +443,11 @@ $(function() {
break; break;
} }
} }
var extension=d.NAME.match(/\.\w+$/)[0].substr(1);
viewData = { viewData = {
originalName: d.NAME, originalName: d.NAME,
originalSize: d.SIZE, originalSize: d.SIZE,
name: d.NAME.length > 30 ? (d.NAME.substr(0, 27) + '...') : d.NAME, name: d.NAME.length > 30 ? (d.NAME.substr(0, 20) + '... ('+extension+')') : d.NAME,
size: convert(d.SIZE), size: convert(d.SIZE),
type: gettext('file'), type: gettext('file'),
mTime: d.MTIME, mTime: d.MTIME,
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<!-- ko foreach: {data:files,afterAdd:fadeIn,beforeRemove:fadeOutFile} --> <!-- ko foreach: {data:files,afterAdd:fadeIn,beforeRemove:fadeOutFile} -->
<li class="wm real"> <li class="wm real">
<div class="summary" data-bind="click: clickHandler"> <div class="summary" data-bind="click: clickHandler">
<div class="name" data-bind="text: name, attr: {class: getTypeClass}"></div> <div class="name" data-bind="text: name, attr: {class: getTypeClass, title: originalName}"></div>
<div class="info" data-bind="text: size"></div> <div class="info" data-bind="text: size"></div>
<div class="actions"> <div class="actions">
<a href="#" data-bind="click: $parent.rename, clickBubble: false"> <a href="#" data-bind="click: $parent.rename, clickBubble: false">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment